MENU

Part II : Make the camera wireless with ESP8266

 

Let’s sum up what we have done so far :

  • we ordered a pair of color tracking cameras
  • we modified them into Infrared tracking cameras
  • we updated their firmware to track Infrared and tested them
  • we built a small case to give them a nice look

There is one last modification we have to bring to the cameras, and that modification is a game changer : we are going to make them wireless !

Of course we won’t send the video, but the coordinates of the points the camera is tracking. In this article we are going to connect an ESP8266 Wifi shield to the CmuCam to send coordinates over Wifi.

Here is what we are going to do, step by step. All you need to know for this part is how to program an Arduino (I have seen 8 years old doing it so…I’ll give you a link just in case).

 

The basics

Connect NodeMCU to CmuCam

Program the ESP8266

The basics

Here we’ll go through all you need to know to make it out of this tutorial alive.

First if you don’t know what is Arduino, please read about it here : Arduino.

We are not going to use a regular Arduino board but an ESP8266, which has been made compatible with Arduino. To make it easier, we will start with a NodeMCU dev board which includes an ESP12E (which includes an ESP8266 ^^) and a USB programmer :

NodeMCU_DEVKIT_1.0

 

You will need one per camera, but luckily you can find them starting at 3.28$, shipping included on Aliexpress.

Connect NodeMCU to CmuCam

Here is how to wire the CmuCam to your brand new ESP8266 :

Pinout ESP12E NodeMCU CmuCam5

Program the ESP8266

We won’t go through “How do we install Arduino IDE”, if you are still reading this then I’m sure you’ll be smart enough to know how to use Google 😉

For this part first go here to learn how to use Arduino with an ESP8266 and configure your Arduino IDE.

You should install the following library for the camera (please use my version otherwise it won’t work with the ESP8266 : Pixy ESP8266 library (more documentation on the library here).

Make sure to download (from the Arduino library manager) all the libraires required for Wifi connection.

And here is the code you have been waiting for. Here is what is does :

  1. Turn the ESP8266 into an Access Point so you can connect to it and enter your Wifi informations
  2. Try to auto update from a server
  3. Start communication with the camera, and broadcast datas over Websocket (it acts as a websocket server)

Please note that it is a very early version for tests purposes. Major fixes and improvements are yet to come.

COMMENTS: 2
  1. September 10, 2016 by james Reply

    Sorry but please stop promoting Aliexpress. I just got scammed by them sending a fake camera.

    • Profile photo of JulesThuillier
      December 17, 2016 by JulesThuillier Reply

      Well you got scammed once, it doesn’t mean that all Chinese supplier are going to scam you. You gotta learn how the game works 😉

Leave a Comment!

Your email address will not be published. Required fields are marked *

Skip to toolbar