In this instructable, I will show you the steps to make an internet connected motion detector.
Step 1: Parts and Tools
Here are the parts and tools that you will need to make this project:
PIR motion sensor
Linkit ONE Board and WiFi Antenna (Included with board)
Step 2: Download Drivers
Here are the steps to get it set up.
1. Download latest Arduino IDE: https://www.arduino.cc/en/Main/Software 2. Install Arduino IDE, open preferences, find additional boards manager and paste: http://download.labs.mediatek.com/package_mtk_link... into the text box. 3. Go to Tools --> Board --> Board Manager. Scroll down until you see "Mediatek Linkit One" and click it, then you should see an install button, click it. 4. Download USB drivers from: https://labs.mediatek.com/site/global/developer_to... , Unzip the file, and open the "Drivers" folder and double click the .mpkg file to open it. This will take you through a setup wizard, just accept the terms and conditions and press continue whenever you can.
Step 3: Wiring
Using jumper cables, wire the "signal" pin of the PIR sensor to A0 on the Linkit ONE board, PIR "negative" to the GND pin on the Linkit ONE, the PIR "positive" to the 5v pin on the Linkit ONE, The LED's negative to a "GND" on the Linkit ONE, and the LED's positive to pin 13.
You will also need to connect the wifi antenna. Do this by taking the thin rectangular antenna and plugging it into the middle UFL connector labelled "WiFi/BT ANT"
Step 4: Upload Test Code
Upload this test code to the board. This is to test the circuit, and find the IP address.
You will need to change a few parts of the code for it to work. Change the "your_ap_ssid" in #define WIFI_AP "your_ap_ssid" to your WiFi network name. Then, change the "your_password" in #define WIFI_PASSWORD "your_password" to your WiFi password. Keep the quotation marks around both of the parts that you just changed.
Now, press upload. Once uploaded, open the serial port. In the serial port, there will be an IP address. Paste the address into a internet browser, and press enter. You should see a counter saying how many times the code has looped. Keep this page open because you will need the IP address for the final code.
Step 5: Upload Final Code
Upload this code to the board. Once uploaded, go back to the internet browser and paste the IP address from the last step and press reload. You should now see a webpage that says "Motion Detected" or "Motion Stopped". If so, everything is working.
Step 6: Done!
Thank you for viewing this instructable! If you have any ideas on how this can be improved, please leave suggestions in the comments below!