• Skip to main content
  • Shop
  • Learn
  • Blog
  • Forums
  • IO
  • LIVE!
  • AdaBox
Adafruit Logo
0
  • Sign In | Create Account
  • Playground
  • Shop
  • Learn
  • Blog
  • Forums
  • IO
  • LIVE!
  • AdaBox
Sign In
0
Adafruit Logo
  • Learn Categories
    • 3D Printing
    • AdaBox
    • Adafruit Products
    • Arduino Compatibles
    • Breakout Boards
    • Circuit Playground
    • CircuitPython
    • CLUE
    • Community Support
    • Components
    • Crickit
    • Customer & Partner Projects
    • Development Boards
    • Educators
    • EL Wire/Tape/Panel
    • Feather
    • Gaming
    • Hacks
    • Internet of Things - IOT
    • LCDs & Displays
    • LEDs
    • Machine Learning
    • MakeCode
    • Maker Business
    • micro:bit
    • Microcontrollers
    • Programming
    • Raspberry Pi
    • Robotics & CNC
    • Sensors
    • STEMMA
    • Tools
    • Trellis
    • Wearables
    Explore, Groups to get your gears turning
    Explore
    Groups to get your gears turning
    Explore Groups
  • New Guides
  • Playground
Sign In to create your own notes.

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.

