1 Channel Relay 3V Relay Module is one of OCTOPUS series of electric bricks. It is fundamentally designed according to OCTOPUS electric brick series with 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.
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, 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 open. Thus, we are able to control the connection of contact switch through code.
The normally open contact is closed, while the normally closed contact is opened.