It's been a while folks, good to be back.
I'm trying to create a minimalist program which will make an led blink through the usb port. I have found that usb cables have two power (5v) which are always on and two data cables.
I am looking to eventually tie a website peripherals - but first I must make baby steps.
Does anyone know how I would go about sending such a "signal" across the data cables so as to get a voltage? Anyone know of any good reads to learn about this?
Thanks!
USB LED project
Moderator: General Moderators
As a start, what programming language you are going to use?
P.S
5V is too much for a simple LED. 1.5V is optimal, so you will have to use a resistor and connect it in a series to the LED.
V = I * R, source is 5V and we want 1.5V to go to the LED, so we want the other 3.5V to fall on the resistor. Also, 20mA is optimal current for a LED, so we get:
R = V / I = 3.5 / 20mA = 3.5 / (20 * (10^-3)) = 175 Ohm
175 Ohm is not a standard resistor I believe, so in practice you'll want to use a 200 Ohm resistor.
You can also use a 100 Ohm resistor if you want the LED to emit more light.
P.S
5V is too much for a simple LED. 1.5V is optimal, so you will have to use a resistor and connect it in a series to the LED.
V = I * R, source is 5V and we want 1.5V to go to the LED, so we want the other 3.5V to fall on the resistor. Also, 20mA is optimal current for a LED, so we get:
R = V / I = 3.5 / 20mA = 3.5 / (20 * (10^-3)) = 175 Ohm
175 Ohm is not a standard resistor I believe, so in practice you'll want to use a 200 Ohm resistor.
You can also use a 100 Ohm resistor if you want the LED to emit more light.
Well I've never done this before with USB to be honest, but I did such things with LEDs, C/Assembler 8086 and the parallel connector. I'm sure it's very easy though... just google it. I do have some old notebook with info about the USB connector from Assembler 8085 class, but my guess is that you won't be using Assembler, am I right?