In this tutorial you will learn how to connect your ESP32 board to the internet and send live values recorded by a light sensor attached to the board, on-line on adafruit.io. +
In this tutorial you will learn how to connect your ESP32 to the internet and send live values recorded by a light sensor attached to the board, on-line on adafruit.io. +
This tutorial has been developed as part of the [http://www.digijeunes.com/projets/itech/ I TECH] project, co-financed by the Erasmus + program of the European Commission +
Once you have set up an account on adafruit.io, go ahead creating a new Feed. Creat a new feed and name it, for example "lightsensorvalue". +, You can download the software [https://www.arduino.cc/en/Main/Software here]. +, Follow the [https://github.com/espressif/a … Follow the [https://github.com/espressif/arduino-esp32/blob/master/README.md#installation-instructions instructions provided on github] for your OS.
For [https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md Windows]
If you have troubles following the instructions for windows, you may find some help below
To find the Sketch directory, click File > Preferences, on arduino IDE.
The process of cloning existing repository may take a while...oning existing repository may take a while... +, Launch Arduino IDE
Go to Tools > Board and select “ESP32 Dev Module”.
Fetch the Blink example on File > Examples > Basics > Blink.
Upload the code by clicking on the arrow pointing to the right, on the top left of the arduino IDE window. +, 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. +, On [http://easycoding.tn/esp32/demos/code/ … On [http://easycoding.tn/esp32/demos/code/ tuniot], we will use the blocks available to create a code for the ESP32.
complete the fields “ssid” and “password” with the name of your wi-fi connection and its password respectively.
The “User Name” and “Key” are available on your adafruit.io account (see image below)your adafruit.io account (see image below) +, Sketch > Include Library > Manage Libraries… + et To upload the code on Arduino IDE, click o … 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 screen), you should be able to see the value that is being recorded by the light sensor (see image below).
It means that your ESP32 is connected to the internet, and that it’s sending the value recorded by the photoresistor on-line, on adafruit.io the photoresistor on-line, on adafruit.io +
Set up an account on adafruit.io +, Install Arduino IDE +, Prepare the ESP32 board on your computer +, Check that the board is correctly configured +, Wiring the photoresistor to the ESP32 +, Programming on tuniot +, Install Adafruit_MQTT.h and Adafruit_MQTT_Client.h libraries on Arduino IDE + et Programming on Arduino IDE +
Date de modification« Date de modification (Modification date) » est une propriété prédéfinie qui correspond à la date de la dernière modification d’un sujet et est fournie par MédiaWiki Sémantique.