LED Matrix Painter with Joystick #3DPrinting #3DThursday

Universal Joystick – Drawing on the matrix from Chris Schmitz on Vimeo.

This is a bit of a tangent for the joystick project, but I hit an itch an needed to scratch it.

Once I wrote the code for moving a cursor LED around on the matrix I immediately wanted to use it to draw. In my normal higher level languages this wouldn’t have been an issue, but I didn’t realize that C++ doesn’t have a concept of array push/pop/slice natively which made the idea of tracking the “on” state for multiple LEDs in the grid a bit more difficult.

Yeah I could have brought in a library to add the push/pop/slice functionality, but this is a learning exercise for me so I wanted to figure it out without the additional library.

So, I though out a way of translating the x,y of the cursor into an integer and using that to refer to a specific index of an array to track the on/off state of all LEDs in the matrix.

I grappled with it a bit and in the end figured out a decent way of handling it (which I’m sure I could have looked up somewhere but again, I’m using this as a learning exercise).

See more!


649-1
Every Thursday is #3dthursday here at Adafruit! The DIY 3D printing community has passion and dedication for making solid objects from digital models. Recently, we have noticed electronics projects integrated with 3D printed enclosures, brackets, and sculptures, so each Thursday we celebrate and highlight these bold pioneers!

Have you considered building a 3D project around an Arduino or other microcontroller? How about printing a bracket to mount your Raspberry Pi to the back of your HD monitor? And don’t forget the countless LED projects that are possible when you are modeling your projects in 3D!


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


No Comments

No comments yet.

Sorry, the comment form is closed at this time.