Sunday, September 20, 2015

Arduino Programming

     I have been playing with a multitude of options, programming tecniques on various projects to expand my knowledge of the Arduino programming environment.
     It has been a fustrating, but fun ride. I have master the shifter library that my grandson (Moose) found. I have successfully and reliably controlled up to 7 chained shift registers with a growing string of leds. I am going to tackle 7 segment displays and then move to controlling matrices reliably.
     I've spent a good amount of time making different patterns of 56 LEDs. Knightrider style, various chasers, a simulated VU meter, and a binary counter (which does not use the shifter library). Due to the amount of current it takes to drive all of the LEDs, I was also thinking about charlieplexing the LEDs when a large amount of them need to be lit. (Charlieplexing is the process of rapidly flashing the LEDs one at a time to give the illusion that they are on. The downfall of this, is they will not light up as bright.)
     I did find that charlieplexing is not efficient enough for large amounts of I/O. Multiplexing is better. Same effect, fewer wires.
     I'm working on getting the hang of working with binary arrays to make patterning easier, but also try to find ways to code that does not take lots of the Arduino memory. This will also help make charlieplexing easier to program.
     Another thing, is getting wifi projects working. The best I've got so far is to ping different websites.
     I've got arrays down pat, but still trying to grasp multi-dimentional arrays. They are a whole different animal. They are essentially arrays within arrays or arrays referencing other arrays. It gets nasty.
     I have gotten a 3d printer that is run by an Arduino. I have been learning how they crammed so much programming in such a small amount of processor memory. Also on how they created different files for sections of the program and it all work like one big program. This program that runs the printer is referred to as the 'firmware' of the printer. That is because this 'firmware' does not hold any pattern you want to print, but only interprets any g-code commands to it (via) usb and moves the printer accordingly. I will explain more about the printer in another blog.
     I can say now that I can do alot with leds on the arduino. Motor control is another endevor. I will likely get a motor control board like ramps to experiment with making robots. I can easily make lights do anything I want.