Go Down

### Topic: How to calculate distance using arduino (Read 527 times)previous topic - next topic

#### sagarsukoshe

##### Mar 24, 2013, 10:28 am
I am using GSM module with arduino and also drive motors of robot. so I want to calculate how much distance covered by robot linearly and print that distance in message which will send through GSM module.

i tried this formula in void loop
but its not working. plz help me.

#### JimboZA

#1
##### Mar 24, 2013, 10:56 am
Post your whole code, and also explain in what way it's not working, not just that "its not working"....
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### steve_t

#2
##### Mar 24, 2013, 12:38 pm
You need some kind of position sensor in at least one wheel so you can count the number of revolutions the wheel has completed. You plug THAT number into the 2*Pi*r formula to get distance.

#### afremont

#3
##### Mar 24, 2013, 05:33 pm

I am using GSM module with arduino and also drive motors of robot. so I want to calculate how much distance covered by robot linearly and print that distance in message which will send through GSM module.

i tried this formula in void loop
but its not working. plz help me.

Assuming that "rps" = revolutions per second
That should give you your rate (speed).  Distance = Rate * Time
You need to multiply by the number of seconds to get distance traveled at that rate.
Experience, it's what you get when you were expecting something else.

Go Up

Please enter a valid email to subscribe