Wednesday, December 28, 2016

ESP8266 Sent Sensor Data to Firebase Realtime Database

ESP8266 Sent Sensor Data to Firebase Realtime Database

What is Firebase ?
Firebase is a platform that helps you quickly develop high-quality apps ( Mobile and Web Apps),
grow your user base, and earn more money.

Firebase is made up of complementary features that you can mix-and-match to fit your needs.
Show in May 2016, at the Google I/O conference

System Diagram

1.ESP8266 WiFi Module or NodeMCU ( We use ESP8266 12E )
2.Temperature and Humidity Sensor DHTxx ( we use DHT22 or AM2302 )
3.OLED Display for Option

Wiring Diagram

My ESP8266 WiFi Model Development Board


ESP8266 Source code on Github ( Arduino IDE )

Arduino Library
Firebase Arduino Library
WiFi Connector
DHT Sensor
Adafriut GFX ( OLED Display )

        • Firebase Arduino [GitHub]
        • Firebase Arduino - Documentation
In Thai
มาลองใช้งาน Firebase Realtime Database กับ ESP8266 ด้วย Arduino กันเถอะ

ESP8266 ESP8285 กับการใช้งาน Firebase ระบบฐานข้อมูลเรียลไทม์จาก Google

Demo with Android App

My Website
email :   Tel .081-6452400

Monday, October 10, 2016

ESP32 develop with Arduino IDE

ESP32 Develop with Arduino IDE
I've just ESP32 Development Board call Nano32 from Gravitech / MakerAsia.
The new ESP32 WiFi chip from ESPressis System improve over ESP8266 WiFi Module.
see the spec.

Now ( Oct10 ,2016 ) announced Arduino Core for ESP32 WiFi Chip

The following was the setup environment for ESP32 with Arduino IDE

STEP 1  
Download Arduino core for ESP32.

Then Unzip and we will copy all this file to Arduino IDE directory or path later.

If Install Arduino IDE already. Find the path of Arduino IDE Installation directory.

My Computer in C:/Program Files (x86)/Arduino

Make New folder name espressif in the hardware directory

and make subfolder in espressif  folder name esp32

Then copy all files from download into this directory. ( esp32 )

or Use Command Line 
cd hardware
mkdir espressif
cd espressif
git clone esp32

Use Python 2.7 Command 
if you don't have it. download Python 2.7

Then Use Command Line
cd esp32/tools

My Example

STEP 4 Open Arduino IDE
Now, You will have Board ESP32 Dev Module and Select port

STEP 5 Test Compile and Upload Example Code

Test Blink in Example Code

Done Uploading.
Upload code faster than ESP8266 very much.

Reference ( Fixed some bugs ) Thank you for that.

Nano32 Board

My Website
email :   Tel .081-6452400 ( Thailand )

Sunday, October 9, 2016

ESP32 Development Board form Gravitech and MakerAsia

ESP32 Development Board ( Nano32 )

Nano32 is new ESP32 development board. It’s made by South East Asia based Gravitech, and combines ESP32 with an FTDI chip for USB to serial programming through the micro USB port. It also includes two buttons, and breadboard-friendly headers.

NANO32 Features

  • 40MHz Crystal for CPU, 32.768KHz Crystal for RTC and low power operation
  • 4MB Flash (32Mbit)
  • FTDI231 for USB to Serial
  • Auto-Reset for automatic flash
  • 3.3V 0.5A Regulator (tested for working up to 1A)
  • 2.5dBi Peak Gain, 0.5dBi Average Gain Chip Antenna
  • High quality PCB: design and manufacture in Thailand

Key Features    
  • Xtensa® Dual-Core 32-bit LX6 microprocessors, up to 600 DMIPS
  • Integrated 520 KB SRAM
  • Integrated 802.11BGN HT40 Wi-Fi transceiver, baseband, stack and LWIP
  • Integrated dual mode Bluetooth (classic and BLE)
  • 4 MByte flash (32Mbit)
  • 2.2V to 3.6V operating voltage
  • -40°C to +125°C operating temperature

  • 802.11 b/g/n/e/i
  • 802.11 n (2.4 GHz), up to 150 Mbps
  • 802.11 e: QoS for wireless multimedia technology
  • A-MPDU and A-MSDU aggregation
    Block ACK
  • Fragmentation and defragmentation
  • Automatic Beacon monitoring/scanning
  • 802.11 i security features: pre-authentication and TSN
  • Wi-Fi Protected Access (WPA)/WPA2/WPA2-Enterprise/Wi-Fi Protected Setup (WPS)
  • Infrastructure BSS Station mode/SoftAP mode
  • Wi-Fi Direct (P2P), P2P Discovery, P2P Group Owner mode and P2P
  • Power Management
  • UMA compliant and certified
  • Antenna diversity and selection

  • Compliant with Bluetooth v4.2 BR/EDR and BLE specification
  • Class-1, class-2 and class-3 transmitter without external power amplifier
  • Enhanced power control
  • +10 dBm transmitting power
  • NZIF receiver with -98 dBm sensitivity
  • Adaptive Frequency Hopping (AFH)
  • Standard HCI based on SDIO/SPI/UART
  • High speed UART HCI, up to 4 Mbps
  • BT 4.2 controller and host stack
  • Service Discover Protocol (SDP)
  • General Access Profile (GAP)
  • Security Manage Protocol (SMP)
  • Bluetooth Low Energy (BLE)
  • HID
  • All GATT-based profile supported
  • SPP-Like GATT-based profile
  • BLE Beacon
  • CVSD and SBC for audio codec
  • Bluetooth Piconet and Scatter-net

  • Ultra low noise analog amplifier
  • Hall sensor
  • 10x capacitive touch interface
  • 32 kHz crystal oscillator

