0

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!


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, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, 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.

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

CircuitPython 2019!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

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

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — The sustainability of open source software

Wearables — The final environment

Electronics — Voltage drop from cables

Biohacking — Three DIY Photobioreactor Designs for Algae Growing

Python for Microcontrollers — Python snakes its way to Codecademy, beta 7, games, calculators, turning 6 and more! #Python #Adafruit #CircuitPython @circuitpython @micropython @ThePSF @Adafruit

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.