Sunday, August 23, 2015

Hmmm digital i/o

I think thus far, all my previous experiments have all been done using analog sensors. This time, all the sensors I have communicate with digital i/o, and most connect via i2c and my imu supports both i2c or spi.

Being an i2c newbie, the two wire interface is a whole new world to explore. Previously, with analog sensors all I needed was to connect up the sensor to the mcu's ADC, and that's it. Here, it seems like it will take me ages to figure out how to utilize the interface as well as the various control codes to send over the bus in order to get things moving.

Thankfully, companies like sparkfun and adafruit etc provide libraries that slot neatly into the Arduino software, and the last library I tested for the BMP180 from sparkfun worked out of the box with the Teensy 3.1

So, instead of messing around with lower level stuff, I can just call a function to do what I need. Let's see how that goes!

No comments: