Sample codes ESP32, ESP8266, Arduino sketch collection is mainly for Smart Home, IoT systems, but there is also useful content for beginners.
advertising – amazon.com
Arduino For Beginners
Arduino is an open source hardware and software based platform. It is a circuit board made up of a microcontroller and the components that are essential for operation, and a combination of software, the Arduino IDE (Integrated Development Environment). The Arduino IDE uses a simplified version of C ++, which is easy for beginners to learn.
ESP32 PinOut – which pin is for what
The question often arises regarding the use of the ESP32 GPIO, what some pins can be used for and which pins should be avoided in our projects.
Using ESP32 built-in hall effect sensor
All ESP32 cards have a built-in Hall Effect sensor. The Hall Effect sensor can detect changes in the magnetic field in its environment. The larger the magnetic field, the higher the output voltage of the Hall Effect sensor.
ESP32 Asynchronous Web Server – jQuery AJAX
AJAX makes it possible to exchange data with the server and to update certain parts of the website without reloading the entire page. The jQuery ajax() method provides the basic functionality of AJAX in jQuery. This article shows how to use jQuery ajax() and ESPAsyncWebServer.
Esp32 Web Updater and SPIFFS file manager
With previous versions of the Arduino IDE, it was easy to upload files to SPIFFS using the ESP32FS plugin. Unfortunately, this extension does not work under the completely revised Arduino IDE version 2.0. To deal with this problem, I created the “Esp32-Web-Update-and-SPIFFS-manager” sketch that can be downloaded below, which includes a web OTA update option.
ESP32 Asynchronous web server
It may often be necessary to communicate with our application running on the ESP32 microcontroller via a graphical interface. Whether changing configuration or displaying sensor values, etc. The obvious solution is to use the web browser, because we almost always have our smartphone at hand. The asynchronous web server helps with this. In this article, I would like to demonstrate the application of the ESPAsyncWebServer library on an ESP32 module with examples.
Smart Alternative Switch with ESP8266 for ioBroker via MQTT
We can make the lighting switches in our house smarter with this ESP8266 circuit, so if something goes wrong (e.g. if there is no WiFi or the server is down) it will continue to work as a normal switch.
Roomba voice control – Alexa and Belkin-Wemo emulator
You can start the iRobot Roomba with a voice command or send it to the dock. It uses a Belkin-Wemo emulation to connect directly to Amazon Echo.
iRobot Roomba 675 Robot Vacuum-Wi-Fi Connectivity, Works with Alexa
advertising – amazon.com
Make your UPS smarter with ESP8266 and PCF8591
I have a well-functioning UPS with a faulty network interface, I use it for the iobroker server. The problem was that it did not shut down the PC in the event of a prolonged power outage.
Arduino long-short button press
One of the basic user interactions is button press. You can specify how the arduino program behaves when you press a long or short button. The following arduino sample codes show a few options.
Dynamic arduino LCD menu
The following Dynamic Arduino LCD menu is easy to use, easy to edit, expand. You can add as many menu items as you want. Just enter the menu items, write the corresponding function and you’re done. All this at the beginning of the arduino sketch, you don’t have to search the code for where to paste the code snippets.
advertising – LCD modules from Amazon.com
Instant Pushsafer notification from ESP32
This arduino sample code shows how to use ESP32 and Pushsafer. It is often necessary to be immediately aware of the condition of our appliances, eg when the temperature of the refrigerator rises, etc.
3D Printable Virtual Wall for iRobot Roomba
Sometimes it can be helpful to exclude a Roomba robotic vacuum cleaner from certain locations. You can buy a factory virtual wall for this purpose, but you can also make it yourself using an arduino nano and some cheap parts.
Motion sensor for ioBroker with RCWL-0516 Doppler Radar and ESP8266
In some situations we may need motion detection for ease of use or security. The microwave radar sensor RCWL-0516, which works on the principle of the Doppler effect, is of great help in this.+
HiLetgo Nano V3.0 ATmega328P CH340G
advertising – amazon.com
NodeMCU ESP8266 to ioBroker, connect relay via MQTT
I would like to show you how easy it is to create various smart devices using NodeMCU ESP8266 in an arduino framework and integrate them into ioBroker using the MQTT protocol. In the first part, we will turn on an LED and a relay.
DS18b20 temperature sensor with ESP-01 module for ioBroker
In this article, I will show that we can measure temperature using the Dallas DS18b20 OneWire thermometer sensor and transfer data with the ESP8266-01 module to ioBroker using the MQTT protocol.
Belkin Wemo emulator with ESP8266
This directory ESP8266 allows up to 14 switches Belkin WEMO using emulation. It is directly connected to Amazon Echo, Echo Show, Echo Dot or Echo Flex and can be controlled with voice instructions using Alexa.
Infrared remote control with ESP8266 for ioBroker via MQTT
An infrared remote control is made using a NodeMCU ESP8266 and an infrared LED. With this from ioBroker on the MQTT protocol any device with an infrared receiver, eg: TV, Amplifier, SetTopBox, Air Conditioner, etc. controllable.