Thursday, February 13, 2014

Check Your Wiring!

Earlier, I wrote about how I couldn't get my Arduino to communicate with the accelerometer. However, I was able to get it working! Yay.

Well, once I got the serial port issue fixed, the Arduino IDE started giving me errors like "not in sync" and whatnot, which got me on a whole other level of frustration! Turns out though, that the problem was a whole lot simpler than I made it out to be. In the end, it was because I wired the Arduino and accelerometer incorrectly... I accidentally switched the wires for SDA and SCL *awkward laugh. Now, everything works just fine!

So at the moment, I'm just trying to figure out how to read the data output from the accelerometer. I've found a few helpful insights and links from a forum on StackOverflow (which is pretty neat, since Ms. Chipps and I used to do our work together in the Stack Exchange NYC building. Now, we work at the FlatIron School's NYC building. It's a really cool place!).

As I'm figuring out the accelerometer, I'm adding some code to the one I got from the guide, and trying to make the LED pin 13 on the Arduino Uno blink every time the board senses movement. At the moment, I'm just using simple if-statements to do this, with some help of an official Arduino tutorial as I'm a bit new to the Arduino language/syntax. However, a problem I'm facing with this task is that once the accelerometer senses movement and blinks, it doesn't stop blinking and change according to movement again. It gets stuck!

And I'll leave with that, as I don't have sufficient if-statements for this part yet. To be continued!

No comments:

Post a Comment