Getting Started
Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.
The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.
Click here to learn more about Adafruit Playground and how to get started.
-
No-Code Easy Ambient Smart Lights Overview
With all the newest features of Adafruit IO, WipperSnapper firmware, and the new Blockly Actions, you can create really complex projects without writing a single line of code. I've been working on a couple versions of smart lights to notify me of different things using NeoPixels. This project will focus on a super easy smart ambient lighting system that you can stick to the back of your computer monitor.
Components
Using just a few Adafruit components is all you need to create a really simple, but pretty powerful little notification system. We are gonna use a QT Py ESP32-S2 WiFi Dev Board to talk to Adafruit IO, a NeoPixel BFF for the QT Py, and finally a short NeoPixel strip with a JST connector pre-attached (so you can connect right up to the BFF board.
The only soldering you will need to do is to attach the boards together. You can solder the boards together with the included pins, or pick up some female headers so you can detach the boards and use them on any future projects.
-
Monitor Indoor Air Quality with Blues, IFTTT, Adafruit IO and a Hue LED Strip If you're working an office job, you're...in an office. Whether that's in your home or not, I'm going to hazard a guess that it's also indoors - and being indoors for an extended period of time without well-ventilated spaces can legitimately lead to low air quality (and in theory health issues).
Now, I'm not hear to spread fear and make you all think you're dying a slow death by breathing in your co-worker's exhalations. However, I am here to show off an easy way to build a cloud-connected indoor air quality system with:
- A variety of Adafruit air quality sensors.
- A Blues Notecard to cloud-connect the project with LTE connectivity.
- Adafruit IO to visualize air quality data and integrate with other services.
- A Philips Hue LED strip to provide real-time visuals for low air quality alerts.
-
A Node Based CAD Add-in for Fusion 360 Gradient is a node-based editor designed for use with Autodesk Fusion 360.
I started working on Gradient after playing with the node based geometry in Blender. The nodes in Blender are fantastic (frankly they work much better than mine do right now) but I wanted to create algorithmically defined geometry right in Fusion 360 using solids and surfaces which are better suited to making 3D models for technical and engineering parts. I wanted to be able to make algorithemic structures that are user defined but and can be finely controlled and tuned to the design needs.
Models like this would be very time consuming to model by hand. However they can be quickly generated and re-generated with different parameters or random seeds.
If you are interested in trying Gradient for yourself you can download it from the github repository below. Please be aware currently Gradient is in an early development stage, meaning only a small fraction of its functionality has been implemented, and there are likely a few bugs to sort through.
-
Digital Clock with WiFi and Weather (Huzzah & 128x64OLED) I had an Adafruit Huzzah and an OLED FeatherWing 128 x 64 in my box of goodies and decided to make a smart digital clock for my study.
The clock is connected to internet via WiFi, synchronises the time and via an api displays the temperature in my area. It is set to update every 5 minutes. Also displays an icon of the current weather.
These are parsed from the api response:
{"coord":{"lon":yyyyyy,"lat":xxxxx},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"base":"stations","main":{"temp":1.03,"feels_like":-1.33,"temp_min":0.57,"temp_max":2.64,"pressure":1039,"humidity":76,"sea_level":1039,"grnd_level":1034},"visibility":10000,"wind":{"speed":2.06,"deg":170},"clouds":{"all":0},"dt":1738790391,"sys":{"type":1,"id":1440,"country":"GB","sunrise":1738742403,"sunset":1738773892},"timezone":0,"id":3333224,"name":"xxxxxx City","cod":200}Next I created a 3D printed bezel that allowed me to fit the stacked boards in my workbench pannel.
-
Zephyr Quest: ST7789 Display with Feather RP2350 As part of a series on Zephyr with Adafruit hardware, this guide shows how to configure Zephyr to use an ST7789 TFT display with a Feather RP2350. By connecting the display with a breadboard, we can use a logic analyzer to verify that the Zephyr display driver pin configuration agrees with the CircuitPython display driver. This guide is meant for people interested in adding support for Adafruit displays to Zephyr.
Parts
-
supervisor.runtime.display in CircuitPython 9.2.5+ CircuitPython 9.2.5 adds a new property to the supervisor Runtime object,
display.If your board has a built in display that is automatically configured by the CircuitPython core (e.g., boards like the Feather ESP32-S3 Reverse TFT), then this display is available as
supervisor.runtime.displayin addition toboard.DISPLAY.So what's different about the new
supervisor.runtime.display?- This property is available on all boards that support
displayio, not just boards with built in displays - Unlike
board.DISPLAY, this property is settable, and remembers its value after your code file finishes running. This means you can set this property once in boot.py and then use the display each time yourcode.pyruns, or re-use a display set by a previous run of code.py. - Due to technical limitations in CircuitPython, when a display is released,
board.DISPLAYbecomes a "None-like object": one that prints asNonebut fails the checkboard.DISPLAY is None.supervisor.runtime.display is Noneworks correctly to check whether a default display is configured.
Setting
supervisor.runtime.displayThere are two approaches:
- Do it unconditionally in boot.py and depend on this in code.py
- Do it conditionally in code.py, if
supervisor.runtime.display is None
... in boot.py
Here's a code snippet that shows configuring a 240x240 ST7789 display connected to an EyeSpi BFF on a QT Py board like the QT Py RP2040:
- This property is available on all boards that support
-
Media hub: Media control w/opt Bluetooth Overview
Physical controls for a more enjoyable media playback experience.
Features
- Responsive volume knob & mute button.
- Transport controls (play/pause, stop, FF/REW, skip tracks).
- Pair up with your favourite Bluetooth® speakers.
- Quick, physical connection (don't have to go through menu system to pair with keypad & speakers).
- Customizable controls/scheme.
- Customizable setup: Optionally connect USB hub/dock for added features, for example:
- mirror phone to TV w/HDMI out: Watch videos on a bigger screen
- add keyboard: Better typing experience for texts/emails.
- Solderless project.
Main hardware
Program your device
To get your RP2040 macropad to act as a media controller, it needs to:
- detect keypresses and changes in the knob position
- send out corresponding keyboard messages to the attached USB host device (ex: a phone).
My own implementation for this "media hub" is written for Adafruit's CircuitPython, and can be found here:
- 💾 MediaController project README (see MediaHub_AFMacropad). 🚀 Installation instructions.
-
Zephyr Quest: SWD Pogo Adapter for CLUE As part of a series on Zephyr with Adafruit hardware, this guide shows how I made a pogo pin SWD debug probe adapter for the CLUE board so I can conveniently program it with Zephyr firmware. My other SWD option was soldering wires to the test points, but I like how pogo pins are neater and less fragile. This guide is meant for people interested in adding support for Adafruit boards to Zephyr. It might also be useful for folks who want to fix a bricked bootloader.
Overview
-
Zephyr Quest: Feather RP2350 Board Def As part of a series on Zephyr with Adafruit hardware, this guide shows how to write a Zephyr board definition for the Adafruit Feather RP2350 with an I2C SHT41 temperature and humidity sensor. Future guides will look more at using sensors and displays. This is intended for developers who want to know about adding support for Adafruit boards to Zephyr. If you just want to write CircuitPython code, you can safely ignore this stuff.
Overview
-
Weather Display Using Open-Meteo's API The OM Weather Display periodically updates and displays the following local weather conditions:
- Day, date, and time (AM/PM)
- Tomorrow's sunrise and sunset times
- Temperature
- Relative Humidity
- Wind speed and direction
- Wind gust speed
- Condition description and graphic icon
Location, time zone, and measurement units settings are stored in the
settings.tomlfile. Either "METRIC" or "IMPERIAL" measurement units can be specified.Weather condition query and internet clock refresh interval rates are set by parameters in the
code.pymodule. The default interval for updating weather conditions is 5 minutes. The local time is updated from the Adafruit Network Time Protocol (NTP) server hourly.The CircuitPython code runs on an ESP32-S3 4MB/2MB Feather attached to a 2.4-inch TFT FeatherWing. An optional ALS-PT19 ambient light sensor can be used to automatically adjust display brightness.
CircuitPython Code
The Weather Display's CIRCUITPY root directory contains the following files and folders.
- files:
- settings.toml -- Wi-Fi and location parameters
- om_query.py -- OM API URL query string builder
- who_to_map_icon.py -- parses the WMO weather code for descriptions and icons
- code.py -- the primary code module
- folders:
- fonts -- contains the font files
- icons_160x160 -- the weather icon bitmap graphics files
- lib -- the CircuitPython library modules
- sd -- a placeholder for the unused SD storage drive
A downloadable bundle of code files and folders can be found in the OM Weather Display GitHub repository.
-
Guide: Build a 'MiniMarquee' WiFi Text Scroller Materials
The following parts are used to build the MiniMarquee:
- QT Py ESP32-S2
- IS31FL3741 13x9 PWM RGB LED Matrix
- 50mm Stemma QT cable
- Black LED acrylic, 2-3 mm thick, cut to 41mm x 29mm
- 4 M2x12 nylon screws and nuts
- Little rubber feet
- Nitto double-sided adhesive tape (or other tape with similar adhesive strength)
- 2 1-ounce wheel weights (optional)
Installing Firmware
The MiniMarquee's firmware is written for Arduino in PlatformIO. There are two ways to install the firmware onto the QT Py ESP32-S2:
- Drag-and-drop UF2 installation
- Build source code and install onto device
The UF2 method is recommended, as it is very simple and does not require downloading any additional software or dealing with any code at all. However, if you wish to customize your MiniMarquee's firmware, you'll need to go for option 2 and build it from source.
-
CNC Rotary Encoder Internals I was working with one of Adafruit's CNC Rotary Encoders and made a mistake wiring. Well, long story short, I killed it. I am not sure exactly what I did, but I suspect I accidentally drove its outputs with an improper voltage.
To prevent the experience from being a total loss, I took the time to partially disassemble it.
The plastic cover around the screw terminals can easily be removed, exposing a PCB. 3 pins hold this PCB onto the rest of the assembly. After desoldering them, the component side of the board can be seen.
The board features a "7550" voltage regulator. The incoming supply is regulated down from whatever it is to 5V for the internal circuitry. C2 is the input smoothing capacitor, and C1 is the output smoothing capacitor.
D1 and D2 are light emitting diodes in series (likely IR) which are positioned under matching sensors in the upper part of the assembly. A "331" (330Ω) resistor limits the current through the LEDs.
The 3 soldered positions are a supply and 2 returns from the sensor package in the upper part of the assembly. Resistors R2 & R3 are pull ups, while caps C3 and C4 smooth out any spurious transitions of the signals. It seems most likely that the sensor assembly consists of two phototransistors, which can pull the pins of the "HC14", a schmitt-trigger inverter. This creates the signals A and B at a dependable logic level, and also the inverted A/ and B/ signals.
Diode D3 is a reverse current protection diode; in case VCC and GND are swapped, no current can flow. Interestingly it's on the GND side, while I thought it was more common to see on the VCC side.
If I cared to determine which component(s) I damaged, this is totally a board that could be reworked by hand. However, I don't plan to spend the time and instead will just pick up a fresh encoder from the store—and double check my wiring next time.
-
Greenhouse Temperature Logger This guide shows how to build cheap data loggers to help keep plants happy in greenhouses or other indoor growing spaces. I developed this design to help a community garden group control temperatures in greenhouses for starting new plants in winter. By charting the temperatures, we were able to identify and fix problems with air sealing and heater thermostat settings. This logger design uses manual data collection over USB serial because there is no WiFi at the greenhouses.
Wiring
If you are unfamiliar with soldering stacking headers, you might want to read:
Fritzing Diagram
This diagram shows the core circuit for the temperature logger, omitting the pin header and perma-proto stuff, and using a toggle switch to represent the jumper:
-
Getting Started with Zephyr on Linux This is for folks interested in learning about Zephyr. The first section shows, step by step, how to work through the Zephyr Getting Started Guide to install Zephyr on Linux, build the hello world sample, and run it on an Adafruit QT Py ESP32-S3. The second part has notes for tuning the default settings to use fewer resources for faster CI builds.
What are Zephyr and West?
The Zephyr Real Time Operating System (RTOS) provides an abstraction layer that helps make it easier to port applications like CircuitPython to boards from various manufacturers.
In theory, using an RTOS makes it easier to implement features using audio synthesis, graphic displays, HTTPS, MQTT, BLE, etc. By building on top of Zephyr APIs, rather than vendor-specific SDK APIs, application code can ignore some of the differences between microcontroller families. Zephyr helps with low-level hardware details and coordinating CPU time for concurrent tasks including application logic, hardware IO, network stacks, and number crunching.
Zephyr has a command line tool called
westto manage and coordinate the many tasks involved in working on a Zephyr project. Once you install west, you can dowest helpto see documentation on the available sub-commands.
-
Cedar Grove Weather Architecture v2.0 Overview
The initial version of the weather system architecture, known as the Display AIO Local Weather Conditions: MatrixWeather System, exhibited satisfactory performance. However, its reliability was compromised when multiple transmitter and receiver devices competed for access to the Adafruit IO (AIO) feeds. To mitigate access collisions, each independent device was meticulously designed to transmit or receive data at predetermined rates, which remained well below the AIO+ subscription rate limit of 60 data point transactions per minute. Nevertheless, due to the autonomous operation of each device, instances arose where two transactions would heterodyne, straining the limit and resulting in feed failures.
To address the reliability issue, the new architecture design transitioned from utilizing MQTT to the HTTP protocol. While MQTT facilitates relatively straightforward “subscription” to AIO feeds, HTTP offers greater control granularity, including a recently introduced feature enabling independent devices to monitor feed access activity. Collisions can be mitigated by monitoring the number of data point transactions remaining and waiting until a sufficient number are available for the queued transaction event.
The primary architectural modification was the incorporation of throttling. A secondary objective was to reduce the number of devices in the system by combining the existing Corrosion Monitor sensor with the REPEATER device, resulting in the creation of the novel Weather SOURCE device. The Weather SOURCE extracts local weather conditions from AIO+ Weather and integrates them with the local sensor’s temperature, humidity, dew point, and corrosion detection data. Subsequently, the Weather SOURCE publishes this information to a collection of standard AIO feeds.
The other devices within the system comprise displays that extract data from the AIO feeds. One display replaces the previously existing Workshop Corrosion LCARS Monitor (PyPortal M4), which was situated in the workshop, and is now designated as the Workshop Corrosion Monitor Display. The second display is the Living Room MatrixWeather Display (upgraded from a Matrix Portal M4 to the S3 version). Given that AIO feed access rates are monitored, it will be feasible to create additional task-specific displays, potentially for the studio or kitchen.
An advantage of the new architecture is that certain display devices will not require substantial PSRAM for retaining the extensive JSON file provided by AIO+ Weather, with the exception of a Matrix Portal. The singular Source device, equipped with a large PSRAM, extracts solely the essential information required by the displays and stores the extraction within the AIO feeds.
Weather Source
The primary source of AIO+ Weather and the local workstation temperature/humidity sensor employed for corrosion detection are the primary sources of data. These sensors transmit weather and local workstation conditions to AIO feeds in the client’s account, which are subsequently retrieved by display devices.
A new version of the Weather Source, the Nuevo Combined Weather Source device, will replace this version by late 2025.
CircuitPython code can be found in the
Weather_Source/bundlefolder of the CedarGrove Weather System repository.