![]() |
Combining camera + encoder code
Hey all!
I took the camera.c, camera.h, tracking.h, etc.. and put it right into the encoder code that kevin watson designed earlier in the year. I did some slight modification to the code so that the camera doesn't use the servos to move, it uses the drive train to move around. I tested all the code in the normal camera version of the code, and it works flawlessly. Now when I took the encoder version of the code and combined it with all the files that Kevin Watson specified to include in the code written in camera_readme.txt, serial_ports_readme.txt, and tracking_readme.txt. I have everything the readme ask for. The code builds, the encoders work, but the camera says that there is No Camera Found!!!!!!! Any ideas!??!?! Thanks! :eek: |
Re: Combining camera + encoder code
are you handling the camera interrupts in user_routines_fast.c?
|
Re: Combining camera + encoder code
Yes I am :(.. Could it be that I called the get or put data after the startup of the serial ports? Who knows.. Ill try some other stuff at the practice field today.. talk to yall soon
|
Re: Combining camera + encoder code
The encoder version of serial_ports.c sets serial port 2 (the TTL serial port) to 9600 bps while the camera version sets it to 115200.
Which one are you using? It should be the one from the camera. |
Re: Combining camera + encoder code
Oh! Yeah i just found SPBRG2 = BAUD_9600; // baud rate generator register [251]
Was that what you meant? [edit] Yep i found it inside the code now.. Ill replace it and test all of it tomorrow :) Thanks everyone! [/edit] |
Re: Combining camera + encoder code
Quote:
Or just copy the entire file from the camera project. |
| All times are GMT -5. The time now is 17:29. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi