Wire the LED such that the positive lead is attached through the resistor to the red wire, and the negative lead to the white port wire. The black wire is not needed.
Writing a 0 to the port will turn the LED on, and writing a 1 will turn it off.
You should see what i found out, i have had an hd camera for a while and 10 minutes ago i found out it can function as a high speed camera!
Its sweet, its just like the mythbusters in full hd! Its not going to see a bullet fly but i tossed a cup in the air and it was nice and slow, i also flushed a toilet and poured some water out of a cup and it recorded every drop of water in super slow mo!
Its a sony HDR-SR5 camcorder that we got from dell for $950 plus shipping, it retails $1200 so i would say we got a good deal. Its got a 2 hour battery and a 40gb hard drive for video recording. Its really tiny and i like it but the zoom is bad, and it does not do well in low light. All HD camcorders have less zoom when compared to a standard camcorder and most have fuzzy video in low light.
If you watch my autonomous robot v1.0 on youtube wait until you get to the obstacle course. What you don’t realize in the video is that i had large portable work lights all around the room making the colors very vibrant for the best video quality. It looked fantastic when played on the pc in hd but i had to re-encode it which lost a lot of quality and then youtube re-encoded it into flash so it lost the colors and some more quality. The end result was a video with dull colors that looked alright but if it was in full hd it would have looked a lot better.
But yes the slow motion/high speed feature is cool but it is a lot for the camera to handle. It records so many frames that it has to buffer and it only takes 4 seconds to fill the buffer. This means that you can record 4 seconds of video but its recording at like 60 to 100fps so it would be like 20 -30 seconds long. Its nice if you want to record a specific event on your robot such as an impact with a wall or something like that.
Well i can’t wait to make a youtube video of some of the slow mo video.
That led thing didn’t work but it was probably the led so i will keep trying, plus my micro controller is acting really weird.
Thanks for the details on the camera - I’ll look into it. Makes sense that you’d need a hard drive in it, since MiniDV tape is never gonna keep up with high speed.
You can test the LED by switching the white & black wires. If your controller is on and your resistor is the right value then the LED should light. (Doesn’t need any software to drive it.)
So, to test the LED:
[LIST]
*]White → No Connection
*]Red → Resistor → LED(+)
*]Black → LED(-)
[/LIST]
And to control it via digital out:
[LIST]
*]White → LED(-)
*]Red → Resistor → LED(+)
*]Black → No Connection
[/LIST]
Oh, your resister should be in the neighborhood of 300 ohms, give-or-take depending on the details of your LED.
I just found something really cool on the internet, i have the sony SR5 well you should see the new SR12 holy crap. I wish that was out when i bought my camera.
The Digital Outputs of the Vex Controller have a resistor already…
Download the Vex Sensor Test file and look at the enclosed PDF. The LED’s can be directly inserted into the Vex Controller, or you can use the 6" PWM cable to have it more remote.
So they do… I remembered doing this last year, but now that you jogged my memory, I was just running the LED directly from the power (it was a camera light) and not controlling it via the digital out. Sorry about the bum advice.
The specs for the controller show a 1K series resistor on the I/O pin, which means you are not going to get enough current to drive most LEDs very well, and certainly not any with built-in resistors.
The LEDs at the link MarkO provided are low-current LEDs (7.5ma) which is about the only kind that you will get enough light from to see.
I just ran some experiments, and I could barely get a normal 20ma LED to light on a digital port. I was able to drive it from a motor port reconfigured for digital I/O. It wasn’t blinding, but it was visible in a well-lit room. That only worked with no resistor at all, so I don’t think robofreak is going to be able to directly drive his encased LED unless he adds a transistor to the mix…
Oh, the upcoming Vex PWM->DC convertor might do nicely to drive an LED.
Depending on exactly how it works, you could hook up an LED through a suitable resistor. Or, you could wire up a small incandescent bulb (or relay) with a diode in series.
To program it, you’d just set the pwm value such that 0 is off, and 255 is on. Intermediate values could provide different brightness levels.
Can’t wait to get my hands on one and try all this out!
Here is straight from the Vex Sensor Test Procedure pdf:
“LEDs on DIGITAL 13, 14, 15 and 16. Connect
anode on inner contact (signal pin which
is nearest the numbers). Connect Cathode on
outside contact (ground).”