In this tutorial we will show how to use Raspberry Pi and relay module as internet controlled switch. You can control up to 17 devices over internet by your phone or remote computer.
- Raspberry Pi
- Relay module
See buying guide at the end of this tutorial.
2. Connect wires
Conenct relay and Raspberry Pi. In this case we will use only one relay, but you can use up to 17 relays. Connect GPIO 5V VCC and GND to relay. Then connect relay IN to GPIO pin 7 (GPIO04).
Next connect relay to light or other device.
3.Installation and configuration
Install EasyIoT server to SD card. You do not need NRF24l01 connected to Raspberry Pi if you are using only GPIO driver. After installation switch on Raspberry Pi. Go in WEB browser on computer and type Raspberry Pi IP address (computer must be on the same network as Raspberry Pi). Use username admin and password test when asked. Go to Configure->Drivers->Raspberry Pi driver and enable driver. Be sure to select right version of Raspbery Pi board. You can use all GPIO pins (17). In our case we wil use only Pin 07 (GPIO04). Next enable Pin_P1_07 as output.
Then go back to Configure->Groups and modules and add new module to group. And that's all. Now you can see switch on front page.
Go on front page and select pin you just added. Try to switch relay on and off.
See more tutorials at http://iot-playground.com/build
To support this site and EasyIoT framework development please buy in our store.
Raspberry Pi 512MB Model B +
Raspberry Pi Model B+, ARM1176JZF-S Running at 700MHz, 512MB RAM.
Acrylic Case Shell Enclosure for Raspberry Pi B+