All Projects → mateuszroth → esp8266-web-control-panel

mateuszroth / esp8266-web-control-panel

Licence: other
WeMos D1 / D1R2 (ESP8266) Web Control Panel via WiFi using Johnny Five (JavaScript) and Socket.IO

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to esp8266-web-control-panel

etherport-client
Client-side virtual serial port for Etherport. Used to implement firmata-compatible boards and relays.
Stars: ✭ 20 (+11.11%)
Mutual labels:  johnny-five, firmata
Openmqttgateway
MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility, SMS & LORA.
Stars: ✭ 2,413 (+13305.56%)
Mutual labels:  arduino-uno, wemos-d1
sps30
Sensirion SPS30 driver for ESP32, SODAQ, MEGA2560, UNO, ESP8266, Particle-photon on UART OR I2C coummunication
Stars: ✭ 57 (+216.67%)
Mutual labels:  arduino-uno
pxt-johnny-five
A sample MakeCode editor using Johnny Five
Stars: ✭ 37 (+105.56%)
Mutual labels:  johnny-five
fyp-rescue-robot
This project is my final year capstone project - A self-navigating robot for search and rescue. We build a robot in ROS and integrate several functions: self-navigation, object detection and tracking, and an Arduino board to grab simple objects. The final demostration video is shown here: https://youtu.be/2dpzOpEn4hM
Stars: ✭ 32 (+77.78%)
Mutual labels:  arduino-uno
SoftwareOscilloscope
A software oscilloscope for Arduino made with Python and PyQtGraph
Stars: ✭ 98 (+444.44%)
Mutual labels:  arduino-uno
arduino-midi-sound-module
Turn your Arduino Uno into a 16-voice MIDI sound synthesizer
Stars: ✭ 43 (+138.89%)
Mutual labels:  arduino-uno
px-fwlib
open source bare-metal C firmware and documentation for microcontrollers
Stars: ✭ 247 (+1272.22%)
Mutual labels:  arduino-uno
PsxNewLib
Playstation controller interface library for Arduino
Stars: ✭ 81 (+350%)
Mutual labels:  arduino-uno
RFLink
RFLink for ESP, with MQTT client
Stars: ✭ 52 (+188.89%)
Mutual labels:  arduino-uno
oledjs-designer
Draw in the browser, display on an OLED hardware screen.
Stars: ✭ 56 (+211.11%)
Mutual labels:  johnny-five
RedBoard
The RedBoard is SparkFun's take on the Arduino Uno. It combines the simplicity of the Uno's Optiboot bootloader (which is used in the Pro series), with the stability of the FTDI and a mini-B USB connector.
Stars: ✭ 32 (+77.78%)
Mutual labels:  arduino-uno
Lumos
😴 Smart Lighting for Better Sleep
Stars: ✭ 98 (+444.44%)
Mutual labels:  arduino-uno
discord-arduino-bot
Easy to discord control your arduino with commands
Stars: ✭ 13 (-27.78%)
Mutual labels:  arduino-uno
pi-io
Raspberry Pi IO Plugin for Johnny-Five
Stars: ✭ 14 (-22.22%)
Mutual labels:  johnny-five
NASSCOM-MHRD-IOT-Practical-Module 1-2
Arduino on TinkerCad
Stars: ✭ 26 (+44.44%)
Mutual labels:  arduino-uno
ArduRTOS
Real Time Operating System Lessons using Arduino and The FreeRTOS Kernel
Stars: ✭ 46 (+155.56%)
Mutual labels:  arduino-uno
Arduino
🚀 Proyectos de todo tipo para arduino utilizando sus sensores y actuadores. 🤖
Stars: ✭ 27 (+50%)
Mutual labels:  arduino-uno
Syslog
An Arduino library for logging to Syslog server in IETF format (RFC 5424) and BSD format (RFC 3164)
Stars: ✭ 105 (+483.33%)
Mutual labels:  arduino-uno
Sim800L-Arduino-Library-revised
HIGH SCHOOL PROJECT - The purpose of this Arduino library is to allow the use of the SIM800L module in a simple and transparent way.
Stars: ✭ 81 (+350%)
Mutual labels:  arduino-uno

WeMos D1 (ESP8266) Web Control Panel via WiFi

using Firmata, Johnny Five (JavaScript) and Socket.IO

not tested but after updating pins should work with WeMos D1R2 and Arduino UNO

Programming the ESP8266 WeMos D1 using JavaScript library Johnny Five to work remotely.

Requirements

  • make sure you have installed Node.js and Python in version 2.7
  • you should have Arduino 1.6.8 or higher installed

Installation

  1. Follow instructions for installing the newest hardware package using git for WeMos D1.
    1. Install the required driver (CH340G or CP2104).
    2. Follow instructions from the Using git version section.
    3. While instaling the hardware package, make sure you have at least v2.2.0 of ESP8266 Core (on Mac, check in your terminal cat ~/Documents/Arduino/hardware/esp8266com/esp8266/package.json).
    4. After install hardware package, you will see WeMos boards in the Tools→Board:xxx. Choose your right board.
  2. Then install newest Firmata from master branch from git repository (on Mac you have to delete existing Firmata directory ~/Documents/Arduino/libraries/Firmata and then run git clone [email protected]:firmata/arduino.git ~/Documents/Arduino/libraries/Firmata in your terminal). Firmata is a protocol that will allow us to communicate with our microcontroller using languages like JavaScript.
  3. Now you can use StandardFirmataWiFi (in Arduino, choose File -> Examples -> Firmata -> StandardFirmataWiFi) which enables the use of Firmata over a TCP connection and it can be configured as either a TCP server or TCP client.
    1. Configure wifiConfig.h (ESP8266 is enabled by default but follow all the 6 steps).
    2. You can skip step 4 but I prefer to have a static IP for both the computer and the board. If you decide to use static IP then on Mac you can check the router IP address and the network mask in Settings -> Network -> Advanced -> TCP/IP.
    3. Enable Serial debugging by uncommenting //#define SERIAL_DEBUG in StandardFirmataWiFi.
    4. Change Upload Speed in Menu -> Upload Speed to 115200.
    5. Then upload the project to your WeMos D1 in Arduino IDE.
  4. Check if the connection is configured properly by opening Serial Monitor (in Arduino, Tools -> Serial Monitor) at baud 9600. If the board is sending WiFi connection failed then try to reconfigure wifiConfig.h or try to use another WiFi point (your computer and the board should be in the same network).
    1. While I used hotspot on my mobile, it worked only for 2.4 GHz and not for 5 GHz.

Yay, your board is configured and ready to communicate via Firmata with your JavaScript code on your computer!

Test Firmata.js with your board

Firmata.js is the base for Johnny Five so let's test it with our board which has StandardFirmataWiFi deployed. Here's a simple Firmata.js client example with additional instructions. Just copy source code to a file for example named index.js and use correct IP address. Then run command npm install firmata etherport-client serialport --save to install dependencies and run the code by using node index.js. The LED on digital pin 2 should blink. You can change the pin to something different, for example digital pin 13.

If you're having some troubles with running the script, the command npm install serialport --build-from-source --save may help.

Test Johnny Five

If everything was done well, you can check simple J5 code (remember to install dependencies by using command npm install johnny-five etherport-client serialport --save):

var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
// update host to the IP address for your ESP board
var board = new five.Board({
    port: new EtherPortClient({
        host: "10.0.0.17", // #TODO UPDATE!
        port: 3030
    }),
    timeout: 1e5,
    repl: false
});

board.on("ready", function() {
    console.log("READY!");
    var led = new five.Led(2);
    led.blink(500);
});

Now you can try code examples for Johhny Five.

In opposite to Johhny Five, you can check Breakout.

Build the web panel from the repo

Run npm install to install packages.

Start server/server.js on your server machine (command node server/server.js).

Update ESP device and server IP in device/client.js file and start client (command node device/client.js).

WeMos D1 vs D1 R2

There are two versions of the WeMos D1, called the "D1" and the "D2 R2". There are some pin differences between them.

WeMos D1 vs D1 R2

Source

WeMos D1 R2 vs Arduino UNO

There are some differences between these two boards.

WeMos D1 R2 vs Arduino UNO

Sources:

Links

Other helpful links:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].