![]() |
Rookie help
I am new to programming and extremely new to a lot of mechanical stuff in general, so my team gave me something to work on over the holidays, but I am very confused.
I will try and be as specific as possible to receive help They gave me an edubot controller, a battery, a charger, 2 servos, a serial to usb converter, and something called a BEI GyroChip I know what the battery, charger, and serial -> usb cable do/are for, but how would i hook up the rest of thie stuff to the control Thanks |
Re: Rookie help
Quote:
The gyro plugs into an analog input on the controller (one of the first inputs based on User_Initialization() in user_routines.c). If it doesn’t already have a connector attached you’ll have to make one out of a PWM cable. You get values from it doing something like “x = Get_Analog_Value(rc_ana_in01);“ The neutral position of the gyro will be close to 512. When the gyro is twisted slowly in one direction you’ll get numbers between 0 and 512 only while you are twisting it. Do the same in the other direction and you’ll get numbers between 512 and 1023. If you keep track of these numbers you can tell if your robot is driving straight or not and correct. It can also be used to make precise turns, to say 45 degrees if you calibrated it. This particular gyro is no longer "street legal" to use on your competition robot, but it's good to learn with. This one will be overly sensitive to turns or sudden movements that are too quick, and will more easily lose track of the original robot heading. Do a search on “gyro” for a lot of threads on the subject. |
Re: Rookie help
the gyro has a pwm, and my only job is to make the sensors move or something
sensors go to pwm out? if so, the black is on top right the gyro goes to analog in with the black on botton? if all this is correct thank you and i will probably have questions later about what all these do and what / how to code |
Re: Rookie help
Quote:
The gyro is a sensor and the servos are specialized motors. |
Re: Rookie help
um, i have 4 pwm out pins, but only three holes, does the closest one not matter for these servos?
|
Re: Rookie help
Quote:
|
Re: Rookie help
I can use any 2 pwm out pins right
And I just put the gyro in the first digital in spot |
Re: Rookie help
Quote:
If you are starting with the default EDU code, that arranges for the first two inputs to be analog, so either 1 or 2 will work. |
Re: Rookie help
Will the default EDU code have stuff that i can just upload and make it work, just to learn the workings?
|
Re: Rookie help
Quote:
http://innovationfirst.com/FIRSTRobo...04-Jan-14a.pdf http://innovationfirst.com/FIRSTRobo...10-15-2003.pdf http://innovationfirst.com/FIRSTRobo...t_02-16-04.zip |
Re: Rookie help
And I just use MPLAB IDE to mess with it right?
Also, what kind of code am i looking for just to make these things move for starters What code(s) will I have to upload as well? |
Re: Rookie help
Quote:
How about putting something like this where it says "/* Add your own code here. */" in the file "user_routines.c" in the routine "Process_Data_From_Master_uP" Code:
static unsigned char servo1=0; //Put these two lines right before the "Getdata" call |
Re: Rookie help
Thank you, i will fiddle and learn from that code (is user routines akin to autonomous cause i dont know how im gonna make them move if it isnt)
1 more question (i hope) how and what do i upload to my controller now? |
Re: Rookie help
Quote:
|
Re: Rookie help
C:\...\EDU_Default_02-16-04\user_routines.c:249:Error: syntax error
Halting build on first failure as requested. BUILD FAILED: Mon Dec 20 16:36:48 2004 here is the snippet i edited Code:
/******************************************************************************* |
| All times are GMT -5. The time now is 15:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi