Coding Help

Hey Everyone, I'm brand new to coding arduino but need help with a project for school. We are using an arduino uno and an adafruit adxl377 accelerator. We are looking for help from someone to help us code a program that will light up an led when the accelerometer reaches 90 g's in an direction. Once it reaches 90 g's the light will stay on for 10 minutes. After that it will reset. We haven't started at all. If anyone can help us out that would be much appreciated. All work will be credited! Please no hate! Thank You!! MSG for more details or if interested.

90 G's? Are you shooting this from a cannon?

Certainly willing to help. Have you written up a detailed description of what the program needs to do? A lot more detailed that what you have here. What have you got so far for the program?

Paul

Hey Paul, so far we have nothing. We have been searching around for a good place to start but have found nothing so far. This is going to be used inside a football helmet and when the helmet gets a certain force or greater it will light up. We have more details, msg me for more detail and if your still interested.

I am interested in seeing what you can do! Have you used example programs with the Arduino and the accelerator?

By the way, 1 G is 32ft/sec. I would be very surprised if two people hitting heads together are moving fast enough to generate more than 2-3G.

Paul

Talk to this guy and this guy - they have very similar problems to yours, and very identical IP addresses - you should get together.

@Paul_KD7HB

You might want to check this site out:

AWOL:
Talk to this guy and this guy - they have very similar problems to yours, and very identical IP addresses - you should get together.

Good catch!

Paul

evanmars:
@Paul_KD7HB

You might want to check this site out:

Football Physics: The Anatomy of a Hit

Right! I forgot the other /sec. So if the head stops in 0.1 sec, the G is 10X 32 ft/sec. 0.01 sec stopping is 100X 32 ft. per sec.

Thanks.

Paul

Here's your psudeo code:

if we are experienceing 90g,
then light the LED, and make a note of the time it is now (millis())
otherwise,
if the LED is lit, and it has been 10 minutes since we turned it on 10L60L1000L ms
turn the LED off
otherwise
do nothing

Here's your psudeo code:

Did your speelchekcer like that?

It's like a rodeo, for power supplies.

AWOL:
It's like a rodeo, for power supplies.

I had to read that twice. Then I laughed my ass off.

PaulMurrayCbr:
Here's your psudeo code:

if we are experienceing 90g,
then light the LED, and make a note of the time it is now (millis())
otherwise,
if the LED is lit, and it has been 10 minutes since we turned it on 10L60L1000L ms
turn the LED off
otherwise
do nothing

Exactly what we want