Source Code for VDay 2012 Released, and it is called AdvMenu!

I am really happy with how much progress I did tonight.  I finished all of the LED functions, so that you can vary brightness, speed, and pattern, from the settings menu.  Those settings are stored in eeprom just like everything else.

When you first run it, you’ll import it into your Arduino libraries directory.  Then you’ll restart Arduino, and check out the example.  You can modify which pins are for the LCD, and which Analog input’s you want to use.  The circuit is described in AdvMenu.cpp, and I plan on posting a schematic eventually.  When you look at the example, you’ll see that only a few initializations are in the main arduino sketch.  You’ll have to modify the actual AdvMenu.cpp, AdvMenu.h and MusicMenu.cpp to suit your tastes.

I have included 1 sample card and 1 hidden card, just to show you the capabilities of the library.  I have also included #defines in the top of AdvMenu.h that can do things like disable music (saves 11274 bytes), disable cards (saves 664 bytes), disable passwords.  It also does some pretty necessary stuff.  The first time you run it, you’ll need SETUPEEPROM and SETUPMENU uncommented, since it will setup the default menu and then save it to eeprom.  After you do that, then you’ll need to comment them out.

For the Shift Registers, you’ll need to manually define them in AdvMenu.h.  Since I wanted speed, you’ll define the pin numbers, their ports, and the pin number of the port.  You can look at this pin mapping to figure out what you need to put there.

I’ll continue to update this library as I add more functions to this VDay card.  My next thing to add is a little game called Dodge.  Please let me know if you have any suggestions, or if you like it 🙂  Progress!!!


Valentines Day Arduino Card Part 3

Menu system is working!  Card system is working too!  I can easily go into cards, and return to the menu system and continue where I left off 🙂  The card I have in there now works nicely 🙂

An interesting note is that I’m able to run this electronic card on 3.044V.  It starts to get sluggish, so it’s kind of obvious that the batteries need to be changed, but other than that it works.  Considering that I’ll be using a 3 AA battery pack to power this, I’ll be starting at 4.5V.  Without the Xbee (that I use to program it), the card draws 6 mA average while idling, up to 10 mA peak.  I hope to sleep the processor more to bring that down some.

But even with its current state, the batteries in this card should last awhile, since it will be off most of the time.  Batteries would be easy to change too, so that won’t be a problem.  The only question that remains is how much current will the 16 LED’s draw, especially considering that a shift register will be controlling them directly (so will be harder to do PWM on them).

I’ll be wiring up the actual card tomorrow, so I’ll finalize the button layout, and which buttons go to which ADC ports (I’ll be using A0-2).  I think I’ll put a small board for the processor and shift registers below the LCD.  I also need to start working on the label for the numberpad.  But many more apps needed (LED’s, password, game1, game2, sound (thinking of having different melodies for different cards 😛 ))

I have some thoughts on Windows vs Linux (currently I use linux for home electronics and programming) that I’ll post sometime soon.  Not strictly electronics related, but since a computer is the tool you use to program, I feel it is important.