1

I am working on a project where I need the Arduino to 'sense' at what direction its moving. For example, I want the Arduino to 'sense' that it is moving towards 'forward' direction, 'backwards' direction etc.

Is that possible using an Arduino? Can I use a motion sensor to do this (probably not)?

Can any one please help me to find the right 'direction'?

Michel Keijzers
13k7 gold badges41 silver badges58 bronze badges
asked Aug 7, 2018 at 13:33

1 Answer 1

1

For this you need a acceleration/gyro sensor, like the MPU6050.

By tracking x/y/z movements, you can define what is forward/backards etc. Also you can track angles/tilts (in 3 directions).

See an example how to use it here: MPU-6050

answered Aug 7, 2018 at 13:41
3
  • Thank you, I don't wanna go deep here, but is there a library present which I could use to make my work easier? Commented Aug 7, 2018 at 14:07
  • You can change the example as library, or maybe this link helps: maker.pro/arduino/tutorial/… I never tried the MPU6050 myself. Commented Aug 7, 2018 at 14:10
  • 1
    Well I tried by borrowing one from a friend, it worked 😮 thanks Commented Aug 7, 2018 at 16:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.