Introduction: IoT With LinkIt One - Relays
The LinkIt One is a great board to work with IoT, and the IoT is to take everyday electronics to the internet and make them smarter. In the previous instructables of this series I showed you how to get started with the LinkIt One and connect common electronics to the internet now it is time to upgrade and control high power electronic devices to the internet, like connecting your home lights, coffee maker, etc.
In this instructable I'm going to show you how to get started with controlling a relay over the internet using a standard web browser.
So lets get started.....
Step 1: Tools and Components
All that you need for this instructable is -
- LinkIt One Board
- Relay Board
- Jumper wires
Note - No soldering skills are required for this instructable as we will be using a breadboard. Also that the Particle Core is no longer available so you can get a photon and all the instructions and code in this tutorial run fine on a Photon.
Step 2: Antenna
To start off with we need to set up the board to connect to a WIFI network, first you need to update the on board firmware, please refer to the first tutorial of this series on, how to do it.
Next we need to attach the antenna to the board the antenna for WiFi is the thinnest of the three antennas provided along the LinkIt One box. The antenna plugs onto the board where it says WiFi / BT, be careful while you plug it in. Next, lets setup up the circuit...
Step 3: Circuit
The connections depend on the relay board you have, I used one which I brought for the Particle Core, it is a 4 channel relay and has an external power supply so we don't have to worry about burring down the LinkIt One.
In the upcoming instructables I would show you how to control your home lights using this relay.
Step 4: Code
The code can be found below, make sure you edit the fields where it says network SSID and network password with your WiFi name and password. Upload the code using an the Arduino IDE with the link it one plugin. Instructions on how to install the plugin can be found in the first instructable of this series.
Step 5: Testing
After uploading the code open up a serial console and note the IP address once the board is connected. Open the IP on a browser of a device connected to the same network. Now you should see a web page like the one in the picture. You can toggle the Relay on or off by switching the controls in the webpage.
We have a be nice policy.
Please be positive and constructive.