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!


Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

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

CircuitPython in 2018 – Python on Microcontrollers is here!

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 — Rethink Robotics closes shop. Long live collaborative robots #makerbusiness

Wearables — Zip it up

Electronics — Serial overkill

Biohacking — Biohacking Resources – Books, Talks and Podcasts

Python for Microcontrollers — CircuitPython creates new assistive tech opportunities

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.