This is a great news to the IoT community! ESP8266 is definitively the best and cheapest board for the Internet of Things, and it is now supported on the OpenPLC platform. I tested the code on my NodeMCU board and it runs smoothly! However, since there are so many ESP boards around, I would love to see other people testing it as well and reporting here the results.
I will later update the website with better instructions, but to install the process if fairly simple:
1) Update your OpenPLC on your Windows, Linux or RaspberryPi if you already have it installed. Just remove the OpenPLC_v2 directory, git clone it again and build. At the end of the build process, choose the ESP8266 driver.
2) Download the firmware that is attached on this post to your ESP8266 board. The firmware requires the arduino IDE to be uploaded. Instructions on how to install the ESP8266 tools on the Arduino IDE are here: https://github.com/esp8266/Arduino
3) Before uploading the firmware to the ESP8266 board, modify it according to your WiFi Network. The information you need to update is on the first lines of the code. Just change the name of your network, your password and the OpenPLC Server IP:
#define WIFI_NAME "My SSID"
#define WIFI_PASSWORD "password"
#define OPENPLC_SERVER_IP "192.168.0.1"
#define DEVICE_ID 0
The OpenPLC Server IP is the IP Address of the computer that is running the OpenPLC. Note that there is another parameter, called Device_ID. It means that you can have multiple ESP8266 connected to the same OpenPLC application. This is neat, but we will talk about it later. For now, leave it zero.
4) Upload the code to your board and then start the OpenPLC Application on your computer/raspberryPi
5) Have fun and post here the results
The IO map for the board is:
Digital Inputs: D4, D5, D6 and D7
Digital Outputs: D0, D1, D2 and D3
Analog Input: A0
Analog Output: D8 (PWM based)
Note: these pin numbers are relative to the NodeMCU board. If you have a different board, check online the relation between pins.