FACULTY OF ELECTRONIC
ENGINEERING TECHNOLOGY
LAB 4 - SIMPLE APPLICATION BETWEEN SENSOR, INPUT, OUTPUT AND BLYNK APP
MUHAMMAD DANIAL BIN ZAINAL AZLAN
192020173
UNIT 1-HOW TO SETUP BLYNK APP (MOBILE PHONE)
COMPONENT :
- ESP32 development board
- One 5mm LED
- One 220ohm resistor
- Breadboard
- Connecting Wire
- We will have to create an account to proceed further. We can also log in with your Facebook account if you possess that.
- After that we successfully signed in the following window will appear ."click New Project".
- Now specify the name of project ,device and connection type .After that press the 'Create ' button.
- Now the Blynk canvas will open as shown below:
- Press on the screen. The widget box will appear. Now we will build our project. Firstly, we will press the ‘Button’ widget. We can view information regarding it by pressing the icon present in the far right as highlighted below.
- After we alter the settings of the button the canvas will look something like this:
- The Project Settings show the settings we applied for particular project and a link to the authorization key. The edit button takes to the widget box. Lastly, the play button lets we connect project with microcontroller. Once we press this button we no longer will be able to add new widgets to your project unless we use the STOP button first.
SETTING UP ARDUINO IDE
- We will use Arduino IDE to program our ESP32 development board. Thus, we should have the latest version of Arduino IDE. Additionally, we also need to install the ESP32 plugin.
- To use the Blynk app with our ESP32 board, we would have to install its library.Follow this link "https://github.com/blynkkk/blynk-library" and then click on the code download zip .
- We have to go to Sketch > Include Library > Add .zip Library inside the IDE to add the library as well. After installation of the library, restart IDE.
- we will define the authorization key which was emailed to us through Blynk in our account through which we logged in it. Keep this key safe with you for security concerns.
- Next, we will define the network credentials. One for the SSID and the other for the password. These will be our network credentials which will be used to connect to our wireless network. Replace both of them with your credentials to ensure a successful connection.
TESTING
- Choose the correct board and COM port before uploading your code to the board.
Go to Tools > Board and select DOIT ESP32 DEVKIT V1 .
- Choose the correct board and COM port before uploading your code to the board.
- Next, go to Tools > Port and select the appropriate port through which board is connected.Click on the upload button to upload the code to your ESP32 development board.
- open up the serial monitor and we will be able to see the status of WIFI connection. We will receive different messages as shown below.
- When we receive the ‘ready’ message on the serial monitor, open Blynk application. Open the project press and ‘play’ button.
- Now, touch the Button widget to toggle the LED. By pressing ON/OFF, simultaneously the LED connected to GPIO25 will turn ON/OFF as well. To disrupt the connection, press the stop button.
- Click the microcontroller icon at the top. We will receive a notification about the connection being established with your ESP32 board.
- LED on when we press ON on Blynk app.
LED off when we not press button on Blynk app.
0 Comments