1 Channel Relay 3V Relay Module is one of the OCTOPUS series of electric bricks. It is fundamentally designed according to OCTOPUS electric brick series with the same shape, PCB positioning holes, and electric brick connectors. OCTOPUS 1 Channel Relay has adopted a mini and high-quality HUIKE relay, which is available to control all kinds of home appliances and high current load devices. This is a common accessory module for electronic DIY fans.
Equipped with a high current relay. Its max current can be up to 2A.
Adopt a 3V power supply, which is enough to support micro:bit.
Contact control, including a normally open contact and a normally closed contact.
Convenient wire connection.
Connect the relay module to P1 on octopus:bit using a jumper cable.
Insert micro:bit into the edge slot of octopus:bit.
Click to open Makecode, and write your code in the editor area. Set high electric level to P1 port to make the normally open contact close and the normally closed contact opens. Thus, we are able to control the connection of the contact switch through code.
Link of the whole program: https://makecode.microbit.org/_Lvega7TP6ggz
You can also download it from the page below.
The normally open contact is closed, while the normally closed contact is opened