Energy saving house with ESP32 -- Wikifab
Energy saving house with ESP32 -- Wikifab Basic Data Category: Projects URL (first publication): https://wikifab.org/wiki/Energy_saving_house_with_ESP32
no no
Other
Design files are in original format: No Free redistribution is allowed licence: No
|
Inhaltsverzeichnis
- 1 Description
- 1.1 Energy saving house with ESP32
- 1.1.1 Description
- 1.1.2 Sommaire
- 1.1.3 Sommaire
- 1.1.4 Introduction
- 1.1.5 Étape 1 - Install Arduino IDE
- 1.1.6 Étape 2 - Prepare the ESP32 board on your computer
- 1.1.7 Étape 3 - Check that the board is correctly configured
- 1.1.8 Étape 4 - Wiring the photoresistor to the ESP32
- 1.1.9 Étape 5 - Programming on tuniot
- 1.1.10 Étape 6 - Programming on Arduino IDE
- 1.1.11 Notes et références
- 1.1 Energy saving house with ESP32
- 2 + General Reviews
Description
Energy saving house with ESP32
- 0
Creation de Catégories :
Description
In this tutorial, you will learn how to set up your ESP32 so that it will automatically turn on its internal LED when it’s dark, and vice versa.
In this tutorial, you will learn how to set up your ESP32 so that it will automatically turn on its internal LED when it’s dark, and vice versa.
Sommaire
Sommaire
ESP32, arduino ide, light sensor, arduino, electronics, programming, IoT, objets connectés en none 0
Introduction
In this tutorial, you will learn how to set up your ESP32 so that it will automatically turn on its internal LED when it’s dark, and vice versa.
Étape 1 - Install Arduino IDE
You will need to use Arduino IDE to code and upload the firmware onto your ESP32 board.
Download the software by visiting > Scroll down until you see the “Download the Arduino IDE” section and choose the version based upon your operating system (e.g. If you have Windows 7, choose “Windows Installer” / if you have Windows 10, choose “Windows app”) > On the next page choose “Just download” and run the installation files.
Étape 2 - Prepare the ESP32 board on your computer
Follow the for your Operating System. For example, if you have Windows 7 or 10, choose “Instructions for Windows” / if you have a MacBook, choose “Instructions for Mac”
For the “Instructions for Windows” section, you can ignore the following step:
Étape 3 - Check that the board is correctly configured
Fetch the Blink example from File > Examples > 01.Basics > Blink.
write int LED_BUILTIN = 2; at the beginning of the code
ESP 32 Blink
Turns on an LED on for one second, then off for one second, repeatedly.
The ESP32 has an internal blue LED at D2 (GPIO 02)
int LED_BUILTIN = 2;
void setup()
pinMode(LED_BUILTIN, OUTPUT);
void loop()
Finally, upload the code by using the right arrow (→) button at the top right corner of the window, by choosing Sketch > Upload or by pressing Ctrl+U on the keyboard. » contient et ne peut donc pas être suffisamment analysée.
Étape 4 - Wiring the photoresistor to the ESP32
The shorter leg of the photoresistor is connected to 3V on the ESP32. The other leg is connected to pin VP (or 36) and at the same time to a 1kohm resistor, which in turn is connected to GND on the ESP32.
Note: if it’s the first time you’re using a breadboard, check out video to understand how breadboards work.
Étape 5 - Programming on tuniot
Let’s create a program that turns the internal LED on and off depending on the amount of light recorded by the photoresistor. More precisely, the LED will be on when it’s dark, and off when it’s light.
For that we need to reach:
Choose the appropriate blocks to create the code displayed below (see image).
Étape 6 - Programming on Arduino IDE
To upload the code on Arduino IDE, click on the “Copy Arduino code into clipboard” button.
then paste the code onto Arduino IDE, and upload it to the ESP32.
If you click on Serial Monitor (top right of the Arduino IDE window, below the “X” button), you should see the value that the photoristor is recording at any given time.
Notes et références
This tutorial has been developed as part of the iTech project, co-financed by the Erasmus + programme of the European Union.
For more details contact info@digijeunes.com
Published
Vous avez entré un nom de page invalide, avec un ou plusieurs caractères suivants :
Pour participer la traduction de la plateforme dans d'autres langues, rendez-vous sur .
+ General Reviews 