Compass Prototype 1

Building on yesterday’s Compass LED PCB prototype, I wanted to get the compass actually working so I could drive some LED’s.

Using Adafruit triple-axis accelerometer & magnetometer LSM303 and NeoPixel Ring – 24 x WS2812 RGB LED, I was able to get a functioning digital compass fairly quickly utilizing the Adafruit_LSM303 library.

I don’t know if I will use off-the-shelf LED’s for the compass as shown in the Compass PCB prototype 01 or use a Neopixel version via SparkFun, the WS2812 RGB LED Breakout. I save about 1.3 mA per LED versus my chosen through-hole LED if I use the WS2812 with a single channel of the RGB on, but to get white it costs me 60 mA! If I use this breakout board I won’t have to assemble or test out the components and boards or test out a self-designed board, which is a huge time saver and reduces the change of me messing up, but I don’t think I can afford the power for the compass.

If I use the Neopixel for the compass, I’m stuck using the Neopixel library for the compass and my home-brew shift registers to drive the lamp subsystem. Which might not be a problem since they both do different things. In the end it might come down to aesthetics: which system do I want more control over the color of light, the lamp or the compass? I think I would want more control over the lamp colors via the Neopixel than control the color of the compass.

Compass Prototype 01

Until I get a handle on my power consumption, I won’t be able to choose one system over the other.

 

 

Randy