-
Notifications
You must be signed in to change notification settings - Fork 1
ESP8266 crib sheet
Alex Potsides edited this page Apr 28, 2015
·
7 revisions
- esp8266 module
- 3.3V FTDI FT232RL USB to TTL Serial Converter - example
- Vcc = 3.3V (needs around 300-400mA peak)
- Gnd = -ve ground
- CH_PD = 3.3v (solder a 1k resistor to Vcc)
- TXD = Tx data connect to Rx on FTDI/Serial/Arduino
- RXD = Rx data connect to Tx of FTDI/Serial/Arduino
-
Use esp-vagrant to create a build environment
-
Update
/user/config_wifi.h
with your WiFi settings -
The default Makefile doesn't work - use this one instead to compile the firmware
make
-
Connect GPI0 to ground to enable firmware update mode
-
Flash ROM
make flash
-
Flash Arduino with StandardFirmata set to 115200 baud (do a find/replace for 57600 in the sketch)
-
Connect to Arduino:
- Vcc = 3.3V (needs around 300-400mA peak)
- Gnd = -ve ground
- TXD = Rx
- RXD = Tx
- Run Johnny-Five:
var net = require('net');
var five = require('johnny-five');
var firmata = require('firmata');
var options = {
host: '192.168.1.88', // find your host somehow
port: 23 // default is telnet port
};
var client = net.connect(options, function() { //'connect' listener
console.log('connected to server!');
var socketClient = this;
//we can use the socketClient instead of a serial port as our transport
var io = new firmata.Board(socketClient);
io.once('ready', function(){
console.log('io ready');
io.isReady = true;
var board = new five.Board({io: io, repl: true});
board.on('ready', function(){
console.log('five ready');
//Full Johnny-Five support here:
var led = new five.Led(13);
led.blink();
});
});
});