32x GPIO    
  • 3 x UARTs, including hardware flow control
  • 3 x SPI
  • 2 x I2S
  • 12 x ADC input channels
  • 2 x DAC
  • 2 x I2C
  • PWM/timer input/output avalible on every GPIO pin
  • OpenOCD debug interface with 32 kB TRAX buffer
  • SDIO master/slave 50 MHz
  • Supports external SPI flash up to 16 MB
  • SD-card interface support

Security Related
  • IEEE 802.11 standard security features all supported, including WFA, WPA/WPA2 and WAPI
  • Secure boot
  • Flash encryption
  • 1024-bit OTP, up to 768-bit for customers
  • Cryptographic hardware acceleration:
    – AES
    – HASH (SHA-2) library
    – RSA
    – ECC
    – Random Number Generator (RNG)

Development Support

My Website
email :   Tel .081-6452400

Wednesday, May 18, 2016

ESP8266 WiFi Module Control RGBLED

ESP8266 WiFi Module Control RGBLED

This project we use ESP8266 WiFi Module to control RGB LED via WiFi Network.

System Diagram


1.ESP8266 WiFi Module ( or NodeMCU )
2.RGB LED ( common anode (A) ) if you to use common cathode ( K ) must edit code.
3.OLED Display ( Option )

Wiring Diagram ( RGB LED Common Anode + )

ESP8266 Pin GPIO_14 to LED R
ESP8266 Pin GPIO_12 to LED G
ESP8266 Pin GPIO_13 to LED B

Option OLED Display
 ESP8266 Pin GPIO_05  ( SCL )  to  OLED pin SCL
 ESP8266 Pin GPIO_04  ( SDA )  to  OLED pin SDA

ESP8266 Source Code  ( IDE use Arduino IDE 1.6.8 )

Source Code on GitHub

Original WebServer for NodeMCU Code from

My Website
email :   Tel .081-6452400

Saturday, April 23, 2016

Arduino Bluetooth Control LED

Arduino Bluetooth Control LED
Arduino Project which you want to control LED  via Bluetooth.


1. Arduino UNO Board or compatible Board
2. Serial Bluetooth Module. ( HC-06 )
3. LED with Resistor 300 - 1K ohm x 8

Wiring Diagram

Output LED 1 to Pin 2 ( Arduino Board )
Output LED 2 to Pin 3
Output LED 3 to Pin 4
Output LED 4 to Pin 5
Output LED 5 to Pin 6
Output LED 6 to Pin 7
Output LED 7 to Pin 8
Output LED 8 to Pin 9

Bluetooth Module Tx to  Pin 0
Bluetooth Module Rx to  Pin 1

Control with Android

Android App on Google Play  

My Website
email :   Tel .081-6452400


Monday, December 28, 2015

ESP8266 Eclipse Development

ESP8266 and Eclipse Development

Eclipse have use for many developer for Android Development, php or C/C++.
Now,Eclipse can use with ESP8266 WiFi Module development also.

If you are not use eclipse before then download first.

Prepare your Eclipse environment for C/C++ programming

1.Download Eclipse

2.Install Eclipse CDT ( C/C++ Development Tooling)

Open Eclipse

Goto Menu Help => Market Place 

Find CDT then Install

3.Install C Compiler ( MinGW )

Download and install MinGW. Get mingw-get-setup.exe from the official SourceForge project.

4.Install ESP8266 SDK

Download and install Mikhail Grigoriev’s Unofficial Development Kit for Espressif ESP8266.

( 141 MB )

5.Install MinGW script
Mikhail Grigoriev made some awesome scripts to automate the installation of additional modules in MinGW which are needed for compiling. You can download his package here, extract it somewhere and then run install-mingw-package.bat.

How to Open Example Code and Flash

