|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
CMUcam default code not responding
I have spent quite a bit of time trying to get this to work, and I suspect some kind of configuration problem. I'm hoping that if I list everything, someone might be able to see what's wrong.
frc_camera_s, using compiled .hex that was in the download CMUcam2 connected via TTL port to RC 2006 RC tethered to 2006 OI tilt/pan servos connected to RC pwm1,2 RC pwm to CMUcam2 power jumpers on pan reverse, oscillator connect, internal power to servos DB-9 serial from RC program port to laptop via USB to Serial converter 12 volt and 7.2 volt batteries fully charged The camera shows a green light, and all of RC lights are green like normal. The camera holds its default position, and does not respond to any light. Nothing comes up over the terminal, although I expected to see "Scanning...". With the camera configured stand-alone (DB-9 to USB to laptop, servos plugged directly in to camera, power still supplied by RC) I was able to use LabView and the CMUcam2 demo program to calibrate the camera well. It tracked as I believe it was supposed to without any problems. Any assistance would be appreciated. Thanks. Dublin Robotics, Team 1014 (with the Bad Robot t-shirts) |
|
#2
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
-Kevin Last edited by Kevin Watson : 15-01-2006 at 13:52. Reason: Fixed a link. |
|
#4
|
|||
|
|||
|
Re: CMUcam default code not responding
I had already verified that I was not using the code with the serail port setting bug. I will run the two tests you asked for as soon as I get the RC and camera, which are locked in the school until Tuesday morning. I can't get the link to the other forum you mentioned to work. Thank you, and I'll post my results when I have them.
|
|
#5
|
|||
|
|||
|
Re: CMUcam default code not responding
I ran the serial port diagnostic tests. In loopback mode, terminal input was not echoed. When connected to the camera, there was no responce. I am confident that I configured everything per the ReadMe file.
When I ran debug, the following was printed to the terminal: Camera: Initialized abnormally with code 131 Camera: Initialization state = 1 Camera: Initialization state = 2 Camera: Initialization state = 3 I hope to test the TTL to RS232 board soon using the ifi instructions. Thank you for your help. Kyle W |
|
#6
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
-Kevin |
|
#7
|
|||
|
|||
|
Re: CMUcam default code not responding
Of course, the DB-9 serial was not connected from the camera to computer. I feel like whacking myself in the head; the problem was the pwm cable. We didn't think to check it because it was brand new and unabused. We also found that I had misplaced the oscillate jumper to accidentally short user i/o 5v+ and ground when I was working on it this morning, which caused a lot of trouble as we tried to figure out how the camera didn't have enough power. Finally we noticed that the servos were only powered when the camera was off, which gave away the problem. Thanks again for the help and the great code.
Kyle W, 1014 Controls Team |
|
#8
|
|||
|
|||
|
Re: CMUcam default code not responding
Hi Kevin,
We are having the same issue (failing in State 3) - something probably amiss with our camera to RC communication. The readme file for the diagnostic files says it's only for the full sized controller. We are still messing with the EDU until we get our full system running. Any tweaks I can do to get the diagnositcs to work with the EDU? |
|
#9
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
-Kevin |
|
#10
|
|||
|
|||
|
Re: CMUcam default code not responding
Quote:
I got the diagnostics to run on the EDU, thanks. We pass the loop back test so we know the RS232 converter and cable are good. We don't pass the second diagnostic test. Your notes say we either have our camera misconfigured or it's a bad camera. The baud is set to 115200 (no jumpers). Are there other config items we need to check? I even went into the EDU version of serial_ports.c and changed the SPBRG2 = BAUD_115200; and XSTA2bits.BRGH = 1; thinking that might be the anwer but it did not help. You must be swamped! Thanks for your efforts Kevin! |
|
#11
|
||||
|
||||
|
Re: CMUcam default code
I just uploaded the default "bells and whistles" code to the robot. The prgram state and code error LEDs are flashing red. Any help would be great.
|
|
#12
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
Quote:
-Kevin |
|
#13
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
Another thing to check - make sure your RS232<>TTL converter board is fully connected. The Edu has only 3 pins on the TTL header. The missing fourth one (as compared to full size RC) is the power pin (+5V). We took the end of a spare pwm cable and connected just one pin on the +5V pin of Digital In/Out #1, then ran that into the TTL<>RS232 board. |
|
#14
|
||||
|
||||
|
Re: CMUcam default code not responding
Here is what I did to allow compatibility between years, and between IDEs. I have a "core" directory, a "modules" directory, a "2005" directory and a "visual studio" directory. I put all c/h files I personally make (or get from Kevin's website) into the modules directory, and I put all of the files supplied by IFI's 2006 default code into the "core" directory. I copied the 2006 default code's workspace files to the "2005" directory, followed the instructions to ensure compatibility with '05 controllers, and then included all my modules from the "modules" directory, and the relevant IFI code from the "core" directory into that project. I didn't trust the pic's being #define'd, so I edited the project settings in the "2005" directory to include the definition of VERSION_2005_CODE (-D_VERSION_2005_CODE), and then I test for the presence of this macro where relevant. For example, in Kevin's EEPROM code:
Code:
// Need to include a different file in the event of a compilation for the // '04-'05 controller. #ifdef VERSION_2005_CODE #include "ifi_picdefs.h" #else #include <p18f8722.h> #endif #include "rkw_eeprom.h" I also created a visual studio solution, and stored it to the "Visual Studio" directory. I include all the c/h files into this solution, and do all my coding there. When its time to compile, I alt+tab to the MPLab editor (it senses that the files have changed at this point), and pretend as though I had been coding there all along. c:\2006 Robot Code\ c:\2006 Robot Code\modules\ c:\2006 Robot Code\2005 Workspace\ c:\2006 Robot Code\Visual Studio\ c:\2006 Robot Code\documentation\ That might help you in the long run, though it doesnt solve your current problem. |
|
#15
|
||||
|
||||
|
Re: CMUcam default code not responding
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Best Way To Insert Autonomous Code Into Default then load help.? :-)? | gemccnp | Programming | 2 | 05-02-2005 18:58 |
| default code vs. 2.4 | stephenthe1 | Programming | 2 | 05-02-2005 18:02 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |