iPhone controlled gate opener

WebControlled GateYou always wanted a smartphone-controlled door lock because the tech world is here to shove them in your face,
Today I got my ESP8266 DEV Board… It’s a PCB from Olimex with an onboard relay and a 5V->3.3 voltage regulator,

In this project I’ll use a standalone web server to create an iPhone remote for my gate

Where to buy?

Unpacking ESP8266 from Olimex


You can find this tiny board from Olimex’s web store for the astonishing price of 9 euros,

Let’s install NodeMCU!

NodeMCU is an open-source firmware that helps to prototype IOT product within a few Lua script lines, first we have to install it on our esp8266:
Download the flasher from Their GitHub Repo and connect the TX/RX/GND/VCC pin to your favourite USB-TTL converter following the pinout diagram:
(The pin n°1 is the one nearest to the relay)

Olimex ESP8266 Pinout Diagram
Now you simply have to power on the board keeping the button pressed and then click “Flash”, the software will do all the hard work for you:

Flashing NodeMCU

It’s time to code!

Now we should load our code using ESPlorer; it’s an Integrated Development Environment (IDE) for ESP8266 developers, downlod it from here (Warning! This requires java!) and launch the program


Select the baudrate (should be 9600) and press Connect,  then select the “NodeMCU+MicroPyton” section and load the code you can find here: WebServer Code – PasteBin

Save this file as init.lua and upload it! On the right side the device will print the gained IP and you can toggle the realy using that URL


Now you can develop your own application using this stupid example, I wrote a simple HTML/PHP application to remotely open the gate using an iPhone, connecting the realy to the Open switch:



Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.