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!
Showing posts with label ADXL345. Show all posts
Showing posts with label ADXL345. Show all posts
Thursday, February 13, 2014
Friday, February 7, 2014
Challenges
The main purpose of this blog is to document my Intel experiment experiences. And with that said, I can say that I've begun to start on it with my mentor, Ms. Chipps. It's really exciting to start working on my plans for a mobile device that can detect a baby's vitals!
So far, we've ordered an Adafruit accelerometer ADXL345, chosen for its low cost and good reputation. The first steps is to see if it's efficiently sensitive enough to be responsible for detecting a baby's breathing movements (as the accelerometer detects movement).
Accelerometers are good for sensing the presence of motion, or even the orientation of the object it's attached to. This can be useful in detecting vital signs of an infant as the accelerometer can be used to detect breathing movements or what position the infant is lying. For instance, SIDs is a major cause of deaths in babies; characterized by a lack of oxygen and commonly cause for warning not to have the child lying on their stomach. Thus, bringing reason to including an accelerometer into the device being created.
Currently, I'm using an Arduino Uno with the ADXL345, and am following a guide to wire and copied the code from the guide.
Materials (so far):
First objectives:
One problem... I can't even get the program to upload to the accelerometer!! Using Windows Vista, on the Arduino IDE with the correct drivers and everything, I keep getting errors like "serial port 'COM6' already in use" or "serial port 'COM6' not found". I can't even get the simple basic "blink" program to work for pin13 on the board. ...it was working on my laptop before I started using the ADXL345 though.
New to programming, I can see that this hobby takes a lot of patience and persistence because troubleshooting is really quite frustrating!
Seeing Ms. Chipps today, however. Hopefully, with two minds, a solution will be found.
It's a small bump in the road, and I'll continue to post as we work on it!
Next steps:
So far, we've ordered an Adafruit accelerometer ADXL345, chosen for its low cost and good reputation. The first steps is to see if it's efficiently sensitive enough to be responsible for detecting a baby's breathing movements (as the accelerometer detects movement).
Accelerometers are good for sensing the presence of motion, or even the orientation of the object it's attached to. This can be useful in detecting vital signs of an infant as the accelerometer can be used to detect breathing movements or what position the infant is lying. For instance, SIDs is a major cause of deaths in babies; characterized by a lack of oxygen and commonly cause for warning not to have the child lying on their stomach. Thus, bringing reason to including an accelerometer into the device being created.
Currently, I'm using an Arduino Uno with the ADXL345, and am following a guide to wire and copied the code from the guide.
![]() |
| my Arduino Uno connected to the accelerometer |
- Arduino (using Arduino Uno)
- Laptop/Computer
- Accelerometer (using ADXL345 from Adafruit)
- Wires
- Bread board
First objectives:
- How to work the ADXL345 and find how sensitive it is
- How to read the ADXL345 data
One problem... I can't even get the program to upload to the accelerometer!! Using Windows Vista, on the Arduino IDE with the correct drivers and everything, I keep getting errors like "serial port 'COM6' already in use" or "serial port 'COM6' not found". I can't even get the simple basic "blink" program to work for pin13 on the board. ...it was working on my laptop before I started using the ADXL345 though.
New to programming, I can see that this hobby takes a lot of patience and persistence because troubleshooting is really quite frustrating!
Seeing Ms. Chipps today, however. Hopefully, with two minds, a solution will be found.
It's a small bump in the road, and I'll continue to post as we work on it!
Next steps:
- How to connect the ADXL345 to a mobile device
Subscribe to:
Posts (Atom)
