Introduction: ProgramESP8266

Picture of ProgramESP8266

Note: The sensors described here are compatible with a raspberry pi home automation server described in this instructable: https://www.instructables.com/id/Raspberry-Pi-Home-Automation-Server/

An ESP8266 is a cheap wifi module that I use for home automation.

The programming steps are:

  1. Obtain the programmer from tindie:

https://www.tindie.com/products/Paulware/esp8266-programmer/

2. Install python 2.7 and the windows driver for the device

3. Modify the first 2 lines of sensor.lua to specify the SSID and password of your local network:

local SSID = "YourSSID"
local password = "yourPassword"

4. Obtain an esp8266 and sensor from tindie:
like: https://www.tindie.com/products/Paulware/text-sending-water-sensor/

5. Insert the Esp8266 in the programmer and insert the programmer into your pc. Use the control panel (ports) to determine the com port that has been assigned.

6.Run LuaLoader, and press the connect button, then upload file: sensor.lua

8. Remove the esp8266 from the programmer and place it in the sensor. It will now log onto your network and start monitoring.

Step 1: Windows Driver and Lualoader

Step 2: Go to Control Panel, Device Manager to Determine the Com Port Assigned by Your Pc

Picture of Go to Control Panel, Device Manager to Determine the Com Port Assigned by Your Pc

Press the restart button on the Lua Loader. You should see "node.restart()" appear, then the unit should respond with ">"

Next upload the file "sensor.lua".

Attached is a generic sensor.lua file. You will need a specific sensor.lua that matches your sensor.

Press the restart button again, the unit should print some text every few seconds.

    Step 3: Obtain an Esp8266 and Sensor From Tindie.com

    Picture of Obtain an Esp8266 and Sensor From Tindie.com

    When you order a sensor from tindie like this one:

    https://www.tindie.com/products/Paulware/text-sending-water-sensor

    you will receive an esp8266 that has already been flashed as is ready to be programmed.

    You will also receive a sensor.lua file which will be used to program the esp8266 to perform a specific task (such as monitoring for the presence of water).

    Edit the first 2 lines of the sensor.lua file:

    local SSID = "YourSSID"
    local password = "YourPassword"

    Change the SSID to be the name of your local home network.

    Change the password to be the security password for your network.

    Step 4: Program the Sensor Using Lua Loader

    1. Using Lua Loader: press the restart button (">" should appear) load the sensor.lua file, then press restart. The unit should send text every few seconds.

    Remove the esp8266 from the programmer and place it in the sensor.

    When the sensor is connected to a power supply, it will log onto your network and start monitoring.

    Step 5: If You Ever Need to Reload Sensor.lua....

    Picture of If You Ever Need to Reload Sensor.lua....

    First, you will need to remove the old sensor.lua.

    Follow the steps in the above diagram to remove sensor.lua using lualoader

    Comments

    About This Instructable

    2,682views

    31favorites

    License:

    Bio: thanks
    More by paulware:433 Nunchuk Receive Motor ControlRemote Control Vehicle Transmitter With Arduino BlocklyArduino 433 Transmit
    Add instructable to: