René's URL Explorer Experiment


Title: GitHub - todbot/circuitpython-tricks: Some CircuitPython tricks, mostly reminders to myself

Open Graph Title: GitHub - todbot/circuitpython-tricks: Some CircuitPython tricks, mostly reminders to myself

X Title: GitHub - todbot/circuitpython-tricks: Some CircuitPython tricks, mostly reminders to myself

Description: Some CircuitPython tricks, mostly reminders to myself - todbot/circuitpython-tricks

Open Graph Description: Some CircuitPython tricks, mostly reminders to myself - todbot/circuitpython-tricks

X Description: Some CircuitPython tricks, mostly reminders to myself - todbot/circuitpython-tricks

Opengraph URL: https://github.com/todbot/circuitpython-tricks

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:5cc1d692-3e18-9fea-f14a-2df99a4e5806
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id8030:A79C2:2953943:38B0FEA:6964DD47
html-safe-nonce297f0d1ee8d06385a7343736b5c1e3dee18875ee618633bf1d1bea2aabef771c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDMwOkE3OUMyOjI5NTM5NDM6MzhCMEZFQTo2OTY0REQ0NyIsInZpc2l0b3JfaWQiOiI1MzU3MjY0NjgxOTI1OTExNzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac259be452d33f00448c8c88db22f50a2763aef853a7e59b2db98f04e978f854ef
hovercard-subject-tagrepository:342734038
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/todbot/circuitpython-tricks
twitter:imagehttps://opengraph.githubassets.com/6d9248bfc2b1972794f7e84978ac3690f16ae2937be01dfc1a09eaa4dd93ff00/todbot/circuitpython-tricks
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6d9248bfc2b1972794f7e84978ac3690f16ae2937be01dfc1a09eaa4dd93ff00/todbot/circuitpython-tricks
og:image:altSome CircuitPython tricks, mostly reminders to myself - todbot/circuitpython-tricks
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5838582163a1256e5ebd5086b7e1dc5cea93d82086c9c8b1395fb50f6ddab28d
turbo-cache-controlno-preview
go-importgithub.com/todbot/circuitpython-tricks git https://github.com/todbot/circuitpython-tricks.git
octolytics-dimension-user_id274093
octolytics-dimension-user_logintodbot
octolytics-dimension-repository_id342734038
octolytics-dimension-repository_nwotodbot/circuitpython-tricks
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id342734038
octolytics-dimension-repository_network_root_nwotodbot/circuitpython-tricks
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8f997e7f84bd1db9537ba403fa68be0da3423594
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/todbot/circuitpython-tricks#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftodbot%2Fcircuitpython-tricks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftodbot%2Fcircuitpython-tricks
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=todbot%2Fcircuitpython-tricks
Reloadhttps://github.com/todbot/circuitpython-tricks
Reloadhttps://github.com/todbot/circuitpython-tricks
Reloadhttps://github.com/todbot/circuitpython-tricks
todbot https://github.com/todbot
circuitpython-trickshttps://github.com/todbot/circuitpython-tricks
Notifications https://github.com/login?return_to=%2Ftodbot%2Fcircuitpython-tricks
Fork 76 https://github.com/login?return_to=%2Ftodbot%2Fcircuitpython-tricks
Star 723 https://github.com/login?return_to=%2Ftodbot%2Fcircuitpython-tricks
MIT license https://github.com/todbot/circuitpython-tricks/blob/main/LICENSE.TXT
723 stars https://github.com/todbot/circuitpython-tricks/stargazers
76 forks https://github.com/todbot/circuitpython-tricks/forks
Branches https://github.com/todbot/circuitpython-tricks/branches
Tags https://github.com/todbot/circuitpython-tricks/tags
Activity https://github.com/todbot/circuitpython-tricks/activity
Star https://github.com/login?return_to=%2Ftodbot%2Fcircuitpython-tricks
Notifications https://github.com/login?return_to=%2Ftodbot%2Fcircuitpython-tricks
Code https://github.com/todbot/circuitpython-tricks
Issues 4 https://github.com/todbot/circuitpython-tricks/issues
Pull requests 2 https://github.com/todbot/circuitpython-tricks/pulls
Actions https://github.com/todbot/circuitpython-tricks/actions
Projects 0 https://github.com/todbot/circuitpython-tricks/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/todbot/circuitpython-tricks/security
Please reload this pagehttps://github.com/todbot/circuitpython-tricks
Insights https://github.com/todbot/circuitpython-tricks/pulse
Code https://github.com/todbot/circuitpython-tricks
Issues https://github.com/todbot/circuitpython-tricks/issues
Pull requests https://github.com/todbot/circuitpython-tricks/pulls
Actions https://github.com/todbot/circuitpython-tricks/actions
Projects https://github.com/todbot/circuitpython-tricks/projects
Security https://github.com/todbot/circuitpython-tricks/security
Insights https://github.com/todbot/circuitpython-tricks/pulse
Brancheshttps://github.com/todbot/circuitpython-tricks/branches
Tagshttps://github.com/todbot/circuitpython-tricks/tags
https://github.com/todbot/circuitpython-tricks/branches
https://github.com/todbot/circuitpython-tricks/tags
239 Commitshttps://github.com/todbot/circuitpython-tricks/commits/main/
https://github.com/todbot/circuitpython-tricks/commits/main/
larger-trickshttps://github.com/todbot/circuitpython-tricks/tree/main/larger-tricks
larger-trickshttps://github.com/todbot/circuitpython-tricks/tree/main/larger-tricks
synthiohttps://github.com/todbot/circuitpython-tricks/tree/main/synthio
synthiohttps://github.com/todbot/circuitpython-tricks/tree/main/synthio
.gitignorehttps://github.com/todbot/circuitpython-tricks/blob/main/.gitignore
.gitignorehttps://github.com/todbot/circuitpython-tricks/blob/main/.gitignore
LICENSE.TXThttps://github.com/todbot/circuitpython-tricks/blob/main/LICENSE.TXT
LICENSE.TXThttps://github.com/todbot/circuitpython-tricks/blob/main/LICENSE.TXT
README.mdhttps://github.com/todbot/circuitpython-tricks/blob/main/README.md
README.mdhttps://github.com/todbot/circuitpython-tricks/blob/main/README.md
READMEhttps://github.com/todbot/circuitpython-tricks
MIT licensehttps://github.com/todbot/circuitpython-tricks
https://github.com/todbot/circuitpython-tricks#circuitpython-tricks
circuitpython-tricks/larger-trickshttps://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks
Learn Guide on Adafruithttps://learn.adafruit.com/todbot-circuitpython-tricks?view=all
The Python Tutorialhttps://docs.python.org/3/tutorial/
CircuitPython API referencehttps://docs.circuitpython.org/en/latest/docs/
"Core Modules > Modules" sectionhttps://docs.circuitpython.org/en/latest/shared-bindings/index.html#modules
Pure-Python libraries in Adafruit Library Bundlehttps://github.com/adafruit/Adafruit_CircuitPython_Bundle
drivershttps://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/main/libraries/drivers
helpershttps://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/main/libraries/helpers
CircuitPython Essentials Learn Guidehttps://learn.adafruit.com/circuitpython-essentials
https://github.com/todbot/circuitpython-tricks#table-of-contents
Inputshttps://github.com/todbot/circuitpython-tricks#inputs
Read a digital input as a Buttonhttps://github.com/todbot/circuitpython-tricks#read-a-digital-input-as-a-button
Read a Potentiometerhttps://github.com/todbot/circuitpython-tricks#read-a-potentiometer
Read a Touch Pin / Capsensehttps://github.com/todbot/circuitpython-tricks#read-a-touch-pin--capsense
Read a Rotary Encoderhttps://github.com/todbot/circuitpython-tricks#read-a-rotary-encoder
Debounce a pin / buttonhttps://github.com/todbot/circuitpython-tricks#debounce-a-pin--button
Detect button double-clickhttps://github.com/todbot/circuitpython-tricks#detect-button-double-click
Set up and debounce a list of pinshttps://github.com/todbot/circuitpython-tricks#set-up-and-debounce-a-list-of-pins
Outputshttps://github.com/todbot/circuitpython-tricks#outputs
Output HIGH / LOW on a pin (like an LED)https://github.com/todbot/circuitpython-tricks#output-high--low-on-a-pin-like-an-led
Output Analog value on a DAC pinhttps://github.com/todbot/circuitpython-tricks#output-analog-value-on-a-dac-pin
Output a "Analog" value on a PWM pinhttps://github.com/todbot/circuitpython-tricks#output-a-analog-value-on-a-pwm-pin
Control Neopixel / WS2812 LEDshttps://github.com/todbot/circuitpython-tricks#control-neopixel--ws2812-leds
Control a servo, with animation listhttps://github.com/todbot/circuitpython-tricks#control-a-servo-with-animation-list
Neopixels / Dotstarshttps://github.com/todbot/circuitpython-tricks#neopixels--dotstars
Light each LED in orderhttps://github.com/todbot/circuitpython-tricks#light-each-led-in-order
Moving rainbow on built-in board.NEOPIXELhttps://github.com/todbot/circuitpython-tricks#moving-rainbow-on-built-in-boardneopixel
Make moving rainbow gradient across LED striphttps://github.com/todbot/circuitpython-tricks#make-moving-rainbow-gradient-across-led-strip
Fade all LEDs by amount for chase effectshttps://github.com/todbot/circuitpython-tricks#fade-all-leds-by-amount-for-chase-effects
Audiohttps://github.com/todbot/circuitpython-tricks#audio
Making simple toneshttps://github.com/todbot/circuitpython-tricks#making-simple-tones
Play a WAV filehttps://github.com/todbot/circuitpython-tricks#play-a-wav-file
Audio out using PWMhttps://github.com/todbot/circuitpython-tricks#audio-out-using-pwm
Audio out using DAChttps://github.com/todbot/circuitpython-tricks#audio-out-using-dac
Audio out using I2Shttps://github.com/todbot/circuitpython-tricks#audio-out-using-i2s
Use audiomixer to prevent audio crackleshttps://github.com/todbot/circuitpython-tricks#use-audiomixer-to-prevent-audio-crackles
Play multiple sounds with audiomixerhttps://github.com/todbot/circuitpython-tricks#play-multiple-sounds-with-audiomixer
Playing MP3 fileshttps://github.com/todbot/circuitpython-tricks#playing-mp3-files
USBhttps://github.com/todbot/circuitpython-tricks#usb
Rename CIRCUITPY drive to something newhttps://github.com/todbot/circuitpython-tricks#rename-circuitpy-drive-to-something-new
Detect if USB is connected or nothttps://github.com/todbot/circuitpython-tricks#detect-if-usb-is-connected-or-not
Get CIRCUITPY disk size and free spacehttps://github.com/todbot/circuitpython-tricks#get-circuitpy-disk-size-and-free-space
Programmatically reset to UF2 bootloaderhttps://github.com/todbot/circuitpython-tricks#programmatically-reset-to-uf2-bootloader
USB Serialhttps://github.com/todbot/circuitpython-tricks#usb-serial
Print to USB Serialhttps://github.com/todbot/circuitpython-tricks#print-to-usb-serial
Read user input from USB Serial, blockinghttps://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-blocking
Read user input from USB Serial, non-blocking (mostly)https://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-non-blocking-mostly
Read keys from USB Serialhttps://github.com/todbot/circuitpython-tricks#read-keys-from-usb-serial
Read user input from USB serial, non-blockinghttps://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-non-blocking
USB Keyboard & Mousehttps://github.com/todbot/circuitpython-tricks#usb-keyboard-mouse
Sending keystrokes and mouse moveshttps://github.com/todbot/circuitpython-tricks#sending-keystrokes-and-mouse-moves
USB MIDIhttps://github.com/todbot/circuitpython-tricks#usb-midi
Sending MIDI with adafruit_midihttps://github.com/todbot/circuitpython-tricks#sending-midi-with-adafruit_midi
Sending MIDI with bytearrayhttps://github.com/todbot/circuitpython-tricks#sending-midi-with-bytearray
MIDI over Serial UARThttps://github.com/todbot/circuitpython-tricks#midi-over-serial-uart
Receiving MIDIhttps://github.com/todbot/circuitpython-tricks#receiving-midi
Receiving MIDI USB and MIDI Serial UART togetherhttps://github.com/todbot/circuitpython-tricks#receiving-midi-usb-and-midi-serial-uart-together
Enable USB MIDI in boot.py (for ESP32-S2 and STM32F4)https://github.com/todbot/circuitpython-tricks#enable-usb-midi-in-bootpy-for-esp32-s2-and-stm32f4
WiFi / Networkinghttps://github.com/todbot/circuitpython-tricks#wifi--networking
Scan for WiFi Networks, sorted by signal strengthhttps://github.com/todbot/circuitpython-tricks#scan-for-wifi-networks-sorted-by-signal-strength
Join WiFi network with highest signal strengthhttps://github.com/todbot/circuitpython-tricks#join-wifi-network-with-highest-signal-strength
Ping an IP addresshttps://github.com/todbot/circuitpython-tricks#ping-an-ip-address
Get IP address of remote hosthttps://github.com/todbot/circuitpython-tricks#get-ip-address-of-remote-host
Fetch a JSON filehttps://github.com/todbot/circuitpython-tricks#fetch-a-json-file
Serve a webpage via HTTPhttps://github.com/todbot/circuitpython-tricks#serve-a-webpage-via-http
Set RTC time from NTPhttps://github.com/todbot/circuitpython-tricks#set-rtc-time-from-ntp
Set RTC time from time servicehttps://github.com/todbot/circuitpython-tricks#set-rtc-time-from-time-service
What the heck is settings.toml?https://github.com/todbot/circuitpython-tricks#what-the-heck-is-settingstoml
What the heck is secrets.py?https://github.com/todbot/circuitpython-tricks#what-the-heck-is-secretspy
Displays (LCD / OLED / E-Ink) and displayiohttps://github.com/todbot/circuitpython-tricks#displays-lcd--oled--e-ink-and-displayio
Get default display and change display rotationhttps://github.com/todbot/circuitpython-tricks#get-default-display-and-change-display-rotation
Display an imagehttps://github.com/todbot/circuitpython-tricks#display-an-image
Display background bitmaphttps://github.com/todbot/circuitpython-tricks#display-background-bitmap
Image slideshowhttps://github.com/todbot/circuitpython-tricks#image-slideshow
Dealing with E-Ink "Refresh Too Soon" errorhttps://github.com/todbot/circuitpython-tricks#dealing-with-e-ink-refresh-too-soon-error
Turn off REPL on built-in displayhttps://github.com/todbot/circuitpython-tricks#turn-off-repl-on-built-in-display
I2Chttps://github.com/todbot/circuitpython-tricks#i2c
Scan I2C bus for deviceshttps://github.com/todbot/circuitpython-tricks#scan-i2c-bus-for-devices
Speed up I2C bushttps://github.com/todbot/circuitpython-tricks#speed-up-i2c-bus
Timinghttps://github.com/todbot/circuitpython-tricks#timing
Measure how long something takeshttps://github.com/todbot/circuitpython-tricks#measure-how-long-something-takes
More accurate timing with ticks_ms(), like Arduino millis()https://github.com/todbot/circuitpython-tricks#more-accurate-timing-with-ticks_ms-like-arduino-millis
Control garbage collection for reliable timinghttps://github.com/todbot/circuitpython-tricks#control-garbage-collection-for-reliable-timing
Converting milliseconds to seconds: 0.004 * 1000 != 4, sometimeshttps://github.com/todbot/circuitpython-tricks#converting-milliseconds-to-seconds-0004--1000--4-sometimes
Board Infohttps://github.com/todbot/circuitpython-tricks#board-info
Get CPU speed (and set it!)https://github.com/todbot/circuitpython-tricks#get-cpu-speed-and-set-it
Display amount of free RAMhttps://github.com/todbot/circuitpython-tricks#display-amount-of-free-ram
Show microcontroller.pin to board mappingshttps://github.com/todbot/circuitpython-tricks#show-microcontrollerpin-to-board-mappings
Determine which board you're onhttps://github.com/todbot/circuitpython-tricks#determine-which-board-youre-on
Support multiple boards with one code.pyhttps://github.com/todbot/circuitpython-tricks#support-multiple-boards-with-one-codepy
Computery Taskshttps://github.com/todbot/circuitpython-tricks#computery-tasks
Formatting stringshttps://github.com/todbot/circuitpython-tricks#formatting-strings
Formatting strings with f-stringshttps://github.com/todbot/circuitpython-tricks#formatting-strings-with-f-strings
Using regular expressions to "findall" stringshttps://github.com/todbot/circuitpython-tricks#using-regular-expressions-to-findall-strings
Make and use a config filehttps://github.com/todbot/circuitpython-tricks#make-and-use-a-config-file
Run different code.py on startuphttps://github.com/todbot/circuitpython-tricks#run-different-codepy-on-startup
Coding Techniqueshttps://github.com/todbot/circuitpython-tricks#coding-techniques
Map an input range to an output rangehttps://github.com/todbot/circuitpython-tricks#map-an-input-range-to-an-output-range
Constrain an input to a min/maxhttps://github.com/todbot/circuitpython-tricks#constrain-an-input-to-a-minmax
Turn a momentary value into a togglehttps://github.com/todbot/circuitpython-tricks#turn-a-momentary-value-into-a-toggle
Do something every N seconds without sleep()https://github.com/todbot/circuitpython-tricks#do-something-every-n-seconds-without-sleep
System error handlinghttps://github.com/todbot/circuitpython-tricks#system-error-handling
Preventing Ctrl-C from stopping the programhttps://github.com/todbot/circuitpython-tricks#preventing-ctrl-c-from-stopping-the-program
Prevent auto-reload when CIRCUITPY is touchedhttps://github.com/todbot/circuitpython-tricks#prevent-auto-reload-when-circuitpy-is-touched
Raspberry Pi Pico boot.py Protectionhttps://github.com/todbot/circuitpython-tricks#raspberry-pi-pico-bootpy-protection
Using the REPLhttps://github.com/todbot/circuitpython-tricks#using-the-repl
Display built-in modules / librarieshttps://github.com/todbot/circuitpython-tricks#display-built-in-modules--libraries
Turn off built-in display to speed up REPL printinghttps://github.com/todbot/circuitpython-tricks#turn-off-built-in-display-to-speed-up-repl-printing
Useful REPL one-linershttps://github.com/todbot/circuitpython-tricks#useful-repl-one-liners
Python trickshttps://github.com/todbot/circuitpython-tricks#python-tricks
Create list with elements all the same valuehttps://github.com/todbot/circuitpython-tricks#create-list-with-elements-all-the-same-value
Convert RGB tuples to int and back againhttps://github.com/todbot/circuitpython-tricks#convert-rgb-tuples-to-int-and-back-again
Storing multiple values per list entryhttps://github.com/todbot/circuitpython-tricks#storing-multiple-values-per-list-entry
Python infohttps://github.com/todbot/circuitpython-tricks#python-info
Display which (not built-in) libraries have been importedhttps://github.com/todbot/circuitpython-tricks#display-which-not-built-in-libraries-have-been-imported
List names of all global variableshttps://github.com/todbot/circuitpython-tricks#list-names-of-all-global-variables
Display the running CircuitPython releasehttps://github.com/todbot/circuitpython-tricks#display-the-running-circuitpython-release
Host-side taskshttps://github.com/todbot/circuitpython-tricks#host-side-tasks
Installing CircuitPython librarieshttps://github.com/todbot/circuitpython-tricks#installing-circuitpython-libraries
Installing libraries with circuphttps://github.com/todbot/circuitpython-tricks#installing-libraries-with-circup
Copying libraries by hand with cphttps://github.com/todbot/circuitpython-tricks#copying-libraries-by-hand-with-cp
Preparing images for CircuitPythonhttps://github.com/todbot/circuitpython-tricks#preparing-images-for-circuitpython
Onlinehttps://github.com/todbot/circuitpython-tricks#online
Command-line: using ImageMagickhttps://github.com/todbot/circuitpython-tricks#command-line-using-imagemagick
Command-line: using GraphicsMagickhttps://github.com/todbot/circuitpython-tricks#command-line-using-graphicsmagick
Making images smaller or for E-Ink displayshttps://github.com/todbot/circuitpython-tricks#making-images-smaller-or-for-e-ink-displays
NodeJs: using gmhttps://github.com/todbot/circuitpython-tricks#nodejs-using-gm
Python: using PIL / pillowhttps://github.com/todbot/circuitpython-tricks#python-using-pil--pillow
Preparing audio files for CircuitPythonhttps://github.com/todbot/circuitpython-tricks#preparing-audio-files-for-circuitpython
WAV fileshttps://github.com/todbot/circuitpython-tricks#wav-files
MP3 fileshttps://github.com/todbot/circuitpython-tricks#mp3-files
Getting soxhttps://github.com/todbot/circuitpython-tricks#getting-sox
Circup hackshttps://github.com/todbot/circuitpython-tricks#circup-hacks
Finding where circup stores its fileshttps://github.com/todbot/circuitpython-tricks#finding-where-circup-stores-its-files
Building CircuitPythonhttps://github.com/todbot/circuitpython-tricks#building-circuitpython
About this guidehttps://github.com/todbot/circuitpython-tricks#about-this-guide
https://github.com/todbot/circuitpython-tricks#inputs
https://github.com/todbot/circuitpython-tricks#read-a-digital-input-as-a-button
https://github.com/todbot/circuitpython-tricks#read-a-potentiometer
https://github.com/todbot/circuitpython-tricks#read-a-touch-pin--capsense
theremin-like behaviorhttps://gist.github.com/todbot/bb4ec9c509f8c301e4787e5cb26ec870
https://github.com/todbot/circuitpython-tricks#read-a-rotary-encoder
https://github.com/todbot/circuitpython-tricks#debounce-a-pin--button
Set up and debounce a list of pinshttps://github.com/todbot/circuitpython-tricks#set-up-and-debounce-a-list-of-pins
https://github.com/todbot/circuitpython-tricks#detect-button-double-click
https://github.com/todbot/circuitpython-tricks#set-up-and-debounce-a-list-of-pins
https://github.com/todbot/circuitpython-tricks#outputs
https://github.com/todbot/circuitpython-tricks#output-high--low-on-a-pin-like-an-led
https://github.com/todbot/circuitpython-tricks#output-analog-value-on-a-dac-pin
https://github.com/todbot/circuitpython-tricks#output-a-analog-value-on-a-pwm-pin
https://github.com/todbot/circuitpython-tricks#control-neopixel--ws2812-leds
https://github.com/todbot/circuitpython-tricks#control-a-servo-with-animation-list
https://github.com/todbot/circuitpython-tricks#neopixels--dotstars
https://github.com/todbot/circuitpython-tricks#light-each-led-in-order
https://github.com/todbot/circuitpython-tricks#moving-rainbow-on-built-in-boardneopixel
https://github.com/todbot/circuitpython-tricks#make-moving-rainbow-gradient-across-led-strip
demo of it in this tweethttps://twitter.com/todbot/status/1397992493833097218
https://github.com/todbot/circuitpython-tricks#fade-all-leds-by-amount-for-chase-effects
https://github.com/todbot/circuitpython-tricks#audio
fully-fledged audio synthesizer with synthiohttps://github.com/todbot/circuitpython-synthio-tricks
Preparing Audio Files for CircuitPythonhttps://github.com/todbot/circuitpython-tricks#preparing-audio-files-for-circuitpython
https://github.com/todbot/circuitpython-tricks#making-simple-tones
simpleiohttps://docs.circuitpython.org/projects/simpleio/en/latest/examples.html#id1
https://github.com/todbot/circuitpython-tricks#play-a-wav-file
https://github.com/todbot/circuitpython-tricks#audio-out-using-pwm
audiopwomio Support Matrixhttps://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html?filter=audiopwmio
AudioMixerhttps://github.com/todbot/circuitpython-tricks#use-audiomixer-to-prevent-audio-crackles
this simple circuithttps://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks/docs/breakbeat_sampleplayer_wiring.png
this twitter thread for detailshttps://twitter.com/todbot/status/1403451581593374720
https://github.com/todbot/circuitpython-tricks#audio-out-using-dac
audioio Support Matrixhttps://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html?filter=audioio
https://github.com/todbot/circuitpython-tricks#audio-out-using-i2s
audiobusio Support Matrixhttps://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html?filter=audiobusio
https://github.com/todbot/circuitpython-tricks#use-audiomixer-to-prevent-audio-crackles
https://github.com/todbot/circuitpython-tricks#play-multiple-sounds-with-audiomixer
larger-trickshttps://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks
https://github.com/todbot/circuitpython-tricks#playing-mp3-files
FunHousehttps://www.adafruit.com/product/4985
https://gist.github.com/todbot/f35bb5ceed013a277688b2ca333244d5https://gist.github.com/todbot/f35bb5ceed013a277688b2ca333244d5
https://github.com/todbot/circuitpython-tricks#usb
https://github.com/todbot/circuitpython-tricks#rename-circuitpy-drive-to-something-new
https://github.com/todbot/circuitpython-tricks#detect-if-usb-is-connected-or-not
https://github.com/todbot/circuitpython-tricks#get-circuitpy-disk-size-and-free-space
https://github.com/todbot/circuitpython-tricks#programmatically-reset-to-uf2-bootloader
https://github.com/todbot/circuitpython-tricks#usb-serial
https://github.com/todbot/circuitpython-tricks#print-to-usb-serial
https://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-blocking
https://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-non-blocking-mostly
https://github.com/todbot/circuitpython-tricks#read-keys-from-usb-serial
https://github.com/todbot/circuitpython-tricks#read-user-input-from-usb-serial-non-blocking
https://github.com/todbot/circuitpython-tricks#usb-keyboard--mouse
CircuitPython Essentialshttps://learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse
the bundlehttps://circuitpython.org/libraries
https://github.com/todbot/circuitpython-tricks#sending-keystrokes-and-mouse-moves
https://github.com/todbot/circuitpython-tricks#usb-midi
adafruit_midihttps://github.com/adafruit/Adafruit_CircuitPython_MIDI
TMIDIhttps://github.com/todbot/CircuitPython_TMIDI
SmolMIDIhttps://github.com/wntrblm/Winterbloom_SmolMIDI
https://github.com/todbot/circuitpython-tricks#sending-midi-with-adafruit_midi
https://github.com/todbot/circuitpython-tricks#sending-midi-with-bytearray
https://github.com/todbot/circuitpython-tricks#midi-over-serial-uart
simple MIDI out circuithttps://learn.adafruit.com/qt-py-rp2040-usb-to-serial-midi-friends/circuit-diagram
https://github.com/todbot/circuitpython-tricks#receiving-midi
https://github.com/todbot/circuitpython-tricks#receiving-midi-usb-and-midi-serial-uart-together
this one for QTPyshttps://www.denki-oto.com/store/p74/MICROMIDITRS-USB.html#/
this one for MacroPad RP2040https://www.tindie.com/products/todbot/macropadsynthplug-turn-rp2040-into-a-synth/
https://github.com/todbot/circuitpython-tricks#enable-usb-midi-in-bootpy-for-esp32-s2-and-stm32f4
USB endpoints to enable all USB functionshttps://learn.adafruit.com/customizing-usb-devices-in-circuitpython/how-many-usb-devices-can-i-have
https://github.com/todbot/circuitpython-tricks#wifi--networking
https://github.com/todbot/circuitpython-tricks#scan-for-wifi-networks-sorted-by-signal-strength
https://github.com/todbot/circuitpython-tricks#join-wifi-network-with-highest-signal-strength
https://github.com/todbot/circuitpython-tricks#ping-an-ip-address
https://github.com/todbot/circuitpython-tricks#get-ip-address-of-remote-host
https://github.com/todbot/circuitpython-tricks#fetch-a-json-file
https://github.com/todbot/circuitpython-tricks#serve-a-webpage-via-http
adafruit_httpserverhttps://github.com/adafruit/Adafruit_CircuitPython_HTTPServer
Ampule libraryhttps://github.com/deckerego/ampule
https://github.com/todbot/circuitpython-tricks#set-rtc-time-from-ntp
https://github.com/todbot/circuitpython-tricks#set-rtc-time-from-time-service
WorldTimeAPI.org sitehttp://worldtimeapi.org/pages/examples
this more concise version from @deilers78https://github.com/todbot/circuitpython-tricks/issues/14#issuecomment-1489181920
https://github.com/todbot/circuitpython-tricks#what-the-heck-is-settingstoml
CircuitPython Web Workflowhttps://docs.circuitpython.org/en/latest/docs/workflows.html#web
Web Workflowhttps://docs.circuitpython.org/en/latest/docs/workflows.html#web
https://github.com/todbot/circuitpython-tricks#what-the-heck-is-secretspy
https://github.com/todbot/circuitpython-tricks#displays-lcd--oled--e-ink-and-displayio
displayiohttps://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/
I2Chttps://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/#displayio.I2CDisplay
SPIhttps://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/#displayio.FourWire
https://github.com/todbot/circuitpython-tricks#get-default-display-and-change-display-rotation
https://github.com/todbot/circuitpython-tricks#display-an-image
displayio.OnDiskBitmaphttps://docs.circuitpython.org/en/latest/shared-bindings/displayio/index.html#displayio.OnDiskBitmap
how to make BMP3 imageshttps://github.com/todbot/circuitpython-tricks#preparing-images-for-circuitpython
palettized BMP3 formathttps://github.com/todbot/circuitpython-tricks#preparing-images-for-circuitpython
Bitmaphttps://docs.circuitpython.org/en/latest/shared-bindings/displayio/#displayio.Bitmap
Palettehttps://docs.circuitpython.org/en/latest/shared-bindings/displayio/#displayio.Palette
TileGridhttps://docs.circuitpython.org/en/latest/shared-bindings/displayio/#displayio.TileGrid
Grouphttps://docs.circuitpython.org/en/latest/shared-bindings/displayio/#displayio.Group
https://github.com/todbot/circuitpython-tricks#display-background-bitmap
vectoriohttps://docs.circuitpython.org/en/latest/shared-bindings/vectorio/index.html
adafruit_display_shapeshttps://docs.circuitpython.org/projects/display-shapes/en/latest/index.html
https://github.com/todbot/circuitpython-tricks#image-slideshow
Preparing images for CircuitPythonhttps://github.com/todbot/circuitpython-tricks#preparing-images-for-circuitpython
https://github.com/todbot/circuitpython-tricks#dealing-with-e-ink-refresh-too-soon-error
https://github.com/todbot/circuitpython-tricks#turn-off-repl-on-built-in-display
https://github.com/todbot/circuitpython-tricks#i2c
https://github.com/todbot/circuitpython-tricks#scan-i2c-bus-for-devices
CircuitPython I2C Guide: Find Your Sensorhttps://learn.adafruit.com/circuitpython-essentials/circuitpython-i2c#find-your-sensor-2985153-11
https://github.com/todbot/circuitpython-tricks#speed-up-i2c-bus
https://github.com/todbot/circuitpython-tricks#timing
https://github.com/todbot/circuitpython-tricks#measure-how-long-something-takes
https://github.com/todbot/circuitpython-tricks#more-accurate-timing-with-ticks_ms-like-arduino-millis
https://github.com/todbot/circuitpython-tricks#control-garbage-collection-for-reliable-timing
https://github.com/todbot/circuitpython-tricks#converting-milliseconds-to-seconds-0004--1000--4-sometimes
CircuitPython has reduced floating point precision (30-bit instead of 32-bit)https://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questions#faq-3129274
further discusion herehttps://github.com/adafruit/circuitpython/issues/9237
https://github.com/todbot/circuitpython-tricks#board-info
https://github.com/todbot/circuitpython-tricks#get-cpu-speed-and-set-it
microcontroller.cpu.frequencyhttps://docs.circuitpython.org/en/latest/shared-bindings/microcontroller/index.html#microcontroller.Processor.frequency
https://github.com/todbot/circuitpython-tricks#display-amount-of-free-ram
https://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questionshttps://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questions
https://github.com/todbot/circuitpython-tricks#show-microcontrollerpin-to-board-mappings
https://gist.github.com/anecdata/1c345cb2d137776d76b97a5d5678dc97https://gist.github.com/anecdata/1c345cb2d137776d76b97a5d5678dc97
https://github.com/todbot/circuitpython-tricks#determine-which-board-youre-on
ports/espressif/boards/https://github.com/adafruit/circuitpython/tree/main/ports/espressif/boards
circuitpython-stubshttps://pypi.org/project/circuitpython-stubs/
https://github.com/todbot/circuitpython-tricks#support-multiple-boards-with-one-codepy
https://github.com/todbot/circuitpython-tricks#computery-tasks
https://github.com/todbot/circuitpython-tricks#formatting-strings
https://github.com/todbot/circuitpython-tricks#formatting-strings-with-f-strings
https://github.com/todbot/circuitpython-tricks#using-regular-expressions-to-findall-strings
https://github.com/todbot/circuitpython-tricks#make-and-use-a-config-file
https://github.com/todbot/circuitpython-tricks#run-different-codepy-on-startup
supervisor.set_next_code_file()https://circuitpython.readthedocs.io/en/latest/shared-bindings/supervisor/index.html#supervisor.set_next_code_file
https://github.com/todbot/circuitpython-tricks#coding-techniques
https://github.com/todbot/circuitpython-tricks#map-an-input-range-to-an-output-range
https://github.com/todbot/circuitpython-tricks#constrain-an-input-to-a-minmax
https://github.com/todbot/circuitpython-tricks#turn-a-momentary-value-into-a-toggle
https://github.com/todbot/circuitpython-tricks#do-something-every-n-seconds-without-sleep
uses ticks_ms()https://github.com/todbot/circuitpython-tricks#more-accurate-timing-with-ticks_ms-like-arduino-millis
https://github.com/todbot/circuitpython-tricks#system-error-handling
https://github.com/todbot/circuitpython-tricks#preventing-ctrl-c-from-stopping-the-program
https://github.com/todbot/circuitpython-tricks#prevent-auto-reload-when-circuitpy-is-touched
https://github.com/todbot/circuitpython-tricks#raspberry-pi-pico-bootpy-protection
https://gist.github.com/Neradoc/8056725be1c209475fd09ffc37c9fad4https://gist.github.com/Neradoc/8056725be1c209475fd09ffc37c9fad4
getting into Safe Mode with a REPL one-linerhttps://github.com/todbot/circuitpython-tricks#useful-repl-one-liners
https://github.com/todbot/circuitpython-tricks#using-the-repl
tiohttps://github.com/tio/tio
https://github.com/todbot/circuitpython-tricks#display-built-in-modules--libraries
https://github.com/todbot/circuitpython-tricks#turn-off-built-in-display-to-speed-up-repl-printing
https://github.com/todbot/circuitpython-tricks#useful-repl-one-liners
https://github.com/todbot/circuitpython-tricks#python-tricks
https://github.com/todbot/circuitpython-tricks#create-list-with-elements-all-the-same-value
https://github.com/todbot/circuitpython-tricks#convert-rgb-tuples-to-int-and-back-again
https://github.com/todbot/circuitpython-tricks#storing-multiple-values-per-list-entry
https://github.com/todbot/circuitpython-tricks#python-info
https://github.com/todbot/circuitpython-tricks#display-which-not-built-in-libraries-have-been-imported
https://github.com/todbot/circuitpython-tricks#list-names-of-all-global-variables
https://github.com/todbot/circuitpython-tricks#display-the-running-circuitpython-release
https://github.com/todbot/circuitpython-tricks#host-side-tasks
https://github.com/todbot/circuitpython-tricks#installing-circuitpython-libraries
https://github.com/todbot/circuitpython-tricks#installing-libraries-with-circup
https://github.com/todbot/circuitpython-tricks#copying-libraries-by-hand-with-cp
CircuitPython Library Bundlehttps://circuitpython.org/libraries
CircuitPython Community Bundlehttps://github.com/adafruit/CircuitPython_Community_Bundle/releases
https://github.com/todbot/circuitpython-tricks#preparing-images-for-circuitpython
displayio.OnDiskBitmap()https://docs.circuitpython.org/en/latest/shared-bindings/displayio/#displayio.OnDiskBitmap
adafruit_imageloadhttps://docs.circuitpython.org/projects/imageload/en/latest/index.html
https://learn.adafruit.com/creating-your-first-tilemap-game-with-circuitpython/indexed-bmp-graphicshttps://learn.adafruit.com/creating-your-first-tilemap-game-with-circuitpython/indexed-bmp-graphics
https://learn.adafruit.com/preparing-graphics-for-e-ink-displayshttps://learn.adafruit.com/preparing-graphics-for-e-ink-displays
https://github.com/todbot/circuitpython-tricks#online
convert2bmphttps://online-converting.com/image/convert2bmp/
https://cancerberosgx.github.io/magic/playground/https://cancerberosgx.github.io/magic/playground/
https://github.com/todbot/circuitpython-tricks#command-line-using-imagemagick
ImageMagickhttps://imagemagick.org/
https://github.com/todbot/circuitpython-tricks#command-line-using-graphicsmagick
GraphicsMagickhttp://www.graphicsmagick.org/
https://github.com/todbot/circuitpython-tricks#making-images-smaller-or-for-e-ink-displays
"-dither" optionshttps://legacy.imagemagick.org/Usage/quantize/#colors
https://github.com/todbot/circuitpython-tricks#nodejs-using-gm
gm libraryhttps://github.com/aheckmann/gm
https://github.com/todbot/circuitpython-tricks#python-using-pil--pillow
Python Image Library (PIL) fork pillowhttps://pillow.readthedocs.io/en/stable/index.html
https://github.com/todbot/circuitpython-tricks#preparing-audio-files-for-circuitpython
https://github.com/todbot/circuitpython-tricks#wav-files
https://github.com/todbot/circuitpython-tricks#mp3-files
https://github.com/todbot/circuitpython-tricks#getting-sox
http://sox.sourceforge.net/http://sox.sourceforge.net/
https://learn.adafruit.com/circuitpython-essentials/circuitpython-audio-out#play-a-wave-file-2994862-6https://learn.adafruit.com/circuitpython-essentials/circuitpython-audio-out#play-a-wave-file-2994862-6
https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/convert-fileshttps://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/convert-files
https://github.com/todbot/circuitpython-tricks#circup-hacks
circuphttps://learn.adafruit.com/keep-your-circuitpython-libraries-on-devices-up-to-date-with-circup?view=all
https://github.com/todbot/circuitpython-tricks#finding-where-circup-stores-its-files
https://github.com/todbot/circuitpython-tricks#building-circuitpython
"Building CircuitPython" Learn Guidehttps://learn.adafruit.com/building-circuitpython/build-circuitpython
already installed the system-level prerequisiteshttps://learn.adafruit.com/building-circuitpython/introduction
https://github.com/todbot/circuitpython-tricks#about-this-guide
QTPy Trickshttps://github.com/todbot/qtpy-tricks
taught classes in Arduinohttps://todbot.com/blog/bionicarduino/
tips-and-tricks https://github.com/topics/tips-and-tricks
circuitpython https://github.com/topics/circuitpython
qtpy https://github.com/topics/qtpy
pico https://github.com/topics/pico
itsybitsy https://github.com/topics/itsybitsy
displayio https://github.com/topics/displayio
itsybitsym4 https://github.com/topics/itsybitsym4
rp2040 https://github.com/topics/rp2040
raspberrypipico https://github.com/topics/raspberrypipico
Readme https://github.com/todbot/circuitpython-tricks#readme-ov-file
MIT license https://github.com/todbot/circuitpython-tricks#MIT-1-ov-file
Please reload this pagehttps://github.com/todbot/circuitpython-tricks
Activityhttps://github.com/todbot/circuitpython-tricks/activity
723 starshttps://github.com/todbot/circuitpython-tricks/stargazers
42 watchinghttps://github.com/todbot/circuitpython-tricks/watchers
76 forkshttps://github.com/todbot/circuitpython-tricks/forks
Report repository https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Ftodbot%2Fcircuitpython-tricks&report=todbot+%28user%29
Releaseshttps://github.com/todbot/circuitpython-tricks/releases
Packages 0https://github.com/users/todbot/packages?repo_name=circuitpython-tricks
Please reload this pagehttps://github.com/todbot/circuitpython-tricks
Contributors 3https://github.com/todbot/circuitpython-tricks/graphs/contributors
https://github.com/todbot
todbot Tod Kurt https://github.com/todbot
https://github.com/fabaff
fabaff Fabian Affolter https://github.com/fabaff
https://github.com/CCR010
CCR010 https://github.com/CCR010
Python 99.5% https://github.com/todbot/circuitpython-tricks/search?l=python
Shell 0.5% https://github.com/todbot/circuitpython-tricks/search?l=shell
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.