The latest crop of smart displays from Adafruit, including PyPortal, PyBadge and PyGamer, have screens and an input method. This makes them all ideal for running a simple paint program using our favorite introductory language – CircuitPython. And if you received AdaBox 012, you have a PyGamer in your hands!
CircuitPython is a programming language based on Python, one of the fastest growing programming languages in the world. It is specifically designed to simplify experimenting and learning to code on low-cost microcontroller boards. Here is a guide which covers the basics:
You will want at least CircuitPython version 4.1 (possibly a beta version of it) for maximum graphics performance, it’s FAST!
All platforms have a palette on the left edge of the screen that contains 8 colors and two brush sizes. selecting a color changes the active drawing color, while selecting one of the brush cursors will change the drawing cursor as well as the size of the brush: 1 pixel square or 3 pixels square.
On the PyPortal, Use the touch screen to control the cursor. A simple stylus works really well for this. Touch on the palette to change the drawing color or brush. Touch anywhere else to place a spot of the current drawing color at the touched location. Moving while touching the screen will leave a trail. Recall that each time a change in touch location is detected, a line is drawn from the previous location to the new one. That means that if you move faster than the update cycle, you’ll get a polygon because points are relatively far apart. You can see this in the photo below. If you want a smooth curved line, move slowly.
8-6-2021 (August 6, 2021) is the Snakiest day of the year and it’s also this year’s CircuitPython Day! The day highlights all things CircuitPython and Python on Hardware. See you there!
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.