Difference between revisions of "Adafruit HUZZAH ESP8266 breakout"
From ESE497 Wiki
Jump to navigationJump to search(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
* Buy from AdaFruit (https://www.adafruit.com/products/2471) | * Buy from AdaFruit (https://www.adafruit.com/products/2471) | ||
− | * Don't forget cable (https://www.adafruit.com/product/954) | + | * Don't forget cable |
+ | ** **** Windows only***** (https://www.adafruit.com/product/954) | ||
+ | ** Mac Users need FTDI cable (https://www.adafruit.com/product/70) | ||
+ | ** Also, FTDI Friend (https://www.adafruit.com/product/284) | ||
+ | *** Windows/Mac users will need driver from http://www.ftdichip.com/Drivers/VCP.htm | ||
+ | * Follow instructions for "Installing with Boards Manager" to add support to the Arduino Environment for the ESP8266 chip (https://github.com/esp8266/Arduino) | ||
* Overview doc (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview) | * Overview doc (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview) | ||
− | |||
* Connect USB Console cable to board (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide) | * Connect USB Console cable to board (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide) | ||
* Remember, before every download you have to: | * Remember, before every download you have to: | ||
Line 9: | Line 13: | ||
**Release RESET, then release GPIO0 | **Release RESET, then release GPIO0 | ||
**When you release the RESET button, the red LED will be lit dimly, this means its ready to bootload | **When you release the RESET button, the red LED will be lit dimly, this means its ready to bootload | ||
+ | ** You get the warning: espcomm_syn failed message if you forget to do this | ||
+ | ** Wait until the dots stop on the bottom console window to open the serial console | ||
** (from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide) | ** (from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide) | ||
* Copy the Blink Test code from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide to test. Red light should blink. | * Copy the Blink Test code from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide to test. Red light should blink. | ||
Line 16: | Line 22: | ||
** Upload program. | ** Upload program. | ||
** Open the serial monitor to see IP and messages from adafruit web server. Make sure the serial data rate is set to 115200 baud. | ** Open the serial monitor to see IP and messages from adafruit web server. Make sure the serial data rate is set to 115200 baud. | ||
− | * UDP | + | * Get Mac Address of ESP8266 |
− | ** | + | ** Add this code to the setup function of the WiFi code |
+ | uint8_t macArray[6]; | ||
+ | WiFi.macAddress(macArray) ; | ||
+ | for (int i=0;i<sizeof(macArray) ; i++) { | ||
+ | Serial.print(macArray[i],HEX) ; | ||
+ | if (i != sizeof(macArray)-1) { | ||
+ | Serial.print(":") ; | ||
+ | } else { | ||
+ | Serial.println(""); | ||
+ | } | ||
+ | } | ||
+ | * UDP Packets | ||
+ | ** SSID: wustl-guest-2.0 | ||
+ | ***You can use wustl-guest-2.0 for web traffic but all of the other ports are block by the university firewall. However, we have our own wireless network in Bryan 316 for your use. | ||
+ | ** SSID: Bryan316 | ||
+ | *** Your ESP8266 module can use the SSID: Bryan316 but you have to send your MAC Address to Ed Richter (ed@ese.wustl.edu) so he can add your device to he access list. | ||
+ | ** UDP Communication | ||
+ | *** Download [[media:UDPExample.zip|UDPExample.zip]] | ||
+ | *** The .zip file includes example code to transmit and receive UDP packets to the ESP8266. | ||
+ | **** UDP2ESP8266.vi is a LabVIEW program that can run on your computer. It transmits a random number to the IP of your ESP8266 on port 9999 and receives packets from the same IP on port 1000. | ||
+ | **** UDPExample.ino is a slightly modified version of a UDP Example on the ESP8266 forum. This program receives a UDP Packet on port 9999 and retransmits it to the same IP on port 1000. |
Latest revision as of 03:04, 15 June 2016
- Buy from AdaFruit (https://www.adafruit.com/products/2471)
- Don't forget cable
- **** Windows only***** (https://www.adafruit.com/product/954)
- Mac Users need FTDI cable (https://www.adafruit.com/product/70)
- Also, FTDI Friend (https://www.adafruit.com/product/284)
- Windows/Mac users will need driver from http://www.ftdichip.com/Drivers/VCP.htm
- Follow instructions for "Installing with Boards Manager" to add support to the Arduino Environment for the ESP8266 chip (https://github.com/esp8266/Arduino)
- Overview doc (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview)
- Connect USB Console cable to board (https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide)
- Remember, before every download you have to:
- Hold down the GPIO0 button, the red LED will be lit
- While holding down GPIO0, click the RESET button
- Release RESET, then release GPIO0
- When you release the RESET button, the red LED will be lit dimly, this means its ready to bootload
- You get the warning: espcomm_syn failed message if you forget to do this
- Wait until the dots stop on the bottom console window to open the serial console
- (from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide)
- Copy the Blink Test code from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide to test. Red light should blink.
- Copy the Connecting via WiFi code from https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide.
- Change ssid to "wustl-guest-2.0"
- Change password to ""
- Upload program.
- Open the serial monitor to see IP and messages from adafruit web server. Make sure the serial data rate is set to 115200 baud.
- Get Mac Address of ESP8266
- Add this code to the setup function of the WiFi code
uint8_t macArray[6]; WiFi.macAddress(macArray) ; for (int i=0;i<sizeof(macArray) ; i++) { Serial.print(macArray[i],HEX) ; if (i != sizeof(macArray)-1) { Serial.print(":") ; } else { Serial.println(""); } }
- UDP Packets
- SSID: wustl-guest-2.0
- You can use wustl-guest-2.0 for web traffic but all of the other ports are block by the university firewall. However, we have our own wireless network in Bryan 316 for your use.
- SSID: Bryan316
- Your ESP8266 module can use the SSID: Bryan316 but you have to send your MAC Address to Ed Richter (ed@ese.wustl.edu) so he can add your device to he access list.
- UDP Communication
- Download UDPExample.zip
- The .zip file includes example code to transmit and receive UDP packets to the ESP8266.
- UDP2ESP8266.vi is a LabVIEW program that can run on your computer. It transmits a random number to the IP of your ESP8266 on port 9999 and receives packets from the same IP on port 1000.
- UDPExample.ino is a slightly modified version of a UDP Example on the ESP8266 forum. This program receives a UDP Packet on port 9999 and retransmits it to the same IP on port 1000.
- SSID: wustl-guest-2.0