New
Featured
  • Image for user danak
    By danak
    Fruit Jam Remote Control & the Power of the Community

    Just got a Fruit Jam and have been learning a lot - so many cool components wrapped into a neat little package. 

    One of the goodies included is an IR receiver that is available as board.IR, so I thought it might be neat to send commands to the Fruit Jam with a remote control. This is a quick look receiving input from a remote control. But this article is also a lesson on the power of the Adafruit CircuitPython community. 

    First, the parts for the project:

    I used a couple of odd remotes I had laying around and in fact I have two remotes coded in. 

    The Fruit Jam Learn Guide doesn't address coding the IR receiver, but there are other guides for getting IR signals. I started with:

  • By SamBlenny
    Pasting in Hard Mode with VNC and SSH

    My main computer is a Mac, but I run third party dev tools on a separate Debian box so they can't mess up my main computer. To control the Debian box from the Mac, I use SSH and VNC over Ethernet. The VNC session runs an Xfce desktop environment.

    Mostly the remote control setup works great, but it's a pain to copy from macOS and paste to apps running in Xfce (macOS Screen Sharing VNC client app doesn't do clipboard sync). For example, suppose I want to copy text from Chrome on the Mac and paste it into VS Code on Debian. Since I can't paste directly into the VNC client, I must go through an SSH shell where pasting works fine.

    In the past, I've used SSH to paste into vim and make a temporary file. But, today I figured out a better way where I can send text directly to the Xfce clipboard from my SSH shell:

    Notes:

    1. If you don't already have xclip installed, you'll need to sudo apt install xclip
    2. The cat <<'EOF' stuff is using bash's heredoc string syntax. Note that in this case the single quotes around EOF are telling bash not to do its normal variable substitution. This is useful if you want to copy and paste code that includes bash variable syntax, perhaps as part of a Makefile. In this case, ${WHATEVER} will get passed through to xclip rather than being evaluated as a variable substitution by bash.
    3. I have TigerVNC server configured to set DISPLAY to :1. Since the instance of bash that's running in my SSH shell is is not part of an X session, it doesn't know about TigerVNC's display. I have to tell xclip which DISPLAY to use, otherwise it would get mad and complain with an error message.
  • By mrklingon
    *Really*, No one needs this calculator...

    Seriously - this calculator was fun to program - but I freely admit it's not a practical tool.

    My first computers were mechanical. There was the  "Think-a-Tron," then "Digicomp I" and finally "Digicomp II." Of those, only the Digicomp I was actually programmable. Think-a-Tron was a sort of punch card reader and Digicomp II was a mechanical binary calculator using marbles.

    The Digicomp II included examples of things the calculator could do - including Newton's method for calculating roots, and that is what this project is for.

    This is a simple calculator that can calculate square and cube roots using Newton's method.

    Set the switch LEFT to calculate ***square*** and RIGHT to calculate ***cube*** roots.

    * Press A to calculate the root of the current target (Default target is "2").
    * Press B to play back the current root (2 or 3), then target value, finally display the current root found.
    * Press A+B to randomly choose (and display) a new target value (2-1000)
    * Touch A1 to display the most recent root found.

      File: Root.js - Javascript version of Circuit Playground code
      Makecode Block version here: https://makecode.com/_b3z9Vi18vcFW

    Numbers are displayed by lighting the Neopixels green digit-by-digit (i.e. 3 pixels = "3", 6 pixels = "6" and so on). All digits purple indicate a decimal point and "0" is all pixels turned yellow.

  • Image for user relic_se
    By relic_se
    Fruit Jam Ssspeed Dating

    Overview

    Tired of all the action and puzzle games on the Adafruit Fruit Jam? Want to try something new? Well, you've got a treat in store for you with the new game, Ssspeed Dating. Dive into a world full of fun snakes looking to spice up their lives by meeting someone new. Chat with 6 unique characters during quick-fire speed dating rounds hosted by the familiar CircuitPython mascot, Blinka, and do your best to charm the snake of your dreams.

    Controls

    Mouse

    You can control all aspects of this application using a USB mouse to control the on-screen cursor. All actions are completed with a left click. Some events require that an object be hovered over and then clicked while others you can click anywhere on the screen to proceed.

    In order to exit while playing the game, click the door icon in the top right corner. This will bring up a confirmation prompt which will return you back to the title screen. At this point, you can reload the device by clicking the "Quit" option on the title screen. If the application is installed within Fruit Jam OS, it will return to the main menu of the operating system.

    Keyboard

    A standard USB keyboard or REPL prompt can be used to control all aspects of this application.

    Key Action
    Arrow keys Navigate menus and dialog options
    Enter or space Select highlighted item or continue to next dialog
    Escape Open exit prompt to return to title screen
    Letter keys (upper/lower) If on-screen keyboard is active, appends character to input
    Backspace If on-screen keyboard is active, remove last character from input

    Buttons

    The 3 buttons on the Fruit Jam device can be used for basic control of this application.

    Button Action
    Button #1 Select highlighted item or continue to next dialog
    Button #2 Navigate down menus and dialog options
    Button #3 Navigate up menus and dialog options

    Gamepad

    USB gamepads are currently not supported but planned to be added in a future release.

    Screen capture of the title screen of the Ssspeed Dating game
  • By sdkjfgjdskjlflhdsjkgf
    BabyPod

    When my family was expecting, I started to look for baby tracking software I could host myself. I didn't want to share my data with anyone else and wanted to easily integrate with my data, like I did with my MatrixPortal case. I came across Baby Buddy which is a web-based tracker for babies' sleep times, feedings, diaper changes, and more. It has an easy-to-use REST API and lets me poke around directly in its database for other things that the API can't do.

    It worked great, but the last thing I wanted to do was fumble around tiredly with a phone or laptop while trying to do something quick with my hands full, like save a feeding or diaper change. So I came up with BabyPod: a device that would only do simple things for baby tracking, have a battery that would last for days, and have an easy to use interface. The name is inspired by an iPod's click wheel because that's the main interface: a rotary encoder.

    The software is written in CircuitPython and it went from a simple project to a big one. I added support for working offline by saving data temporarily to an SD card, so it would still work while we were away from Wi-Fi. I continually tweaked the UX based on real-world experience. I printed several BabyPods and put them throughout the house, and tweaked the hardware design with each new iteration.

    Eventually I published both the hardware and software to GitHub. It was very rewarding to see people building their own and submitting issues!

    The main technologies I used:

    • CircuitPython for all the code running on the ESP32-S3
    • Baby Buddy running on a home server
    • OpenSCAD for the 3D model
    • Fritzing for the wiring diagram

    See the GitHub hardware repository to build your own and the software one for the source code that runs on it. Below, I listed the Adafruit components that go into it. At first I used Adafruit's 20x4 LCD with a backpack, but the LCD by Sparkfun draws faster, takes up less space, uses less wiring, and is CircuitPython compatible, so I switched over to that in later versions of the hardware.

    A 3D printed rectangular box with an LCD screen showing various menu items for tracking baby statistics
    An assembled and running BabyPod
  • By sdkjfgjdskjlflhdsjkgf
    Busy Buttons - noisy glowy buttons for babies and toddlers

    I had a collection of spare parts from Adafruit laying around. My toddler loves mashing buttons, particularly ones that make noise, so I decided to turn those spare parts into something they'd enjoy. As for my own sanity, it'll diminish as the sounds play relentlessly, but I built in a secret "mute" cheat code. I used Adafruit's arcade buttons which can withstand a lot of toddler smashing and used a massive battery so it'll almost never need charging.

    You can view more about the project on Printables and see the source code and instructions on GitHub to make your own. The enclosure is 3D printed and the software runs on an ESP32-S2 Feather with CircuitPython.

    As a much more advanced project, I also created BabyPod: an interface to Baby Buddy written in a lot of CircuitPython.

    A 3D printed box of glowing arcade buttons that play sounds
  • By jgmangum
    A Neopixel Floor Lamp with a Twist

    This is probably the coolest thing I have built with Adafruit electronics!  When I viewed the learn guide describing the Floor Lamp with NeoPixels and WLED Custom Animations by Erin St Blaine I knew that I just had to build this work of art.  I tend to like building things with wood, so my adaption of Erin's design for the most part replaces some elements with wood structures.  I was pleasantly surprised with the results!

    Materials

    For the most part I followed Erin's design.  My parts list is as follows:

    LED Floor Lamp
  • By SamBlenny
    CircuitPython Core Dev & Debug Tricks

    This is an evolving collection of tips and tricks about working on the CircuitPython core and related libraries. Topics include code analysis and debugging, working with git and GitHub, maintaining documentation, and install/config for dev tools. Mostly these are notes to future-me, but perhaps they will also help other people who want to improve CircuitPython.

    Control Flow Graphs

    When you're getting started working on a new-to-you module of complex code, it can be pretty hard to build a picture in your head of how the code works just from reading the text. Fortunately, there are tools which can analyze source code and build actual pictures for you with directed graphs of which functions call which other functions.

    Below are some examples of how I've been generating graphs of control flow between the various functions in CircuitPython's usb module and TinyUSB library dependency. To make the graphs, I use Debian with the cflow code analysis tool to generate a graphviz (.dot) graph file, then turn that into a PNG image to view with the mirage image viewer. For mirage to work, you need to run the last command in a terminal in X (vnc or physical display will work, but not ssh).

    shared-bindings/usb/*

    control flow graph of c code generated with cflow and graphviz
  • By SamBlenny
    Fruit Jam Two Gamepad Demo

    This is my third iteration of a CircuitPython USB host gamepad tester, now with support for two controllers. The main loop in code.py uses asyncio to improve code readability. There's a new boot keyboard to gamepad mapper. For hot-swapping controllers, I devised an unplug detection heuristic to work around limitations in the current CircuitPython USB host implementation. Player numbers get assigned according to Fruit Jam top plate silkscreen port numbers. Player 1 gets USB 1, and Player 2 gets USB 2.

    This demo project is meant to help folks who want to make Fruit Jam libraries for writing games. I don't plan to make a library on my own, but I wrote this code with library-making in mind in case somebody else wants to. Note that some of the performance and stability workarounds included here may become unnecessary once USB host implementation bugs get fixed.

    The code here was written and tested with CircuitPython 10.0.0-beta.2 on a rev D Fruit Jam that I bought from the first production batch that went up in the shop.

    Related work:

    • Fruit Jam Gamepad Tester guide (my previous gamepad tester)
    • Fruit Jam Fruitris (Tetris) game guide by @relic-se
    • Feather TFT Gamepad Tester with Sprites guide (my original gamepad tester)

    Overview

    Screenshot of Fruit Jam DVI display showing two gamepad button-press visualizers
  • Image for user relic_se
    By relic_se
    Fruit Jam Fruitris (Tetris)

    Parts

    I am using a production revision D Fruit Jam board. Most additional components can likely be found around the house such as HDMI cable & display, headphones, power supply, etc. The controller system is designed to be as compatible as possible. So, most USB controller devices should work or even a USB keyboard.

    It is possible to use a Metro RP2350 which is discussed in learn guides such as Larsio Paint Music., but this guide will not discuss that procedure nor has the software been tested within that environment.

    From the Adafruit Shop

    Controls

    Action Keyboard Gamepad Buttons
    Move Left Left Arrow Left
    Move Right Right Arrow Right
    Rotate Clockwise Up Arrow or X Up or A Button #2
    Drop: Soft Down Arrow Down Button #1
    Drop: Hard Z B
    Quit (reload) Enter Start Button #3
    Screen capture of Fruitris gameplay
  • By cjames53
    TactileAudio Project: Four-Channel Touch-Sensitive Audio Player

    Audio Adaptor Board

    Order 1 (required)

    Teensy 4.1 Board

    Order 1 (required)

    tactile-audio.jpeg
  • By mrklingon
    Build a Brain in your NeoTrinkey!

    BuildABrain

    Simple expert system for NeoTrinkey - yes/no questions, inspired by https://en.wikipedia.org/wiki/20Q

    This project lets you put a simple expert system into your neotrinkey! The "brain" will ask yes/no question - touch pad #1 for "Yes" and pad #2 for "No"

    Github archive *here*

    Uncomment the dataset you want - this is shipped with a Star Wars set and Star Trek.

    #from SWBrain import * #for Star Wars dataset
    from STBrain import *  #for Star Trek dataset
    

    Here's how the Star Trek set was designed:

    Basically, sketch out the decision tree, then number each node. Create a "yes" and "no" array that links each node to the next node (if any).

    #Data in nodes for Star Trek info
    
    Words = ["Think of someone from Kirk's Enterprise.","Gold uniform", "Captain", "Blue Uniform", "Kirk", "Russian", "Vulcan", "Male", "Chekov", "Sulu", "Spock", "Scotty", "Uhura", "Male", "Are they dead","McCoy", "Chapel"]
    
    Yes = [0, 2, 4, 6, 0, 8, 10, 11, 0, 0, 0, 0, 0, 15, 0, 0, 0 ] #node for yes answers
    No = [0, 3, 5, 7, 0, 9, 13, 12, 0, 0, 0, 14, 0, 16, 0, 0, 0 ] #node for no answers
    

    note: the zeroth node should be the introduction, for Star Trek it's "Think of someone from Kirk's Enterprise."

    Files:

    • BuildABrain.py - copy to code.py on NeoTrinkey

    • STBrain.py - Star Trek data

    • SWBrain.py - Star Wars data

    • prt.py - lets you redirect output via HID output, just set REPL=False

      Note: if REPL=False the program will blink Neopixels until you touch one of the pads.

    Here's how it looks in action:

    Think of someone from Kirk's Enterprise.
    Gold uniform?
    No
    Blue Uniform?
    Yes
    Vulcan?
    Yes
    Spock?
    Yes
    I was right!
    let's try again
    Think of someone from Kirk's Enterprise.
    Gold uniform?
    No
    Blue Uniform?
    No
    Male?
    Yes
    Scotty?
    No
    Are they dead?
    No
    Maybe you should talk to my programmer!
    

    Give it a try - see if you can build a brain for you NeoTrinkey!

    image showing decision tree for Star Trek "brain"
  • By emmby
    Watch Tower - Radio controlled watch transmitter

    There are some beautiful radio-controlled watches available these days from Citizen, Seiko, Junghans, and even Casio. These timepieces don’t need fiddling every other month, which is great if you have more than one or two and can never remember what comes after “thirty days hath September…”

    In the US, these watches work by receiving a 60-bit 1-Hz signal on a 60-kHz carrier wave broadcast from Fort Collins, Colorado called WWVB. The broadcast is quite strong and generally covers the entire continental US, but some areas of the country can have unreliable reception. I live in the SF Bay Area in an area with high RF noise and my reception can be spotty. My watches sync often enough that it’s not an issue 363 days out of the year, but sometimes they can miss DST shifts for a day or two. The east coast is known to be even more challenging.

    Wouldn’t it be great if anyone could set up a little repeater to transmit the time so their watches were always in sync?

    WWVB has been around awhile and there have been various other projects (1,2) that have demonstrated the feasibility of making your own WWVB transmitter. But these all had very limited range. I wanted to build something that could cover my whole watch stand and be based on a more familiar toolset for the typical hobbyist, namely USB-based 32-bit microcontroller development boards, WiFi, and Arduino. My goal was to make something approachable, reliable, and attractive enough it could sit with my watch collection.

    Is this legal?

    The FCC requires a license to transmit, but has an exemption for 60 kHz transmitters as long as the field strength is under 40 μV/m40 μV/m at 300 meters. You will definitely not exceed this limit 💪🏼

    The Watch Tower
  • By Foamyguy
    USB Cipher Machine

    Historically it's been common for militaries to use purpose built mechanical cipher machines like the well known Enigma Machine, or the more mundanely named M-209. Ever since I learned about these devices they fascinated me. This project is a small toy cipher device inspired by them albeit made with a microcontroller instead of mechanical parts and pieces. 

    I showed this project on Show & Tell, the video is embedded below.

    Hardware

    Fizz Buzz cipher machine showing the clear text message "python"
  • By SamBlenny
    Fruit Jam Portable MIDI Synth

    [Update 2025-10-13: revised for CircuitPython 10.0.1, including a fix for the stuck notes issue]

    This is a minimalist polyphonic square wave synth for Fruit Jam that's intended for portable use with a USB power bank. The only output is audio to the board's headphone jack. The only input is from a USB MIDI controller connected to the board's USB host port. To set the volume, you can edit the code.

    The main interesting thing about this project is that it demonstrates how to make a CircuitPython synth with MIDI events coming from the USB host interface rather than a USB device interface or UART MIDI. Also, this works as a good stress test of the CircuitPython USB host stack in combination with audio output using I2S and synthio.

    This code was developed and tested on CircuitPython 10.0.0-beta.0 with a pre-release rev B Fruit Jam prototype which uses a different I2S pinout from the current rev D boards. Keep in mind that what's written here may be out of date by the time CircuitPython 10.0.0 is released and the production revision of the Fruit Jam board becomes available in the shop.

    Related guides: Fruit Jam USB Host MIDI Tester, Fruit Jam Gamepad Tester

    Transparency note: Adafruit provided the Fruit Jam rev B prototype board I used for this guide (Thanks Adafruit!).

    Overview

    photo of a battery powered synth with MIDI keyboard and earbuds
To have your work shown off click the Show and Tell toggle when viewing your note.
  • First
  • Previous
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • …
  • Next
  • Last
348 notes and counting
Search

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.

    • Contact Us
    • Tech Support Forums
    • FAQs
    • Shipping & Returns
    • Freebies
    • Terms of Service
    • Privacy & Legal
    • Website Accessibility
    • LLMs.txt
    • About Us
    • Press
    • Educators
    • Distributors
    • Jobs
    • Gift Cards
    "Simplicity is the ultimate sophistication"
    Leonardo da Vinci
    Adafruit Logo
    A Minority and Woman-owned Business Enterprise (M/WBE)