Friday, May 28, 2010

Days of the week.

I while back I wrote a day-of-the-week quiz program.  Now for the life of me I can't find it.  I re-wrote it.  Here it is.  Get good at it and amaze your friends.

Monday, May 24, 2010

ADXL345 Arduino Driver II

I found a much more complete driver for this accelerometer thanks to Kevin Stevenard.  I updated the code and renamed a few things.  The changes were, unfortunately, not backward compatible.  I've reposted the modified code here.

Thanks Kevin!

Sunday, May 23, 2010

Arduino: undefined reference to `loop'

Ok, since this is the second time this has baffled me, I am making a note to myself. It turns out you cannot have a library with the same name as the pde file.

This is the example that got me. The Arduino project .pde file is a test of an accelerometer library (Adxl345.cpp, .h). Here is what the directory listing looks like.
.../sketchbook/Adxl345/Adxl345.pde
.../sketchbook/Adxl345/Adxl345.cpp
.../sketchbook/Adxl345/Adxl345.h

This yeilds the cryptic error
undefined reference to `loop'

or sometimes
undefined reference to `setup'

or both. The fix is to rename the Arduino project as anything other than "Adxl345". Using "Save As" in arduino should do the trick. This is what the listing looks like that works:

.../sketchbook/Adxl345_test/Adxl345_test.pde
.../sketchbook/Adxl345_test/Adxl345.cpp
.../sketchbook/Adxl345_test/Adxl345.h.

Friday, May 14, 2010

ADXL345 Arduino Driver

I wrote a simple driver for the ADXL345 accelerometer on the Razor board.  The code provides read/write access to the registers on the device and allows you to change the bandwidth of the internal low pass filter.  This little chip has an in-depth interface with stream buffering, fall detection, bump detection, double click detection besides autonomous low pass filtering.  I have only scratched the surface here.

A simple test script is located in the examples directory.

Wednesday, May 12, 2010

WORDUINO Instructions

Anool has prepared a beautiful set of instructions for our WordClock. Unfortunately, there are only 6 copies of the boards so consider yourself lucky if you got a set. If anyone expresses an interest, we may make more of the next edition of WORDUINO. Please let us know if you are interested.


The flexible faceplate lettering has been laser etched.


This picture shows the laser cut baffles to isolate the light to individual words.

Saturday, May 08, 2010

SharkFin Sensor Swap -- SFSS

I take it back. On the original SharkFin, the analog circuitry was causing a small error in both the gyro and accel measurements. We've since corrected the design, but we didn't want to lay money down on a new set of boards until the concept was proven.

Along comes the 9 degree of freedom Razor IMU from SparkFun. This $125 bad boy has 3 axes of accel, 3 of gyro and 3 magnetometer, overkill for sure. I got this for experimentation and found out that it fit beautifully on Fin. The holes even lined up. This amazing foresight by Anool, enabled the sensor swap.

The 9 dof razor has a ATMEGA328 on board already. I reprogrammed the MEGA on the SharkFin base to be a digital slave dummy. It just listens on the serial port for 3 byte messages which it assigns to the digital ports: PORTB, PORTC, and PORTD. This simple interface could be expanded to also read digital inputs from the slave.


The accel datasheet indicates a selectable bandwidth. It is unclear on exactly how this is being accomplished, but if it is effective, this will relieve the huge burden on the processor of low-pass filtering the accel data.

The magnetometer offers the possibility of complete head orientation tracking. It is still unclear exactly how to take advantage of this given that there is no true velocity measurement. Ideas are welcome!

Anool receives Alden's minature WordClock.

After over a month, Anool finally received the package containing Alden's miniature WordClock.  Here are some photos of his careful vivisection.

Saturday, May 01, 2010

WordClock Delivered


I dropped off a word clock to Alden (creator of the miniature word clock). I had mistakenly come to the conclusion that Alden had a laser cutter. I will forward the super cool golden face plates when they arrive from Anool. You can see the word clock on the left of the work bench.

While I was there he showed me around his beautiful shop. This is a dream shop, well lit and spacious, with enough components on hand to invent the future (which is what he is doing!).

Below, Alden is checking the performance of a stepper driver he has been working on. The steppers must have gotten out of hand in the second photo as the whole room seems to be spinning.