IOT REFERENCE


ESP32


1. Install Arduino IDE

https://www.arduino.cc/en/software


2. Install ESP32 Library

https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/


3. Create New Project

1. File -> New


4. Select Board Type, EPS32


5. Write Your First Code


const int LED_PIN = 2;

void setup() {
  // put your setup code here, to run once:
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(LED_PIN, HIGH);
  delay(300);
  digitalWrite(LED_PIN, LOW);
  delay(300);
}
      

6. Save Your Project Code

1. File -> Save

2. File name: led_blink

Your code will be saved into 'MyDocument/Arduino/led_blink' folder


7. Verify The Code

1. Click the verify icon

2. The result should be no error with 'Done compiling' on the bottom


7. Upload The Code

1. Select Port, Tools -> Port

2. Click the upload icon


NODE-JS


1. Install Node JS

https://nodejs.org/en/download/current/


2. Create Folder

1. Project folder
C:\Project

2. Applicaton folder
C:\Project\ESP32


3. Open Command Prompt, Run As Administrator

1. Windows search, 'cmd'

2. Right-click, run as administrator

3. Enter application folder
cd \
cd project
cd esp32