Senior Design Project Help

Hey everyone I’m new to this site and new to the world of robotics. My group is doing a senior design project in which we are using an accelerameter to measure the g-forces during a crash and when they exceed a certain limit will trip a relay. I talked to the customer support staff at robot shop and they told me the hardware that i would need to buy. I bought the following components:

robotshop.com/dfrobot-triple-axis-accelerometer-breakout-board-mma7260q.html
robotshop.com/productinfo.aspx?pc=RB-Dfr-36&lang=en-US
robotshop.com/dfrobot-single-relay.html

I have received them and hooked them up but am running into a bit of trouble when it comes to the programming. I have taken some programming courses but not enough to program the microcontroller to do what we need it to. I was wondering if someone could point me in a direction where I might be able to find a sample program to use. Thanks in advance to the help!

First, connect the accelerometer’s three outputs to the ROMEO’s analog pins, ensuring correct orientation. Next, try the sample code under File -> Examples -> Sensors -> ADXL3xx (seems to still be valid). Alternativesly, you can try the “analogreadserial” demo. This will allow you to read the analog acceleration values on all three axes. Next, connect the relay(s) to digital pins, and use the button demo (under digital), but change the pin number to the one connected to the relay. You will then need to merge the code to have the relay activated when the acceleration value reaches a certain number. We cannot go into specific code, but perhaps another member may be able to.