


After copying the code onto a new sketch, you will need to upload the demo.Next, open up Arduino IDE and copy the following code into a new sketch.If you do not have the base shield, you can directly connect the relay and button to the Arduino board by following the below connection:.Your connection should look something like this:.Connect Seeeduino to PC via a Micro-USB cable.Plug Grove – Base Shield into Seeeduino.Connect Grove-Button#1 to port D2 of Grove-Base Shield and connect Grove-Button#2 to port D3 of Grove-Base Shield.Firstly connect Grove-Relay to port D4 of Grove-Base Shield.Base Shield V2 – Optional, to make connections easier.
#ARDUINO CAMERA SIGNAL SWITCH CONTOL HOW TO#
Now that we know what is the relay, how it works and which type of relay will suit your project the most, let us get started by using them with the Arduino.įor today’s example, we will be showing you how to control a relay with a button where when 1 button is pressed, the relay will close and when another button is pressed, the relay will open. Interested? Check out our Seeed Relay Selection Guide to find the relay that suits your project the most! In addition, we also offer several special functions relays like a relay shield and a Heelight relay which you can control using sound commands! Not what you are looking for? Here at Seeed, we offer over a dozen relays from electromechanical relay, solid-state relay to also reed relay. The control command is transmitted via the I2C interface, the on-board STM32F030F4P6 will parse the command so that you can control the switch you want.ĭo not know which relay to pick, no worries! We compiled them into a table and compared their differences so you know which relay will suit your project needs the most! Relay Name We use an onboard STM32F030F4P6 to control the channels separately.The 4-channel SPDT relay is similar to the 2 channel SPDT relay but with four single pole – double throw (SPDT) switches which only require low-voltage and low current signals to control them.
