ESP8266/Ideas: Difference between revisions

From Playful Exploration
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[category:r2a2]][[category:ESP]]
[[category:r2a2]][[category:ESP]]
== Programmer for raw chips ==
[https://blog.adafruit.com/2016/06/17/technique-for-using-pogo-pins-for-solderless-programming-testing-pcbs-with-castellations/ Adafruit to the rescue]


== working with Windows ==
== working with Windows ==
Line 15: Line 18:


<htmlet>ESP8266-DiagramDraft02</htmlet>
<htmlet>ESP8266-DiagramDraft02</htmlet>
== Connecting ESP8266 to Raspberry Pi ==
Turn off aLaMode (don’t know if this is necessary)
Connect Tx, Rx, GND directly to GPIO pins
Connect VCC, CH_PD, to 3v3
Device is accessible via /dev/ttyS0 on 9600 baud. Used Arduino IDE serial monitor.
Used a variety of AT commands. Verified that I could connect to its Access Point (open wifi)
Connected it to home wifi network
Pinged repeatedly. Power off/on time is < 1 second
____________
Flashing ESP from RPi using NODEMCU firmware
Steps:
# Ensure /dev/ttyS0 port is a functioning serial port
This may already be setup. Mine was configured when installing aLaMode ArduinoIDE support.
# Install python library pyserial (used by firmware uploader tool)
sudo pip install serial
# Baud rate. This presented a problem the first time around. But the nodemcu firmware uploader tool is open source so I was able to figure out the problem myself. Here’s the code that prevented the firmware from uploading to my ESP:
#Default baudrate. The ROM auto-bauds, so we can use more or less whatever we want.
ESP_ROM_BAUD = 115200
(Might want to check the assumption on this one.)
My ESP has the original firmware installed and does not auto-sense baud rate like some of the later versions do. The NODEMCU tool uses 115200, so I had to change the baud rate from 9600 (default) to 115200.
AT+CIOBAUD=115200
#. Start a new clone of nodemcu-firmware from git
sudo git clone https://github.com/nodemcu/nodemcu-firmware
Or if this is already done update the repo (from nodemcu-firmware folder)
sudo git pull
# If necessary, change directory to the nodemcu-firmware project
cd /nodemcu-firmware/
# Put ESP8266 into flash mode by connecting GPIO-0 to ground and then apply power (or power cycle)
Note: connecting GND and GPIO0 to different grounds on RPi (pins 6 and 14) did not register as GPIO0=low (went into some sort of non responsive mode). Therefore, GND and GPIO0 should use a common ground (be directly connected)
# Run uploader specifying the serial port and firmware that was included in the git clone (from the nodemcu-firmware root folder):
sudo tools/esptool.py --port /dev/ttyS0 write_flash 0x00000 pre_build/latest/nodemcu_latest.bin
Success!
Connecting...
Erasing flash...
Writing at 0x00060a00... (100 %)
Leaving...
The ESP is now ready to be configured for lua scripting. I’ll be taking advantage of MQTT for sending simple messages around my home.

Latest revision as of 22:27, 19 June 2016


Programmer for raw chips

Adafruit to the rescue

working with Windows

Driver for FTDI interface

Applications to program the ESP8266

NODElua

ESP8266 as an Arudino device

Options

image/svg+xml DHT 11 100 uFCap as close to board as possible Software configured:GPIO,SPI,I2C orSerial Temperatur and Humidity LED control 220ohm TFT Display Barometric Preasure BMP180 low-power-schottky diode- drops voltage to 3.3V- protects from reverse poling- avoids voltage regulator USB to Serialto unbrick + - + Qty 3 1.2 V Rechargable + Qty 2 1.5 V Alkaline + - power switch + Power options Device options/examples AMS1117-3.3 USB or4.8V-15V -RXTX+ -data+ -on/off+ -??+ -???+