When you have prepare your Eclipse Environment already.
Import Example code and Flash to ESP8266 WiFi Module.

See on VDO above.

Goto Menu File => Import

Then Select Existing Projects into Workspace

Select Espressif  Example folder

Test Blinky2 Source Code

Then Flash to ESP8266 WiFi Module

My Blog

My Website
email :   Tel .081-6452400


Saturday, December 12, 2015

ESP32 WiFi and Bluetooth Module form Espressif ( NEW )

ESP32 WiFi and  Bluetooth LE Module form Espressif ( NEW )

So many of us have been happily using in the inexpensive ESP8266 chips for some time now for IOT applications, home control etc and long may that continue. They do have SOME issues – for example they are short of RAM memory to the point that all except critical subroutines have to be stored in FLASH and pulled out when needed. The somewhat slows things down as the 80Mhz processor (160Mhz at a pinch) has to pull stuff out of the external serial FLASH to use it. In practice the ESP8266 is still very fast but this is just one step that would be nice to avoid. Lack of IO lines also is a little painful as so many of the available lines are dual purpose – GPIO0 for example cannot be held low on powerup as it is used to put the processor into programming mode. We get around these issues but wouldn’t it be nice if we didn’t have to.

Espressif teased us about a successor to ESP8266 a few months ago that would support both WiFi and Bluetooth Low Energy, and John Lee, working for Espressif Systems, has now sent a letter to ESP8266 developers announcing the new wireless SoC with two Tensilica L108 cores and called ESP32.

Espressif ESP32 key improvements over ESP8266:

Faster WiFi – Wifi has been upgraded to support HT40 speed (144.4 Mbps) and has a new RF architecture to simplify the application schematics
Bluetooth Low Energy and Classic
Dual core processor – 2x Tensilica L108 processors clocked at up to 160 MHz
Low Power Mode Improvements – ADC conversions, level thresholds, etc.. can now be performed in deep sleep
Peripherals – Capacitive touch, ADCs, DACs, I2C. UART, SPI, SDIO, I2S, RMII, PMW, etc… but no USB.
More RAM – ~400 KB on-chip RAM
Security – Hardware accelerated AES and SSL, and more undisclosed improvements.
Simplified APIs – Not many details provided here, except WiFi APIs will be simplified, yet keep good flexibility and control.

One of my contact also informed me that there were two PGA (Programmable Gain Amplifier) blocks connected to two ADC blocks in the chip, which could be used for power metering with one PGA/ADC block used for voltage measurement, and one PGA/ADC block for current measurement. So ESP32 would offer a one chip solution for smart sockets. [Update: A few more information gathered from twitter: Close to 40 GPIOs, IPV4 and IPv6 support, is where you want to write to apply for a board, QFN package, not much more expensive than ESP8266, …]

The letter promises that beta testing will start soon with about 200 applications boards to be sent out, and a bounty program will be launched for people who can successfully compromise ESP32 security. The CEO also made a call to engineers who are interested in working with the company in Shanghai.

In case you’ve been hiding under a virtual rock over the last two years, you might have missed it when Espressif turned the IoT game on its head by releasing a chip with WiFi and a decent embedded processor for under $1 in bulk, and costing not much more than that in a module.

They’re looking to repeat the success of the ESP8266 with the ESP32, that should be coming out any time now. As we get closer to the release date, details start to dribble out. [Alberto], who makes very nice-looking pinout diagrams for a number of our favorite chips and modules, has already made us an ESP32 module pinout diagram.

And [Rudi] has been digging up nearly every crumb of info on the ESP32 that’s publicly available. For instance, it was through his website that we learned that the new RTOS SDK source is already up on GitHub.

There’s also a source of official information in the ESP32 forum, but there’s not much news there just yet. We expect this to change as more beta units make it out into the wild.

We covered the announcement of the forthcoming ESP32 last month, and we have to say that we’re looking forward to getting a module or two in our hands. Twin cores, BTLE support, and better DMA are tops on our list of neat features.

There’s also a source of official information in the ESP32 forum, but there’s not much news there just yet. We expect this to change as more beta units make it out into the wild.

We covered the announcement of the forthcoming ESP32 last month, and we have to say that we’re looking forward to getting a module or two in our hands. Twin cores, BTLE support, and better DMA are tops on our list of near features.

For more details, please refer to
An excel template for PCB processing requirement of ESP32 Module.
(33.49 KiB)
Including 3 files:
(207.12 KiB)
Introduce the BOM list of the ESP32 Module.
(47.22 KiB)

ESP32 Bug Bounty Program (A MINIMUM OF US$1000!)

Project Unofficial Development Kit for Espressif ESP32
Michael Grigorev has released a Beta version of Unofficial Development Kit for Espressif ESP32 (Windows)

My Blog

My Website
email :   Tel .081-6452400