Showing posts with label ESP8266. Show all posts
Showing posts with label ESP8266. Show all posts

2020/05/23

Arduino IDE - How to update the arduino core of the installed board

This is a quick write up on how to update the Arduino core of ESP32 and ESP8266 in Arduino IDE.

1. Navigate through Tools -> Board -> Boards Manager.


2020/03/14

ESP8266 - How to embed bootstrap in the SPIFFS disk of ESP8266

This is a quick write up of me following the instruction at the link below to try out embedding bootstrap in the SPIFFS disk of ESP8266.

Embed bootstrap into an ESP8266 Web server with SPIFFS
https://www.techtinker.co.za/2018/08/28/fully-embed-bootstrap-into-an-esp8266-web-server/


2019/03/07

Wireless Door / Window Sensor

This is a wireless door / window sensor device that sends you email / instant message notification when your door / window is open.


2019/02/24

A solution for monitoring multiple air conditioning systems

This is a quick overview of a system that I developed to monitor the status of multiple air conditioning system (A/C) for a friend's company.

Background 

The friend's company has a 2-story building with over 20 rooms. Each room has at least one A/C installed. The A/Cs are controlled by the controller installed in the individual room and they cannot be centrally controlled / monitored. From time to time, the A/C will be left turned on for long period of time (over the weekend, etc.) until someone finds out about it and turn it off.

Due to safety concern, my friend doesn't want me to mess with the wiring of the A/C. He also doesn't want me to install additional powerline and power outlet around the A/C to provide power to the sensor used to monitor the A/C.

ESP8266 - Receive broadcast UDP packets sent from Packet Sender

This post is about how to use ESP8266 to receive incoming UDP broadcast message.

Schematic


2018/10/26

ESP8266 WiFi Repeater Kit

I developed a WiFi Repeater kit that could be used to extend network coverage into areas with poor or no coverage.


2018/09/04

How to develop Arduino ESP8266 firmware using VS Code and PlatformIO - Part 4

This is the last of a 4-part series on how to develop Arduino ESP8266 firmware using VS Code and PlatformIO. This part deals with installing library, using the installed library in the main code, and compiling the main code.

To follow this part, be sure to follow Part 1 ~ 3 to create a project folder that has no space in its folder name.

Part 1 - https://wei48221.blogspot.com/2018/08/how-to-develop-arduino-esp8266-firmware.html

Part 2 - https://wei48221.blogspot.com/2018/08/how-to-develop-arduino-esp8266-firmware_31.html

Part 3 - https://wei48221.blogspot.com/2018/09/how-to-develop-arduino-esp8266-firmware.html

Install the library

1. Click on the "Install" button to install the library.


How to develop Arduino ESP8266 firmware using VS Code and PlatformIO - Part 3

This is the 3rd part of a 4-part series on how to use VS Code and PlatformIO to develop for Arduino ESP8266. This post deals with how to install libraries in PlatformIO.

Before proceeding further, be sure to follow the info. at Part 1 and Part 2 to setup and VS Code and PlatformIO.

1. Click on the "PlatformIO: Home" icon at the bottom of the window.






















2. Then click on the "Libraries" icon.

2018/08/31

How to develop Arduino ESP8266 firmware using VS Code and PlatformIO - Part 2

This is the 2nd part of a 4-part series on how to use VS Code and PlatformIO to develop for Arduino ESP8266.

Before proceeding further, be sure to follow the info. at http://wei48221.blogspot.com/2018/08/how-to-develop-arduino-esp8266-firmware.html to complete the installation of VS Code and PlatformIO.

Testing the Environment

1. Enter the code as shown below in "main.cpp".


How to develop Arduino ESP8266 firmware using VS Code and PlatformIO - Part 1

This post is the first of a 4-part series on how to use Microsoft Visual Studio Code (VS Code) and PlatformIO for Arduino ESP8266 development. This part deals with the installation of VS Code and PlatformIO.

VS Code Installation

1. Download VS Code at https://code.visualstudio.com/.

