TINKER PiEDESIGN IN INDIA

Relay module with TinkerPie

A switch the board controls. For active-low modules, on = false.

TypeOutputs and actuators
Connect toany accessory pin
Givesswitches a lamp, fan or pump
SimulatorYes: a control appears under the simulated board

How it works

A relay is a switch moved by an electromagnet. The small signal from the board energises the coil, which pulls a metal contact and switches a separate circuit, such as a pump or a fan. The two circuits stay electrically apart.

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.relay(Pin.S1, true)

// Arduino C++
outputs::relay(Pin::S1, true)

Good to know

Projects with the Relay module

Smart street lightA light sensor and a relay: when it gets dark, the lamp turns on by itself.Sensor projects

Similar modules

More projects to try

Questions

Can I try the Relay 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.

Can I switch a home lamp with the relay?

Not in our projects. Mains electricity (230 V) is dangerous. Use the relay with low-voltage pumps, fans and LED strips, and let qualified adults handle mains wiring.