Asked — Edited

Need Help With Led Plz

how can I turn on and off the LED from my robot eyes? I have them pludged in directly to a dig port(d3) but I don t know how to make this work. they stay on all the time but cant turn them off .


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

United Kingdom
#1  

Sounds like you have connected the LED to the VCC and Ground not the Signal and Ground.

Connect the anode of the LED to the Signal of the digital port. Connect the cathode side of the LED to the Ground of the digital port.

In ARC add the Digital Set Digital control.

Set the Port in the Set Digital control to that of the LED

Click on the button to turn on and off.

Refer to the LED Hardware Tutorial for more info.

#2  

OK thanks rich simple enough.that should help.

United Kingdom
#4  

There's not much chance of losing me dude:)

Although I am away next Tuesday to Thursday (but guaranteed I'll still log on...)

Netherlands
#5  

Maybe you should add a current limiting resistor, you don't want to burn one of your EZ-B's outputs :D

United Kingdom
#6  

@Niek

Quote:

The one thing to notice is an LED connected to a digital port on the EZ-B does not need a resistor. This is because the digital ports on the EZ-B have pull-up resistors built-in.

There was a discussion on this a couple of months ago here

Netherlands
#7  

@Rich

A pullup resistor is not the same as a current limiting one.

But hey, if DJ said it won't do any damage I believe him.

#8  

Thanks guys ! Working great !now I need help with a better script to make the leds to come on n off when the robot talk.all I ve done so far is to make it blink by: set(dig port,on) and sleep etc.. but that s as far as I have ventured to do so far.any fun ideas?