Motion Detection Over Wifi




Introduction: Motion Detection Over Wifi

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

Jumper wire

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: 2. Install Arduino IDE, open preferences, find additional boards manager and paste: 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: , 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!

Be the First to Share


    • Stick It Challenge

      Stick It Challenge
    • Home and Garden Contest

      Home and Garden Contest
    • Woodworking Contest

      Woodworking Contest



    Question 1 year ago on Step 3

    Hi there! When I hit upload code, I get the following:

    Warning: platform.txt from core 'MediaTek ARM7 EJ-S (32-bits) Boards' contains deprecated"{compiler.path}{}" {} "{build.path}/{archive_file}" "{object_file}", automatically converted to"{compiler.path}{}" {} "{archive_file_path}" "{object_file}". Consider upgrading this core.
    /home/l0010o0001l/.arduino15/packages/LinkItOneLinuxArduino/hardware/arm/1.1.17/libraries/LWiFi/LWiFi.cpp: In constructor 'LWiFiLoginInfo::LWiFiLoginInfo()':
    /home/l0010o0001l/.arduino15/packages/LinkItOneLinuxArduino/hardware/arm/1.1.17/libraries/LWiFi/LWiFi.cpp:24:18: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
    arm-none-eabi-g++: error: syscalls_mtk.c.o: No such file or directory
    exit status 1
    Error compiling for board LinkIt ONE.

    How do I fix this error? Thank you in advance!


    6 years ago

    Very Cool...Does this work on the Raspberry Pi too?

    DIY Hacks and How Tos

    Great project. There are so many potential applications for a wireless motion sensor.