A Light Emitting Diode (LED) can be connected directly to a PICAXE output pin (using a current limiting resistor in series). It is more common to connect the LED/resistor betwwen the output pin and 0V, however it may also be connected between the output pin and V+.
LEDs are polarised, and so only work one way around. Generally the long leg is the anode (positive) leg, and there is also a flat edge on the plastic casing marking the cathode (negative) leg.
The LED create module.
The LED will light with a 'high' command and switch off with a 'low' command.
Bill of Materials
|Red 5mm LED ||LED001 ||1 ||Buy Now |
|Green 5mm LED ||LED002 ||1 ||Buy Now |
|Yellow 5mm LED ||LED003 ||1 ||Buy Now |
|Blue 5mm LED ||LED004 ||1 ||Buy Now |
|Pink 5mm LED ||LED014 ||1 ||Buy Now |
|330 ohm resistor (pack 100) ||RES330R ||1 ||Buy Now |
Submit Your Own Code!
You must be logged in to submit code examples. Login now.