Hey guys, I got Kevin’s CMUCam code finnaly on the robot… the weird thing is… nothing moves. I have the pwm03 and 04 as p1_y and p2_y. and I left the pwm 01 for the pan and pwm 02 as the tilt under tracking.h. In the user_routines, I have it set on p3_y, p4_y. Am I suppose to do something with those? Or just leave them as that?.. Also when the program is loaded… on the window, it is saying “Searching…” or “P1 Y 127, X 127” Or any of those coordinates on it. The regular default code runs this fine, but when I load the camera code with all of those changes… nothing happens. Am I suppose to do anything special to make them run. Hmmm, Im confused.
The default code is commented out. Just uncomment it and place it before putdata(&txdata). ALSO comment out the pwm01 = p1_y and pwm02 = p2_y.
make sure anything you put is before putdata(&txdata) in the void Process_Data_From_Master_uP(void)
you can modify the printf statements to display what you want. comment it out if you want to modify the camera variables in the “bells and wistles” version on the terminal window.
Hmmm Im not sure I undetstand what you are talking about. You said place the uncommented code before putdata code and make sure it is in Process_Data_From_Master_uP… the problem is… it cant be in Process_Data_From_Master_uP because that is after putdata. Are you talking abotu Getdata? Because Get data is in the process data funtion. And what code are you talking about when you say it is commented out and in needs to be uncommented and stuck in the function. i dont know what code that is.
I’m not looking at the code, so I’m doing this from memory but…
There is a routine in user_routines.c called default_routine, which is where all the mapping is done from the controls. This routine is all written, however, it is never called in process_data_from_master_up. Basically call default_routine() before the putdata(&txdata) call and it should do it. The better way to do it is find the comments saying something like “IFI default code” (it’s a pretty big block of code), which is all commented out. It has the call to default_routine(), and a bunch of other stuff. If you uncomment all the and put the putdata(&txdata) call after that, you should be fine. Hope that helps!
If you have any questions my IM is on my profile, I’m on a lot and I’d be glad to help you as much as I can.
Okay cool, we got it driving with the camera code thanks to you guys. So the camera is hooked up. How do we get power to this beast now… beast = camera. In the workbook it says power with the tree pin connecter, and it says use pwm outputs to power it. When we plugged in the camera to the output, the camera didn’t come on. Is there code to put to power it, or does the wiring need to be different.
So Right now I am powering the camera with the backup battery. I know thats not what it needs during the competition. So any help would be appreciated. Im still trying to get the camera to seach also. Do I just plug in the camera in right ports and it should track? Or do I need to call that funtion to start the tracking? Ill be working on that for a while so yah.