2. Double click on the downloaded file to start the installation process.

On my computer, VS Code is installed at C:\Users\WeiHsiungHuang\AppData\Local\Programs\Microsoft VS Code.


2018/05/27

Watchdog for ESP8266 and ESP32

This post is a quick summary of using watchdog to help deal with unexpected hang / crash.

Arduino Sketch

Note, the code "watchdogCount = 0;" is commented out so the watchdog is triggered every 5 seconds.

2018/05/15

ESP8266 - Reading the Vcc

This is a quick summary of how to read the Vcc of ESP8266.

Arduino Sketch

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// Source: https://github.com/esp8266/Arduino/issues/3800

ADC_MODE(ADC_VCC);

void setup() {
   Serial.begin(115200);
}

void loop() {
 int vcc = ESP.getVcc();
 Serial.println(vcc);
 delay(1000);
}


2018/05/14

ESP8266 - Assigning a fixed IP address

This post is about how to set fixed IP for ESP8266 and how to check the result.

Arduino Sketch

The sketch used is the "AutoConnectWithStaticIP" sketch that comes with the WiFiManager library. Be sure to select the right block (block1 or block2) according to the version of the ESP8266 core installed on your computer.

For my case, I have version 2.4.1 installed, so I used block1.

2018/05/13

ESP8266 & Firebase - Control LED On / Off using the data stored in Firebase Database

This post is a quick summary of how to use the data stored in Firebase Database to control the LEDs attached to a NodeMCU board.

Creating Firebase Project and Database

1. Create a Firebase project.

- Enter https://firebase.google.com/ in the URL field of the browser.

- Click the "GO TO CONSOLE" on the upper right hand corner.


2017/12/07

ESP8266 Software Serial Loopback Test

This is a quick summary of testing the software serial function on a single ESP8266 in loopback mode.

Schematic

For this post, GPIO14 and GPIO12 are used as the RX and TX respectively for Software Serial.

Note,
For ESP8266, GPIO 0 ~ 5, 12 ~ 15 can be used for RX / TX, GPIO 16 cannot be used for RX / TX.



2017/10/07

ESP8266 - Getting Chip ID and MAC Address

The code below reads and displays info. such as WiFi MAC Address, Chip ID, Flash Chip ID, Flash Chip Size, etc. about the NodeMCU v1.0 board that I use for making this post.

2017/09/26

ESP8266 - Testing the SPI interface using NodeMCU and Arduino Uno

This post is about how to test the SPI interface of ESP8266.

NodeMCU based ESP8266 has Hardware SPI with four pins (D5 ~ D8 in the red square below) available for SPI communication. With this SPI interface, we can connect any SPI enabled device with NodeMCU and make communication possible with it.

ESP8266 has SPI pins (SD1, CMD, SD0, CLK) which are exclusively used for Quad-SPI communication with flash memory on ESP-12E, hence, they can’t be used for SPI applications (the pins in the blue square). We can use Hardware SPI interface for user end applications.

Below figure shows Quad SPI interface pins that are internally used for flash. It consists quad i/o (4-bit data bus) i.e. four (SDIO_DATA0 – SDIO_DATA3) bidirectional (i/p and o/p) data signals with synchronize clock (SDIO_CLK) and chip select pin (SDIO_CMD). It is mostly used to get more bandwidth/throughput than dual i/o (2-bit data bus) interface.

2017/09/15

ESP8266 WiFiManager - Configuring the parameters of the sketch running on ESP8266

This post is about how to use WiFiManager to configure other parameters of the sketch running on ESP8266. By using this approach, there is no need to re-compile the sketch for configuration changes.

ESP8266 SPIFFS - Write to and read from SPIFFS disk

This post is a quick example of how to write to and read from SPIFFS disk.

2017/09/10

ESP-8266 - Testing out NodeMCU for the first time

Here is a summary of my first experience working with NodeMCU v1.0.

For differences between NodeMCU v0.9 vs v1.0 vs v2.0, refer to the info. at the link below.
https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/#v1