Monday, January 11, 2016

Arduino GPS LCD Clock

I built the Arduino GPS Clock by Tony DiCola over at Adafruit.  The clock was very cool, setting it's time from the satellites, however, I soon started feeling like I was wasting my GPS shield by only using it to get time.

So I decided to use the RGB LCD Shield which would allow me to display more information and be more interactive with the device.

At the time of this writing I have four boards stacked.  1) The arduino, 2) An Adafruit PowerBoost Shield with a 2000ma Lipo Battery, 3) The Adafruit Ultimate GPS Logger Shield and 4) the Adafruit RGB LCD Shield.

Having four boards stacked does make it bulky but I will be reducing that by dropping the Arduino Uno R3 board and replacing it's functionality with an Arduino Pro Mini placed in the prototype section of the GPS Logger Shield.

On the software side I currently have it displaying the time and date on its initial screen.  Other screens show "Latitude and Longitude", "Speed and Angle", Altitude and Satellites, then the Select button displays the message "This is a clock NOT a bomb. :-)

I plan to add some code to support logging GPS coordinates to the SD card.  Then I would like to try and implement Ladyada's logger which is interrupt driven to log data.  I would hope to accomplish a feature where background logging could be turned on and off.  The user in the foreground could set flags that would mark spots as important for the back ground logger to flag so that it could be recognized later when importing the data to google maps or some other gps mapping system.

Here is the current code on codebender

Lots to learn and try on this project.

UPDATE 4/10/16

The Arduino Pro Mini was put in place eliminating the need of the UNO R3.








Saturday, January 2, 2016

Adafruit Wave Shield

Here is a shield for Arduino that makes adding quality sound to your products easy.

It can play up to 22KHz, 12bit uncompressed audio files of any length. 

It's low cost, available as an easy-to-make kit. 

It has an onboard DAC, filter and op-amp for high quality output. 

Audio files are read off of an SD/MMC card, which are available at nearly any store. 

Volume can be controlled with the onboard thumbwheel potentiometer.

The shield comes with an Arduino library for easy use; simply drag uncompressed wave files onto the SD card and plug it in. Then use the library to play audio when buttons are pressed, or when a sensor goes off, or when serial data is received, etc. Audio is played asynchronously as an interrupt, so the Arduino can perform tasks while the audio is playing.

Click on the play button to watch a demo of the wave shield playing assorting audio through a small speaker.


    The shield comes with an Arduino library for easy use; simply drag uncompressed wave files onto the SD card and plug it in. Then use the library to play audio when buttons are pressed, or when a sensor goes off, or when serial data is received, etc. Audio is played asynchronously as an interrupt, so the Arduino can perform tasks while the audio is playing.

  • Can play any uncompressed 22KHz, 12bit, mono Wave (.wav) files of any size. While it isnt CD quality, it is certainly good enough to play music, have spoken word, or audio effects.
  • Output is mono, into L and R channels, standard 3.5mm headphone jack and a connection for a speaker that is switched on when the headphones are unplugged.
  • Files are read off of FAT16 formatted SD/MMC card.
  • Included library makes playing audio easy.

While the shield has been tested and works well, here are some points to keep in mind:
  • The audio playback library uses 10K of flash - so if you want to use an NG arduino, you'll need to upgrade to an Atmega168 chip.
  • About 600 bytes of SRAM are used to buffer the audio and keep track of file data, so RAM-heavy projects may not work well.
  • The shield can't play MP3, WMA, Ogg or other compressed audio files. It can only play uncompressed PCM/WAV files. Converting audio to WAV format is very easy, and is often the default format for many audio programs.
  • Files are stored as 8.3 name format, and can only be placed in the root directory. That means you can only have ~512 files (but they can be any size).
Ideas for what you can use it for...
  • Make a portable audio player
  • Use the AT&T text-to-speech site to make snippets of speech that you string together for a talking project, like..
  • Talking temperature sensor
  • Talking clock
  • Interfaces for sight-impared people
  • Doorbell that plays a cool tune
  • Jukebox/music-box that plays a song when its opened, or a coin is inserted
  • Security system that warns the intruder
  • Audio looper for musical effects and performances
  • Synthesizer with different sounds
  • Really freaky halloween props that scream
  • Display (like a point-of-sale box) that you can plug into to hear the message