background preloader

Esp8266 standalone

Facebook Twitter

ESP8266 NodeMcu and Lua language and some Arduino issues. | Primal Cortex's Weblog. When using the ESP8266 chip with the original firmware, AT based command set, to perform operations, implies that something external, like an Arduino or RPi (Raspberry Pi), must be used to drive/command the chip through the serial port. This external device sends out AT commands and waits for responses. While for some operations/applications, using the AT commands might just work when using the Software Serial library from Arduino. In another words, using a software based serial port to communicate might work. The issue is that even at a slow rate of 9600 baud’s, Arduino has some trouble to follow the esp8266 output, due to the lack of flow control. For example listing the available access points (AT+CWLAP) or even receiving simple web page from the internet, most of the time the Software Serial port only receives incomplete messages or garbled information. So why all about this ranting regarding Arduino, serial ports and the esp8266?

Let’s see how in Lua we can connect to WIFI. Like this: Simple 5V breakout board for ESP-01 (ESP8622) For the circuit you need the following parts: 1x low drop voltage regulator (I used a LF33 CDT)1x 10µF capacitor1x 100µF capacitor1x 1k resistor1x 1.8k resistor1x 2 pin header (male) and jumper1x 2x4 header connector (female - for the ESP-01)1x 4 pin header connector (male or female)1x piece of perfboard The circuit is quite simple. The voltage regulator supplies the 3.3V to supply the ESP-01. The two capacitors are used to smooth the input and output voltages. Instead of the LF33 you could also use a cheaper LT1117 or similar.

The TX from the ESP-01 can be wired straight through, because an Arduino or a USB/TTL adapter can work with the 3.3V input. The ESP-01 RX however should NOT be directly connected to a 5V TX. The jumper connects GPIO0 to ground. Using ESP8266-01 for temp monitoring. The ESP8266-01 is a very basic microcontroller unit with built in Wifi. It runs on 3.3v so be careful 5v will kill it. The units are very cheap and easy to find on eBay. This instructable is written assuming you have some understanding of what the following things are: microcontrollers Arduino Arduino IDE ISP (In system programmer) and the basics of all those things. My feed on thingspeak.com so you can see what the end goal is. Shopping list: ESP8266-01 module (can be found on ebay for less that $3 each if you don't mind waiting for shipping from China. DS18B20 Digital temperature sensors. You need a 3.3v power supply. You need a serial to USB programmer I am using the FTDI232 that has the ability to work in 5v or 3.3v modes.

You will need a resistor (I have used anything I have laying around from 10k ohm to 100k ohm) We will be using the Arduino IDE and it must be version 1.6 (I am using 1.6.5) so you will need to download that here: ESP8266 WiFi OTA Remote File Management - All. I have been working with ESP8266 micro controllers long enough now to have a number of them deployed in my environment.

I have a couple setup testing my MQTT broker(s). I have a couple sending temperature, humidity and barometric pressure readings to the cloud. I have some running for debugging and testing on my bench. I even have one running my irrigation system. In order to make any changes to the software on any of these controllers, I have to physically attach a FTDI and USB cable to a computer and connect via COM port. This can become very problematic for ESPs deployed in hard to get to or just inconvenient locations. Its also time consuming. In my minds eye, I can see the possibility of deploying dozens or even hundreds of these inexpensive devices to control/monitor a myriad of situations. However, with the proper tools, it is relatively easy to manage these controllers over their Internet/LAN connection! This Instructable will show you how to manage your ESP8266s over WiFi. Low Power ESP8266 – Sleeping at 78 micro Amps. I recently bumped into NodeMCU firmware for the ESP8266. It’s an Lua interpreter, making tinkering with IoT ideas really simple.

Just flash the firmware onto the ESP8266 and connect via serial console. You can start prototyping right away using the interactive Lua interpreter. You can easily persist your ideas on a simple flash file system. print(wifi.sta.getip())--nil wifi.setmode(wifi.STATION) wifi.sta.config("SSID","password") print(wifi.sta.getip())--192.168.13.101 For convenient development, there is ESPlorer, a basic IDE for Lua on the NodeMCU. To make developing with the ESP-01 module easier, I created a basic development board. Although NodeMCU provides access to the deep-sleep mode of the ESP8266 node.dsleep(microSecs); this is not available straight away on the ESP-01 module, as the ‘post-sleep-reset-pin’ XPD_DCDC (8) of the MCU is not connected to the reset pin.

During deep sleep the module now uses just 78 microAmps! Free Cloud based weather monitor (ESP8266,DHT22,sparkfun) - Sat Jun 13, 2015 11:39 am#20366 Introduction Low-cost Wireless Weather Monitoring System Purpose This system transmits temperature and humidity data to cloud on internet via Wifi and provides web interface to monitor those measured information. In this system, ESP8266 reads data from DHT22 sensor, then, send it to data.sparkfun.com cloud system using simple HTTP protocol. For web interface, all charts are implemented with Google Chart APIs. Prerequisites - Arduino IDE- ESP8266 package for Arduino IDE (*Refer to ... Compiling and uploading is done in Arduino IDE with ESP8266 package installed.

Requirements Hardware -ESP8266 ( Around $3 on ebay )-DHT22 ( Around $7 on eBay )-Resistor 10k(Pull up) To keep the cost low, ESP8266 is used as not only controller, but also Wifi transmitter. Software -data.sparkfun.com-Google Chart We used data.sparkfun.com cloud system to store measured data with two reasons. Instructions Setup hardware For uploading For running. Using ESP8266-01 for temp monitoring. ESP8266 and Arduino IDE - blink example. In this tutorial we will show how to program ESP8266 directly in Arduino IDE. That's how we will get Arduino simplicity and power of ESP8266. In tihs case we do not need Arduino, just ESP8266 module. For start we will create blink example. We can program ESP8266 native code or use ESP8266 NodeMCU. But there is better way. Recently there was released ESP8266 Arduino IDE. Thanks to guys behind this great work.

EDIT: updated manual is available at Arduino ESP8266 IDE. -ESP8266 module -FT232RL FTDI USB to TTL Serial Adapter -1K resistor -LED diode First we download ESP8266 Arduino IDE. Warning: Some versions of FT232 USB serial adapters do not provide enough current for ESP8266. Next we need to change some settings in Arduino IDE. And board (Tools->Board->Generic ESP8266 board). Now we can load program. Here is modified program. When you modify program just press upload button. To see our blink example working connect LED and 1K resistor to GPIO2 pin. All purpose red LED. Overview | ESP8266 Temperature / Humidity Webserver | Adafruit Learning System.

The ESP8266 based wifi breakout boards are becoming more popular with Makers due to a low cost and a powerful, programmable microcontroller on-board. The cost is a magnitude lower than solutions previously used including Arduino+Wifi Shield or an Arduino Yun. To quote Make publisher Brian Jepson: “This is inexpensive enough to be very much in the territory of ‘thousands of sensors-launched-out-of-a-cannon’-cheap.” Couple the ESP8266 with one of the inexpensive DHT series digital temperature and humidity sensors and we have a project that may literally be deployed anywhere to broadcast sensor data.

The broadcasting used in this tutorial is using the ESP8266 web server code and respond to web requests (like in a browser or a web client) to return temperature and humidity data (in a REST type format). This project demonstrates the programming of the ESP8266 ESP-01 module with the Arduino IDE and interfacing with a DHT temperature/humidity sensor.