DanL
21-01-2004, 22:05
Our team's mentor decided its time for a vacation already, and so he's gone for the rest of the week. That means no access to the robot rc for me =( Luckily, I did manage to yoink the edu and beacon stuff before he left ;-)
Anyways, this makes me want to try and run the beacon and the tracking code off of one Edu. I got something, but well, it's not working (and unfortionately, this is the first day I've managed to really tackle this new c-programming micro stuffs). Anyways, one with what I did:
First, I downloaded (http://www.kevin.org/frc/) the beacon code and the edu_tracker code (the version that doesn't have the navigation built in). I used the tracker project as a base.
I first changed the tracking servos to pwm03 and pwm04 so pwm01 and pwm02 could be used for the left and right beacons. The optical sensors were put on interrupts 3, 4, 5, 6.
I then brought beacon.c and beacon.h into the project and added #include "beacon.h" in the user_routines.c and user_routines_fast.c. In the init section of user_routines.c, I added Initialize_Tracker();
I might have done something else, but thats all I seem to remember. I added some printf's to tell me when the beacon was turned on.
In the console, I get "Tracker x: still searching" while the servos are going back and forth. These lines are interrupted by my "BEACON ON!" printf's, as expected. Basically, the beacon code is outputing, the servos are searching.
I put the servos in front of the infrared LEDs, but it still says "still searching." After a while, the console stops outputing my "BEACON ON!"'s. Soon after, the Program State LED turns blinking red, thus ending my hybrid program in a glorious infinite loop.
Any suggestions on how I can combine the beacon code and the tracking code onto one edubot?
Anyways, this makes me want to try and run the beacon and the tracking code off of one Edu. I got something, but well, it's not working (and unfortionately, this is the first day I've managed to really tackle this new c-programming micro stuffs). Anyways, one with what I did:
First, I downloaded (http://www.kevin.org/frc/) the beacon code and the edu_tracker code (the version that doesn't have the navigation built in). I used the tracker project as a base.
I first changed the tracking servos to pwm03 and pwm04 so pwm01 and pwm02 could be used for the left and right beacons. The optical sensors were put on interrupts 3, 4, 5, 6.
I then brought beacon.c and beacon.h into the project and added #include "beacon.h" in the user_routines.c and user_routines_fast.c. In the init section of user_routines.c, I added Initialize_Tracker();
I might have done something else, but thats all I seem to remember. I added some printf's to tell me when the beacon was turned on.
In the console, I get "Tracker x: still searching" while the servos are going back and forth. These lines are interrupted by my "BEACON ON!" printf's, as expected. Basically, the beacon code is outputing, the servos are searching.
I put the servos in front of the infrared LEDs, but it still says "still searching." After a while, the console stops outputing my "BEACON ON!"'s. Soon after, the Program State LED turns blinking red, thus ending my hybrid program in a glorious infinite loop.
Any suggestions on how I can combine the beacon code and the tracking code onto one edubot?