[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-700244-105":59,"doc-detail-700244-en":130,"doc-similar-700244":221},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","micropython-documentation-quick-reference-for-the-pyboard","MicroPython Documentation - Quick Reference for the pyboard","","MicroPython Documentation Release 1.8.7 provides a quick reference and tutorial structure for the pyboard, covering core board control, timing and delay, LEDs, GPIO and pin handling, servo control, external interrupts, timers, PWM, ADC/DAC, and communication buses (UART, SPI, I2C). It also outlines broader sections for filesystem and SD card usage, boot modes, error handling, hands-on scripts, library categories, hardware references, component datasheets, licensing information, and indices.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/micropython-documentation-quick-reference-for-the-pyboard/700244/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/micropython-documentation-quick-reference-for-the-pyboard/700244.png","ImageObject",300,407,{"name":92,"@type":93},"Fishy","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-19","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does the pyboard quick reference cover?","Question",{"text":112,"@type":113},"It covers board control, timing, LEDs, GPIO and pins, servo control, interrupts, timers, PWM, ADC/DAC, and communication interfaces like UART, SPI, and I2C.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How is timing implemented in the quick reference?",{"text":117,"@type":113},"The time module is used, including sleep, millisecond/microsecond delays, and tick counters with delta calculations.",{"name":119,"@type":110,"acceptedAnswer":120},"How do you perform analog input and analog output on the pyboard?",{"text":121,"@type":113},"Analog input uses ADC on a selected pin, while analog output uses DAC with a write value in the supported output range.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},700244,1794517692,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":145,"preview_urls":146},14431098389841,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","MicroPython Documentation  \nRelease 1.8.7  \nDamien P. George and contributors  \nJanuary 08, 2017  \nCONTENTS  \n1 Quick reference for the pyboard 1  \n1.1 General board control .......................................... 1  \n1.2 Delay and timing ............................................. 1  \n1.3 LEDs ................................................... 1  \n1.4 Pins and GPIO .............................................. 2  \n1.5 Servo control ............................................... 2  \n1.6 External interrupts ............................................ 2  \n1.7 Timers .................................................. 2  \n1.8 PWM (pulse width modulation) ..................................... 2  \n1.9 ADC (analog to digital conversion) ................................... 3  \n1.10 DAC (digital to analog conversion) ................................... 3  \n1.11 UART (serial bus) ............................................ 3  \n1.12 SPI bus .................................................. 3  \n1.13 I2C bus .................................................. 4  \n2 General information about the pyboard 5  \n2.1 Local ﬁlesystem and SD card ...................................... 5  \n2.2 Boot modes ................................................ 5  \n2.3 Errors: ﬂashing LEDs .......................................... 6  \n3 MicroPython tutorial 7  \n3.1 Introduction to the pyboard ....................................... 7  \n3.2 Running your ﬁrst script ......................................... 8  \n3.3 Getting a MicroPython REPL prompt .................................. 11  \n3.4 Turning on LEDs and basic Python concepts .............................. 12  \n3.5 The Switch, callbacks and interrupts ................................... 14  \n3.6 The accelerometer ............................................ 16  \n3.7 Safe mode and factory reset ....................................... 17  \n3.8 Making the pyboard act as a USB mouse ................................ 18  \n3.9 The Timers ................................................ 20  \n3.10 Inline assembler ............................................. 22  \n3.11 Power control ............................................... 24  \n3.12 Tutorials requiring extra components .................................. 24  \n3.13 Tips, tricks and useful things to know .................................. 34  \n4 MicroPython libraries 37  \n4.1 Python standard libraries and micro-libraries .............................. 37  \n4.2 MicroPython-speciﬁc libraries ...................................... 57  \n4.3 Libraries speciﬁc to the pyboard ..................................... 77  \n5 The pyboard hardware 111  \n6 Datasheets for the components on the pyboard 113  \n7 Datasheets for other components 115  \n8 MicroPython license information 117  \n9 MicroPython documentation contents 119  \n9.1 The MicroPython language ....................................... 119  \n10 Indices and tables 153  \nPython Module Index 155  \nIndex 157  \nCHAPTER  \nONE  \nQUICK REFERENCE FOR THE PYBOARD  \nThe below pinout is for PYBv1.0 . You can also view pinouts for other versions of the pyboard: PYBv1.1 or PYBLITEv1 .0-AC or PYBLITEv1 .0.  \n1.1 General board control  \nSee pyb.  \nimport pyb  \npyb .repl_uart(pyb .UART( 1 , 9600)) \\# duplicate REPL on UART(1) pyb .wfi() \\# pause CPU, waiting for interrupt  \npyb .freq() \\# get CPU and bus frequencies  \npyb .freq(60000000) \\# set CPU freq to 60MHz  \npyb .stop() \\# stop CPU, waiting for external interrupt  \n1.2 Delay and timing  \nUse the time module:  \nimport time  \ntime .sleep(1) \\# sleep for 1 second  \ntime .sleep_ms(500) \\# sleep for 500 milliseconds  \ntime .sleep_us(10) \\# sleep for 10 microseconds  \nstart = time .ticks_ms() \\# get value of millisecond counter  \ndelta = time .ticks_diff(time .ticks_ms(), start) \\# compute time difference  \n1.3 LEDs  \nSeepyb.LED.  \nfrom pyb import LED  \nled = LED(1) \\# red led led .toggle()  \nled .on()  \n[led](led.off)[.](led.off)[off](led.off) ()  \n1.4 Pins and GPIO  \n","cbCaiqDsrvSY34dN","https://ap.wps.com/l/cbCaiqDsrvSY34dN","pdf",1091818,166,"English","# Quick reference for the pyboard\n## General board control\n## Delay and timing\n## LEDs\n## Pins and GPIO\n## Servo control\n## External interrupts\n## Timers\n## PWM (pulse width modulation)\n## ADC (analog to digital conversion)\n## DAC (digital to analog conversion)\n## UART (serial bus)\n## SPI bus\n## I2C bus\n# MicroPython tutorial\n## Introduction to the pyboard\n## Running your first script\n## Getting a MicroPython REPL prompt\n## Turning on LEDs and basic Python concepts","[{\"question\":\"What does the pyboard quick reference cover?\",\"answer\":\"It covers board control, timing, LEDs, GPIO and pins, servo control, interrupts, timers, PWM, ADC/DAC, and communication interfaces like UART, SPI, and I2C.\"},{\"question\":\"How is timing implemented in the quick reference?\",\"answer\":\"The time module is used, including sleep, millisecond/microsecond delays, and tick counters with delta calculations.\"},{\"question\":\"How do you perform analog input and analog output on the pyboard?\",\"answer\":\"Analog input uses ADC on a selected pin, while analog output uses DAC with a write value in the supported output range.\"}]","MicroPython Documentation - Quick Reference for the pyboard | PDF",418,17,[147,151,155,159,163,167,171,175,179,183,187,192,197,202,207,212,217],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/941ef2809883db4166aa079de04e29fa.webp",983,1272,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/8c5e757eea06bf05c56859a7cba6eeb6.webp",982,1270,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/604a5750c6ae49827638bca895591234.webp",981,1269,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/7aeb721223cc99664bfe2cbcece08814.webp",980,1268,{"page_no":24,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3233ac0107302bec77a355cbf0be50c6.webp",979,1267,{"page_no":29,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/7b2d87958ec5b847391bf6c950fd4384.webp",978,1265,{"page_no":34,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/101a501a1486a5c4fda9886546cfb303.webp",977,1264,{"page_no":39,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/61d65a48e41ea0998e677c64b491bdcd.webp",976,1263,{"page_no":44,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e3c5341d939b3ae97e30aaa81d26e324.webp",975,1261,{"page_no":52,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/93ff034768caf6d4fdb582f20c19d503.webp",974,1260,{"page_no":188,"url":189,"width":190,"height":191},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/77ff820ff5d26cf7beb85fa2f157c581.webp",973,1259,{"page_no":193,"url":194,"width":195,"height":196},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/aa656236ad6d32d6e57bab341605e048.webp",972,1257,{"page_no":198,"url":199,"width":200,"height":201},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/36d04d3bc8c2d42bd079bcd6344b8cf3.webp",971,1256,{"page_no":203,"url":204,"width":205,"height":206},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/15619f420b81c7e669113787fcd90c69.webp",970,1255,{"page_no":208,"url":209,"width":210,"height":211},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/ae56b993c77727afb1b7c7d52648c362.webp",969,1254,{"page_no":213,"url":214,"width":215,"height":216},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/2a78650427c304aeab4dda29ffb4504d.webp",968,1252,{"page_no":145,"url":218,"width":219,"height":220},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e2c151d929f6eb63196220cf61ce30ba.webp",967,1251,{"list":222,"token":66},[223,229,235,241,247,253,259,265,271,277],{"doc_id":224,"doc_title":225,"file_type":137,"home_preview_img_url":226,"slug":227,"view_count":34,"category_name":30,"create_tm":228},690250,"GD32F207xx Datasheet - V2.1 - ARM Cortex-M3 32-bit MCU Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002604226/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=0X4PSDcPdDbbm2sbJxDT4PWfbdI%3D","gd32f207xx-datasheet-v21-arm-cortex-m3-32-bit-mcu-overview",1794159489,{"doc_id":230,"doc_title":231,"file_type":137,"home_preview_img_url":232,"slug":233,"view_count":52,"category_name":30,"create_tm":234},560492,"AB5312B Audio Player Microcontroller - Product Features - Revision History","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947692861/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Wvw7iFF%2F%2Fx96LQNjuL3uIo%2FLUPs%3D","ab5312b-audio-player-microcontroller-product-features-revision-history",1791803245,{"doc_id":236,"doc_title":237,"file_type":137,"home_preview_img_url":238,"slug":239,"view_count":81,"category_name":30,"create_tm":240},690249,"LPC1768/66/65/64 - 32-bit ARM Cortex-M3 microcontroller - Preliminary data sheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002001807/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=NoIikcRW7K19vjeIf4Y3ibgdvX0%3D","lpc1768666564-32-bit-arm-cortex-m3-microcontroller-preliminary-data-sheet",1794159482,{"doc_id":242,"doc_title":243,"file_type":137,"home_preview_img_url":244,"slug":245,"view_count":29,"category_name":30,"create_tm":246},691255,"CY8C21334/CY8C21534 - Automotive PSoC Programmable System-on-Chip Features","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002670604/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=GXrQEyQGf3PwcgJtMr%2FEStoaaxA%3D","cy8c21334cy8c21534-automotive-psoc-programmable-system-on-chip-features",1794173517,{"doc_id":248,"doc_title":249,"file_type":137,"home_preview_img_url":250,"slug":251,"view_count":24,"category_name":30,"create_tm":252},700222,"GD32F407xx Datasheet - Rev1.0 - Reference document","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011564297/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=EhAjY5oEnoMkVvjLH0bGc3BZbdE%3D","gd32f407xx-datasheet-rev10-reference-document",1794517308,{"doc_id":254,"doc_title":255,"file_type":137,"home_preview_img_url":256,"slug":257,"view_count":24,"category_name":30,"create_tm":258},700214,"GD32C103 - Datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012018681/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=aN%2BLxOyjkPdM9i%2FxC%2BASf2FvSw4%3D","gd32c103-datasheet",1794517120,{"doc_id":260,"doc_title":261,"file_type":137,"home_preview_img_url":262,"slug":263,"view_count":193,"category_name":30,"create_tm":264},689876,"GD32F103xx Datasheet - Rev 2.12 - GigaDevice","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001422203/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=lUbzpHroqKoPnZDkOklpxETt%2FTA%3D","gd32f103xx-datasheet-rev-212-gigadevice",1794130321,{"doc_id":266,"doc_title":267,"file_type":137,"home_preview_img_url":268,"slug":269,"view_count":203,"category_name":30,"create_tm":270},562447,"STM8S103K3 STM8S103F3 STM8S103F2 - Product description","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947811627/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=5WD2dhO%2FHrP%2BMcWSxPeJNP1sntM%3D","stm8s103k3-stm8s103f3-stm8s103f2-product-description",1791808649,{"doc_id":272,"doc_title":273,"file_type":137,"home_preview_img_url":274,"slug":275,"view_count":39,"category_name":30,"create_tm":276},690247,"GD32F107xx - Datasheet - Revision 2.3 - (Jan. 2026)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002604196/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=uvXAV2PbrxS5%2FnyJIHfBje1bRUw%3D","gd32f107xx-datasheet-revision-23-jan-2026",1794159480,{"doc_id":278,"doc_title":279,"file_type":137,"home_preview_img_url":280,"slug":281,"view_count":39,"category_name":30,"create_tm":282},670186,"Arduino Nano ESP32 Datasheet - Specifications","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988689666/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=noEY1KlnLPNxUli0YfpmHQpIP70%3D","arduino-nano-esp32-datasheet-specifications",1793567535]