Having recently moved, all my arduino gizmos and 3d printers are packed away in the garage. (sadface!) I figured in the interest of keeping my blog going, I'll shift gears a little bit. I recently accepted the position of Senior Frontend Developer at a very well funded "startup" backed by an age-old brick and mortar. This means I'll finally be able to shed much of the "burden" that being a Coldfusion developer has created in my career.
I've been a fan of Javascript for a loooong time. I remember making "dynamic" pages with lots of iframes and some very cryptic code. It's aged well over the years with many new tools and several shifts in the overall mindset of its application. Along came jQuery and I was in love - write less code?! I'm in. The newly-wed stage lasted for a few years and other trends came and went. After attending some conferences that were less coldfusion-centric, my interest was ignited again when I was introduced to the world of "full stack javascript" and MV* frameworks for the front end.
I worked on several projects with NodeJS, then introduced MongoDB, then AngularJS. I really started to sink my teeth into Angular! Suddenly, I was writing large chunks of functionality with very few lines of code!
I'm looking forward to writing more about the tools I'll be using in my new position, so please stay tuned!
Billie Blaze
Programming -/- Electronics -/- 3D Printing -/- CNC robots -/- Synthesizers
Tuesday, April 29, 2014
Monday, April 7, 2014
Mozzi - Arduino synthesis at its best!
It's been a little while since my last post, and I didn't want to neglect my blog! I've been making good progress (considering how little time I've had available lately) on my RGB Matrix Button Pad. I've got the LED's sorted, and I've got the buttons reading in data (altho, it doesn't seem quite right). So, the next step there is to implement whatever serial protocol i decide on (likely will be arduinome variant).
I ran across this library today during my routine geek searches. It's called Mozzi (http://sensorium.github.io/Mozzi/) and it looks pretty cool indeed!
From the Mozzi Homepage:
How cool is that?! Implementing oscillators, envelopes, filters and more, with a very simple, streamlined arduino library. I absolutely cannot wait to get my hands on it!!
I ran across this library today during my routine geek searches. It's called Mozzi (http://sensorium.github.io/Mozzi/) and it looks pretty cool indeed!
From the Mozzi Homepage:
Currently your Arduino can only beep like a microwave oven. Mozzi brings your Arduino to life by allowing it to produce much more complex and interesting growls, sweeps and chorusing atmospherics. These sounds can be quickly and easily constructed from familiar synthesis units like oscillators, delays, filters and envelopes.
You can use Mozzi to generate algorithmic music for an installation or performance, or make interactive sonifications of sensors, on a small, modular and super cheap Arduino, without the need for additional shields, message passing or external synths.
How cool is that?! Implementing oscillators, envelopes, filters and more, with a very simple, streamlined arduino library. I absolutely cannot wait to get my hands on it!!
Saturday, March 29, 2014
More LED Matrix shenanigans!
It's been about two weeks since my last post. It took a few nights to wire the sparkfun button pads, and a few more days for various parts, but "we have lift-off"!! The wiring really got stupid, fortunately I had a ton of leftover cuttoff wire from 3d printers! I used some protoboard which connects to the button pads via header / connector, then i wired up R/G/B/Row/Button connectors. This literally took me 3 sessions of 2-3 hours each. be patient, tin EVERY wire and double check each joint!
After wiring it all up, I realized I didn't have anything to connect this to my breadboard! So i ordered some pre-wired 8 pin connectors, and after a few hours of tinkering (mostly trying different wiring schemes mentioned in the code), I had a few blinky lights!
I'd originally encountered the "Demystifying the TLC5940" ebook and code which got me pretty close, but my row scanning setup was slightly different. A little more googling lead me to nearly exactly what i needed!
https://github.com/jblang/tlc5940demystified
This guy is using a similar shift register setup to select rows. He's using a shift register / transistor in one combo device. I'm using 74HC164 which allows you to shift out w/out the use of a latch pin, and that powers TLC59213 to source the current for the LED's. I ran the clock of the 164 to the clock of the 59213, adjusted some pins in the code and got what you see above!
Now, this is certainly progress, but its not entirely correct. First off, he's only using a Red/Green matrix, I need one more color! From what I can tell, in his wiring, he's doing R-G-R-G, etc. He's also only using 1 TLC5940. On mine, I'm doing 1-TLC5940 for each color - RRRRRRRRRRRRRRRGGGGGGGGGGGGGGGBBBBBBBBBBBBBB.. I found getting this sorted was just a matter of changing some of the math that selects the pins. A few more quick changes, and I had both his Plasma and Scoll functions working well!
I've made a fork of the above project on GitHub which can be found here:
https://github.com/billieblaze/tlc5940demystified
Next, I'll be adding some of the Adafruit GFX library functionality and integrating my button row scanning!
After wiring it all up, I realized I didn't have anything to connect this to my breadboard! So i ordered some pre-wired 8 pin connectors, and after a few hours of tinkering (mostly trying different wiring schemes mentioned in the code), I had a few blinky lights!
I'd originally encountered the "Demystifying the TLC5940" ebook and code which got me pretty close, but my row scanning setup was slightly different. A little more googling lead me to nearly exactly what i needed!
https://github.com/jblang/tlc5940demystified
This guy is using a similar shift register setup to select rows. He's using a shift register / transistor in one combo device. I'm using 74HC164 which allows you to shift out w/out the use of a latch pin, and that powers TLC59213 to source the current for the LED's. I ran the clock of the 164 to the clock of the 59213, adjusted some pins in the code and got what you see above!
Now, this is certainly progress, but its not entirely correct. First off, he's only using a Red/Green matrix, I need one more color! From what I can tell, in his wiring, he's doing R-G-R-G, etc. He's also only using 1 TLC5940. On mine, I'm doing 1-TLC5940 for each color - RRRRRRRRRRRRRRRGGGGGGGGGGGGGGGBBBBBBBBBBBBBB.. I found getting this sorted was just a matter of changing some of the math that selects the pins. A few more quick changes, and I had both his Plasma and Scoll functions working well!
I've made a fork of the above project on GitHub which can be found here:
https://github.com/billieblaze/tlc5940demystified
Next, I'll be adding some of the Adafruit GFX library functionality and integrating my button row scanning!
Labels:
74hc165,
adafruit,
avr,
gfx library,
keypad,
led matrix,
rgb led,
tlc59213,
tlc5940
Friday, March 14, 2014
Spectrum Analyzer with Arduino + Adafruit 16x32 RGB Matrix!
As you may have noticed, I've been toying around with tons of LED's and looking at ways they apply to the user interface of music machines. One of the first use cases I had for an LED matrix was a spectrum analyzer! Obviously, this is nothing new and the ground work has totally been laid out by a bunch of people smarter then I, but its interesting none-the-less.
I came across three projects I found interesting
I came across three projects I found interesting
1) 32 x 16 led matrix arduino spectrum analyzer
Pretty cool, but no source available.. looks like a pretty solid refresh rate though. Some detail about its workings in the comments
This one uses the "LoL" shield and SURPRISINGLY, uses an 8-bit version of fix-fft to do the FFT calculations ON THE ARDUINO! This is amazing to me, seems like everyone insists you can't do it. I suppose in this situation theres some "good enough" moments in resolution to be expected, but it still makes for some super cool possibilities in LED, Audio and beyond!
2) Arduino / Processing Audio Spectrum Analyzer
This one has source code (yay). It uses processing on the pc to do the FFT. This is the basic configuration I've got setup in my first video which is my implementation. On mine, I'm just capturing off the mic on my laptop, but you can target pretty much any output. I'd like it to be sort of a stand alone audio device, which leads me to...
3) LOLShield Spectrum Analyzer
This one uses the "LoL" shield and SURPRISINGLY, uses an 8-bit version of fix-fft to do the FFT calculations ON THE ARDUINO! This is amazing to me, seems like everyone insists you can't do it. I suppose in this situation theres some "good enough" moments in resolution to be expected, but it still makes for some super cool possibilities in LED, Audio and beyond!
Putting it all together
The first piece of the puzzle in #2 is the processing sketch. I'd never used processing, but figured wth, may as well install it with the other 10^25 development tools I've got on here. I'd known that arduino was either written with, or based on processing - much to my surprise, it looks almost identical. I was able to get the sketch running and sending serial data to my arduino, so now I had to look at the arduino sketch itself.
The code on the instructable got my pretty close, but I'm using the Nootropic RGB Matrix backpack for the Adafruit LED matrix. This is a little different then the instructable, but I'm not scared. Adafruit provides two libraries that I used. The first handles the matrix intricaies itself, spi data going to a bunch of chips on the matrix itself. The second deals w/ the graphics aspect, drawLine, drawPixel, print, etc. I was able to quickly refactor the GFX lib in, but I had a few problems along the way.
1) The original code used an array of 16 bit ints. Any time i operated on that, the sketch crashed. It actually used two - the other was a temp array to check if columns needed to be updated. Seems like it just blew out the memory constraints as soon as it started?
2) I couldn't get the arduino to actually start on the srial data, or maybe i might have if i didn't get so tripped up by #1. Either way, I refactored the "loop" function in my sketch to remove some of the iteration. The library handles any buffering of the data, and so I call swapBuffer at the end of a frame.
3) I was experiencing sort of slow updates. I removed the delay(1) from their code, and I decreased it from 2 column wide blocks to 1 column for my demo. I think I'll try and utilize the GFX libraries drawRectangle function to try and clean that up a little, and maybe move the refreshes to an interrupt or timer so I can just set a known refresh rate and not hold up the incoming serial data too much.
I've posted the code on my ardmos repository on github here: https://github.com/billieblaze/ardmos/tree/master/test/adafruitmatrix_spectrumanalyzer
And heres a video of it in action!
3) I was experiencing sort of slow updates. I removed the delay(1) from their code, and I decreased it from 2 column wide blocks to 1 column for my demo. I think I'll try and utilize the GFX libraries drawRectangle function to try and clean that up a little, and maybe move the refreshes to an interrupt or timer so I can just set a known refresh rate and not hold up the incoming serial data too much.
I've posted the code on my ardmos repository on github here: https://github.com/billieblaze/ardmos/tree/master/test/adafruitmatrix_spectrumanalyzer
And heres a video of it in action!
LED Progress
I've been making some solid progress on my superUI module. I managed to get my row scanning bits working, a 595 shift register turns on/off a tlc59213 which can source 500ma of current per row, enough for TONS of led's! I've got the library from the Demystifying the TLC5940 mostly running and also have the arduino library running for occasional sanity checks! So, I've started construction on my rgb button pad. Here's 1/2 of it almost completed!
I've also decided to diffuse the LEDs' on my Adafruit matrix with a bit of white acrylic. It makes for much better viewing and video!
I've also decided to diffuse the LEDs' on my Adafruit matrix with a bit of white acrylic. It makes for much better viewing and video!
Tuesday, March 11, 2014
Great resource on the TLC5940!
I'm starting to breadboard the superUI schematic I devised. I mentioned glediator in my last post, and that uses TLC5940, so I copied some bits from there intending on getting the matrix to work w/ my OS or with Glediator. Having a few issues, so while looking for more info, I came across this GREAT refernce for TLC5940 and AVR. This guys "wrote the book on it!"
https://sites.google.com/site/artcfox/demystifying-the-tlc5940
https://sites.google.com/site/artcfox/demystifying-the-tlc5940
Saturday, March 8, 2014
GLEDiator!
I was sitting here, playing with my LED matrix and code and started investigating how to control it with a more streamlined set of serial data (initially via USB and later microcontroller->microcontroller). I found a few really cool sites and videos, but not much code / hardware stuff. And then... I found GLEDIATOR!
http://solderlab.de/index.php/software/glediator
The host application looks pretty cool for interacting with the display but the BEST part is, it uses the same processor and TLC5940 LED controllers that I'm planning to use! The row scanning is slightly different, and my board will have buttons too, but this gives me a REALLY solid reference!
Subscribe to:
Posts (Atom)