These smart clocks, powered by the ESP8266 D1 Mini, offer more than just timekeeping. In addition to displaying the current time, they measure temperature and humidity, making them versatile tools for monitoring environmental conditions. Equipped with a DHT22 sensor, these clocks provide accurate air temperature and humidity readings, displayed alongside the time on a 1.8-inch…
What is ESP-NOW?
ESP-NOW is a connection-less wireless communication protocol by Espressif, a company that developed the popular Wi-Fi development boards ESP8266 and ESP32. This low-power 2.4 GHz wireless communication protocol allows two paired ESP boards to communicate without a router or Wi-Fi. ESP-NOW communicates in small packets of data within a few hundred meters. This connection remains…
How to design an app-controlled irrigation system
In this project, we’ll design a mobile app-controlled watering system that drip irrigates a home garden or small farm. This system is developed on an ESP8266 microcontroller, which controls the water pump through a 3V relay or an electronic valve. The user can switch the water’s motor/electronic valve ON or OFF and even set a…
How to build an IoT-based flood monitor using ESP8266
Floods are generally considered natural disasters. Depending on their severity, they can have a devastating impact on human life, agriculture, and infrastructure. In serious cases, floods can result in significant economic losses due to property damage, disruption of transportation, and the cost of emergency response and recovery efforts. This is why, flood monitoring is crucial…
IOT Building Blocks and Architecture: IOT Part 2
In the previous tutorial, a brief introduction of Internet of things was presented. The importance, challenges, applications and trends in IOT were discussed. Now, equipped with basic understanding of IOT, it’s time to investigate the building blocks of IOT. IOT is developed as a package with integration of various technologies. Each technology has its own principle role within the IOT system. In this tutorial, the basic building blocks of IOT and their place in an IOT infrastructure will be examined.
How to build a plant health monitor using ESP8266 and the MIT App Inventor
Most house plants require temperature, humidity, and moisture monitoring for optimal care. Temperatures exceeding the optimal range can cause stress, wilting, stunted growth, and even death, while cold temperatures can slow plant development, leading to weak growth and susceptibility to frost damage. Excessive humidity encourages fungal diseases and prevents proper transpiration, while drier air typically…
How to design an IoT-based smart alarm
We might not always appreciate them, but that morning wake-up alarm is important for everyday life. It ensures we wake up in time for work, school, meetings, appointments, or other essential tasks. Alarms can also help us keep a regular sleep/wake schedule. In this project, we’ll use the Internet of Things (IoT) to set a…
How to build a portable WiFi repeater using ESP32 or ESP8266
Typically, a WiFi network has a range that’s above 45 meters. The signals are strongest near the router. The further away you move, the weaker the signal. The same is true of thick walls or additional floors in a home or building. The WiFi signals could be completely lost on other floors of a premise. …
How to use MicroPython’s watchdog timer in ESP8266 and ESP32
A watchdog timer is an internal or external timer that monitors a microcontroller’s program to ensure the application remains operative without failure. It serves as a safety feature in critical applications by monitoring the microcontroller’s output signal. The watchdog can operate in two modes: Timeout mode – the timer establishes the microcontroller is not working properly if it…
MicroPython: How to program a real-time clock (RTC) in ESP8266 and ESP32
A real-time clock (RTC) is a computer clock to keep time and is one of the more popular microcontroller features. Microcontrollers without a built-in RTC require an external RTC chip for keeping time. Typically, mid-segment to high-end microcontrollers have a built-in RTC because time-keeping is necessary for several embedded applications. RTCs count seconds, minutes, hours,…
Getting started with ESP8266 and ESP32 on Arduino IDE
ESP8266 and ESP32 are popular WiFi development solutions that can be programmed in several ways using different programming languages. Common languages include MicroPython, C, JavaScript, and LUA script. The choice of embedded firmware and software tools makes it possible to program ESP8266 and ESP32 in different languages. The versatility and flexibility to program ESP boards…
How to send MQTT data from ESP32/ESP8266 to Raspberry Pi
It’s possible to set up a do-it-yourself home automation system with an ESP board and Raspberry Pi (RPi). Both offer Wi-Fi connectivity and can easily communicate via a home network. However, a communication protocol is required for wireless communication for devices operating in a wider network. Since conventional internet protocols like HTTP are typically too…
What is Lightweight Internet Protocol (LwIP)?
Connecting embedded microcontrollers to the internet is a crucial task in modern applications. The embedded controllers, particularly in consumer devices and wearables, now essentially require ping online. This is more important as the devices are getting smarter. Connecting to the internet is not just crucial but a hefty task as well. The typical TCP/IP stack…
ESP8266/ESP32-based WiFi access point using MicroPython
Many IoT applications are controlled with the help of a webpage or an HTML website running within a Local Area Network (LAN) or Wireless Local Area Network (WLAN). Some examples of such IoT applications include home automation, office automation, and smart farming. The HTML webpage or website controlling the things is hosted on a microcomputer…
How to use MicroPython with ESP8266 and ESP32 to connect to a WiFi network
ESP8266 and ESP32 are popular WiFi development boards. These single-board microcontrollers are supported by the MicroPython framework and are often used for the internet of things (IoT). Using MicroPython, ESP8266 and ESP32 can connect to the internet via WiFi and Ethernet. The MicroPython ports use Ethernet or the wireless local area network (WLAN). In this…
How to use ESP8266’s sleep modes in MicroPython
Networking applications consume a lot of power. If such applications are battery-powered, there’s a risk the battery will exhaust because of the high power demands of networking functions. Frequently, power is also wasted in non-essential microcontroller activities. For example, the power might remain on for various built-in peripherals irrespective of their use or relevance in…
How to make Raspberry Pi MQTT broker
MQTT (Message Queuing Telemetry Transport) is a simple messaging protocol often used in IoT applications. The protocol is based on a publish-subscribe system where both types of devices that publish and subscribe MQTT messages are called MQTT clients. The exchange of messages between the publishers and subscribers is done with the help of a broker,…
How to use ESP8266/ESP32 as a TCP server and client with sockets
ESP8266 and ESP32 are popular WiFi development boards. These microcontroller boards are ideal for building the internet of things (IoT). We covered how to connect ESP8266 and ESP32 (or any MicroPython port) with a network connection for use as a WiFi station here. We used the MicroPython network module. This network module provides a driver…
How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
The 1-Wire protocol is a proprietary standard for serial data communication from Maxim Integrated. This protocol is a low-speed, half-duplex, bidirectional, low-power master-slave data communication standard used by several devices, including temperature sensors, real-time clocks, EEPROMs, identification (intellectual property protection) devices, timers, and iButtons. There can be only one master device on a 1-wire standard…
How to use ESP32’s sleep and wake-up modes in MicroPython
In a previous article, we covered sleep modes in ESP8266. ESP32 is another popular Wi-Fi development board from Expressif systems. It’s more feature-rich than ESP8266, but also more power-hungry. The power consumption of ESP32 can reach up to 790 mA when the Wi-Fi and Bluetooth are both operational — nearly double that of ESP8266, which…