|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Wiring for CMU and Easy C
I am trying to run the Easy C Tutorial 7 but have run into a wall. The code is written and downloaded to the RC but when we turn the power on, the pan servo turns completely to the left (if you're facing the camera) and jams. From then on, the pan and tilt mechanism does not move at all. My guess is that we have not set up the wiring correctly. Right now we have the tilt and pan servos hooked into their respective PWM ports on the camera sensor board, power going from PWM 16 on the RC to the power port on the camera sensor board, and the TTL connection is going from the TTL port on the camera sensor board to the ttl-232 chip and then into the ttl port on the RC.
Another debate came up with some members of my team... should the pan and tilt mechanism work with the servos connected to the sensor board or do they need to be connected to PWM outputs on the RC? What exactly should the robot do if the code from tutorial 7 is correctly working? Should the camera pan and tilt? Should the robot follow the target light? Will it just move straight or should it actually turn the robot in the direction of the target if the target is off to the side? I just want to know what to expect if the code is working properly and we have everything hooked up correctly? One last question... do we need to run the MPLab initialization stuff or does the default config file in Easy C suffice? CHAD |
|
#2
|
|||
|
|||
|
Post any experiences!
Even if you can't answer my question above, I'd be curious to see what luck anybody else has had with the CMUCam and Easy C. Did you get tutorial 7 to work like you expected?
CHAD |
|
#3
|
|||
|
|||
|
Re: Wiring for CMU and Easy C
Quote:
The idea is that the code gets the x centroid value (ranging from 0-159) and generates an error based on how far the x value is from the center (80). This error is used for the 2nd argument of the Drive function to set the turn rate. I'm not sure exactly what color is tracking, but I think it is the FRC 2006 green targets. You should never have to run the MPLab initialization stuff. The idea is to run the LabView application, get it tracking the way you like, then export the parameters into a .ecc file. Then import the file in to EasyC on the camera initialize block. Brad Last edited by Kingofl337 : 15-01-2006 at 00:26. |
|
#4
|
||||
|
||||
|
Re: Wiring for CMU and Easy C
As Brad said...you need to get the camera tracking correctly in Lab View, or download last years JavaSoftware here:
http://www.frcsoft.com/forums/index.php?download=21 Ideally, though you should use Lab view because of the SAVE AS EASYC CONFIG button in lab view. Makes it really fast and nice to tweak your camera, then port it over to EasyC. Now some tips. If your tracking in lab view doesn't seem to track correctly. Try and study the tracking....if the image tracking seems to be in the middle of the screen, then the camera wants to jam to left or right and run the image off the screen, I suggest you install the REVERSE Pan jumper on the Camera circuit board. You'll need one of those jumper like if you jumper a hard drive for MASTER, SLAVE, or CABLE SELECT. Install the jumper, then this reverses the logic on the pan servo. Assuming you have the pan servo plugged directly into the Camera circuit board. If you don't know what jumper I am talking about, look for the figure in the camera manual found here: http://www2.usfirst.org/2006comp/oth...tion_Rev_A.pdf Page 5, you'll see the jumpers you need to install PAN REVERSE, TILT REVERSE.... |
|
#5
|
||||
|
||||
|
Re: Wiring for CMU and Easy C
The default values in EasyC are to track the 2006 target. During early camera testing Chris found it easier to use the RC Control to move the camera then using the built in tracking.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scouting Made Easy - Announcing the FIRST Scouting Network | Adam Richards | Scouting | 24 | 17-11-2007 14:58 |
| Limit switch in easy c? | chadbarbe | Programming | 6 | 02-02-2006 09:51 |
| Has any one used Easy C and what do you think? | N3OW | Programming | 2 | 10-01-2006 16:31 |
| easy game? | JulieB | General Forum | 0 | 12-01-2005 09:29 |
| MnM EASY Question of the Day Winners! | Mike Bonham | General Forum | 22 | 03-05-2002 21:21 |