Build yourself a wirelessly controlled, Arduino-powered message board!

Here's an easy project which creates a wirelessly programmable message board. It uses XBee modules to provide a wireless serial link between your computer and the device. You interact with it via a simple menu system. There are no buttons (other than the reset button, which is hidden) on the device.

Step 1: What's It All About

The Arduino has three types of memory: flash, EEPROM and RAM. In this project, we use all three to store messages and values. Since we can't change the flash from inside the program, we use it to store 'canned' messages, or messages that don't change. We keep these short so they fit right on the display. We can also use the RAM to store a message, but we don't have much, so we keep that short too. The internal EEPROM is only 512 bytes, but that's enough to store a program of which canned messages to display and for how long. Finally, we add an external serial EEPROM, in which we store a long message (up to the whole size of the EEPROM) that we scroll across the display.

The following programming concepts are demonstrated:
- creating a simple menu system using the serial interface
- accepting and validating strings and integers via the serial interface
- retrieving strings from flash memory using progmem
- storing and retrieving strings in external EEPROM using a simple data structure
- storing configuration data in the onboard EEPROM
- displaying static and scrolling text on a parallel interface LCD (or LCD compatible display)
- measuring an analog value, in this case light levels

This is nice! <br> <br>This is probably really clear, but arduino's API changed over time, <br>the correct way of doing this would be: <br> <br>void clearAndHome() <br>{ <br>Serial.write(27); <br>Serial.print(&quot;[2J&quot;); // clear screen <br>Serial.write(27); // ESC <br>Serial.print(&quot;[H&quot;); // cursor to home <br>} <br> <br>Anyone has a tip on which terminal (for OSX) program actually understands these commands? I've tried coolTerm, which doesn't seem to understand this. <br>Zterm any good? and goSerial? Thanks!
If you use Arduino 1.0 and you want to clear the screen -like the step 6-, I highly recommend this article: http://www.whatisarduino.org/bin/Tutorials/How+to+clear+Arduino+Serial
New version!<br><br>I have updated the code so that a Serial.println-type function can be used with &quot;inline&quot; FLASH-stored strings. So, basically, you have code that has a print function and strings where you would expect them in the code, only at compile time they get stored in FLASH and read-from FLASH at execution-time via PROGMEM.<br><br>Perhaps at some point Serial.print/println will be rewritten to use prog_uchar instead of char, and then PSTR will be able to provide a pointer it can use directly. But, this method works fine.
Wow nearly all the RAM?<br><br>You need to use flash memory more. It looks like you know how but you are still using the &quot;Serial.print&quot;, which is going to eat up a lot of RAM.<br><br>Use stdio.h , so you can use printf_P<br><br>http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html<br><br>together with avr/pgmspace.h, you can call functions such as<br><br>printf_P(PSTR(&quot;This string will take no RAM at all&quot;));
These are good comments. The great thing about the Arduino platform is you can succeed right from the start with what's on the arduino.cc website and then later move on to standard avr libraries once you have more experience.
There's a much better way of storing different data types into EEPROM<br><br>take a look at http://www.nongnu.org/avr-libc/user-manual/group__avr__eeprom.html<br><br>It provides functions for most common datatypes. And for custom datatypes like a struct, simply pass in a pointer to eeprom_write_block, and the length should just be &quot;sizeof&quot; the struct<br><br>

About This Instructable




Bio: You know, I think we're all Bozos on this bus
More by uhclem:Squareinator - A SN76489 Monosynth 2014 Chevy Camaro Disable OnStar The Tnychron Clock 
Add instructable to: