NOTE: This tutorial is applicable only for users of the ESPresso Lite (beta).
The ESPresso Lite (beta) has been replaced with the made-for-mass production, ESPresso Lite V2.0.
Please forward your comments or feedback to firstname.lastname@example.org
1. ESPresso Lite (beta) Pinout diagram
The ESPresso Lite board helps to breakout the pins of the ESP8266 chip inside the ESP-
WROOM-02 module, allowing anyone to use these IO pins to blink their LEDs, read button switch, take reading from sensors or to control an actuator like an Arduino board.
ESPresso Lite is designed to takes in power voltage between 3.3V to 6V but no more than that.
The board has 11 GPIO pinouts (labelled in yellow) and can be used as an input or output. The
corresponding Arduino pin number is also displayed (in brown).
There is however a lone analog input pin labelled AD. Be careful when using this pin as it can only take in maximum of 3.3V.
2. USB to Serial Connection
ESPresso Lite do not provide the on-board USB to Serial connector (e.g. a microUSB) because we believe that the serial port (UART) should be able to use with other peripherals e.g. using to communicate with Raspberry Pi or with Serial based sensors.
NOTE: When programming the ESPresso Lite using the FTDI USB-Serial cable:
For example, if you need to test some feature where the ESPresso Lite is required to reboot (e.g. Smart Config examples) while it is connected to the computer using FTDI USB-Serial cable, you will need to close the 'Serial monitor' in the Arduino IDE.
3. Installing Arduino IDE version 1.6.7
We recommend using the Arduino IDE to program and upload the sketches to the ESPresso Lite. The Arduino IDE (version 1.6.7 is recommended although earlier version 1.6.5 is still okay) can be downloaded from https://www.arduino.cc/en/Main/Software
NOTE: Newer versions of the esp8266 board managers will also work with the ESPresso Lite (beta)
4. Install the ESPert Library
Open Library Manager (menu Sketch > Include Library > Manage Libraries…) then install the Espert library by Jimmy Version 1.2.4
5. Install dependency for ESPert
Continue to follow up on Library Manager (menu Sketch > Include Library > Manage Libraries…) to install the following libraries (*Updated 30th June 2016)
These steps will also provide Espert library as well as sample codes needed for your IoT project on Arduino (Step 4) and hardware addons/sensors support (Step 5).
Once done, access the sample codes from the File -> Examples -> Espert submenu in your Arduino:
6. Using & uploading example sketches
Always remember to press RESET button switch at the ESPresso Lite BEFORE uploading the a new sketch. To check if you have successfully, reset it, open the Serial Monitor and see if a string of 'garbage' characters is displayed (see below) when the reset button is pressed.
The ‘Blink’ example is the universal hardware version of the popular ‘Hello World!’ text displayed by someone programming for the first time. By making the LED blink, the user is able to upload the codes as well as made an error-free codes in Arduino IDE.
Example _1040_ Sleep
ESP8266 has a sleep feature for certain applications that requires low power consumption. There are two ways to wake it up: 1) to reset it manually (or via Bluetooth) or 2) wait for it to complete its sleep cycle.
During wakeup phase, RTC will generate a pulse to GPIO16 so as to reset the chip. Below is the waveform observed on GPIO16/RST. The falling edge actually only reaches 1.96V then it climbs immediately, with effective pulse width only 5.2us. (Ref: @Ba0sh1)
Example _0020_BlinkEspert (Blink using ESPert library)
Another way to blink the LED is to call a pre-written function instead of directly drive current to a particular pin
The default GPIO for LED is GPIO16. If there is a need to use other GPIO to control the LED (for example, the GPIO16 is being used to wake the ESP8266 from deep sleep), assign another GPIO number to the LED using espert.LED.init(<pin number>)
This sketch will display some pertinent information about ESP8266 boards (not limited to ESPresso Lite only):
This feature is used to verify that the 'Flash Size' setting is correct for ESPresso Lite (4Mb) instead of default 512k. If there is a mismatch, the serial monitor will indicate an error in configuration message (shown below)
To rectify the error, simply go to Tools > Flash Size and select 4M (3M SPIFFS). After the re-uploading the sketch, the serial monitor will display an OK configuration message.
The onboard button switch labelled USER is using GPIO2 and is being pulled high normally. Pressing the button switch will change the GPIO2 state to LOW. This will switch the LED to the ON state.
A neat feature of the ESPresso Lite is that any sensors or external devices that requires I2C can be easily stack on top of the board. In this example, a generic OLED display module can be plug in directly to the I2C headers (V3, G, CL & DA) without the need to use any jumper wires
We can measure temperature and humidity easily with an inexpensive DHT22 sensor. This is easily done by plugging in the DHT22 sensor directly into the V3, 12, 14, G header, just above the OLED. There is no need to connect any resistors as pin 12 (where the data pin for the DHT22 is) has inbuilt pull-ups.
The reading is taken every 5 seconds and the information will be displayed in the OLED display.
In the later ‘Webserver’ example, we can turn the ESPresso Lite as a webserver to return any web request for temperature or humidity data online.
Connecting to Wi-Fi
From example 7 onwards, the ESPresso Lite will need to be connected to Internet via Wi-Fi
There are 3 ways to set up the Wi-Fi connection for the ESPresso Lite:
1. Autoconnect to Wi-Fi using previous login credentials
2. Smart Config
3. AP mode
(Without opening the Arduino serial monitor), press RESET button to reboot and the ESPresso Lite should be connected (almost) instantaneously to the Wi-Fi.
Smart Config is a feature where (one to multiple) ESPresso Lite(s) can be connected to the Wi-Fi access point of your choice simultaneously by use of either 1) the ESPert mobile app or 2) using the AP mode feature of the ESPresso Lite.
After uploading the sketch, the OLED display should indicate that its ready for Smart Config.
First, ensure that the mobile device is connected to a Wi-Fi access point which the ESPresso Lite will need to be connected to eventually (by keying in the Wi-Fi SSID & password).
The app for iOS & Android can be downloaded at http://www.espert.io/app
Next, indicate the number of devices to be configured (minimum is 1) and press Start Smart Config. Once connected, the OLED display should show the IP address of the connected Wi-Fi
In Example 8, you can turn your ESPresso Lite to become a temperature-humidity webserver using the DHT-22 sensor.
The ESPresso Lite board allows generic OLED display to be plug in directly to the I2C headers. Similarly the DHT22 sensor can be inserted directly into the V3, GPIO12, GPIO14 (not used), GND UART headers without the need to have additional jumper wires or passive components.
Go to File > Examples > ESPert > _0080_WebServer to get the sketch below
* Remember to press RESET before uploading the sketch into the ESPresso Lite.
After the sketch is uploaded, set up the Wi-Fi connection using the methods described in "Connecting to Wi-Fi" above.
After setting up the Wi-Fi connection, enter into the URL the IP address indicated in the OLED display e.g. 192.168.1.9
After a few seconds, the information about the humidity and temperature is displayed online.
When user press the button, the ESPert cloud will be triggered and it will send the notification to a pre-set smartphone. You can apply this to many IoT solutions:
• Order coffee from favourite cafe
• Tell your parents you are at home now
• Press order for office or household supply
• Play games
• (lots lots more…)
In the Arduino sketch, you can modify the code by:
We just sent you an email. Please click the link in the email to confirm your subscription!