TINKER PiEDESIGN IN INDIA

LED module with TinkerPie

A single bright LED with its resistor.

TypeOutputs and actuators
Connect toany accessory pin
Giveson / off or 0-100 %
SimulatorYes: a control appears under the simulated board

How it works

An LED (light-emitting diode) gives light when current flows through it the right way round. The module already includes the resistor that limits the current, so it is safe to connect straight to a pin.

How to wire it

Signal pin to S1-S4 or P10-P13. Motors, pumps and lamps always go through the relay or a driver module, never straight to a pin.

Code

In blocks: Accessories category in TinkerPie Studio. As code:

// JavaScript
outputs.led(Pin.S1, true)
outputs.ledBrightness(Pin.S1, 40)

// Arduino C++
outputs::led(Pin::S1, true)
outputs::ledBrightness(Pin::S1, 40)

Good to know

Try it in TinkerPie Studio

Similar modules

More projects to try

Questions

Can I try the LED module without buying one?

Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.

Why does an LED need a resistor?

Without one, too much current flows and the LED (and the pin) can be damaged. Try the "Oops! LED without a resistor" example in TinkerPieCircuit.