Society of Robots - Robot Forum

Software => Software => Topic started by: asp128 on October 26, 2013, 02:05:22 PM

Title: GPS controlled servo motor
Post by: asp128 on October 26, 2013, 02:05:22 PM
I wish to move a servo motor to a particular angle on the basis of the altitude sensed by a gps unit. I am using an atmega 128 and a mediatek mt2239 gps unit. How do I go about writing the code?
I am completely new to avr.....
I also wish to log the gps data onto EEPROM or sd card.
Please guide....
Title: Re: GPS controlled servo motor
Post by: waltr on October 26, 2013, 04:17:19 PM
Read GPS data and extract the altitude info.
Convert to a pulse width that corresponds to the servo angle.
Connect an I2C EEPROM to the Atmega I2C pins and write the data out.

Each of these are separate tasks that you couple together in code. Tackle and learn how to each separately first then code them together.
There are lots of examples of each so do some more searching and reading.
Title: Re: GPS controlled servo motor
Post by: CJAlbertson on November 16, 2013, 03:31:48 AM
I wish to move a servo motor to a particular angle on the basis of the altitude sensed by a gps unit. I am using an atmega 128 and a mediatek mt2239 gps unit. How do I go about writing the code?
I am completely new to avr.....
I also wish to log the gps data onto EEPROM or sd card.
Please guide....

Have you looked at your altitude data yet?  GPSes are typically horrible when it comes to altitude. 

The altitude data, along with everything else is typically reported once per second.  You might find that a stationary GPS antenna is reported to be at different elevations .  So you may have to filter and smooth the GPS data.  Many applications will use a an air pressure sensor and accelerometer  in addition to GPS.    Some of the error is due to different definitions of "altitude", what is the zero reference and also the spheroid used.