Install ESP32 Arduino software development environment based on Windows


Other software environment requirements:


1. Install Arduino software

You can get the Windows-side Arduino installation package from the Arduino official website , as follows:

insert image description here

Use the following to install the Arduino environment with .exeone click

insert image description here

The installation is complete

insert image description here


2. Import the arduino-esp32 library

Import the arduino-esp32 library in Arduino IDE , see "Installing using Arduino IDE"

  • Stable version link:
https://espressif.github.io/arduino-esp32/package_esp32_index.json
  • Development version link:
https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

open File —> Preferencesinterface

insert image description here

Copy the above link to Additional boards manager URLsbelow

insert image description here

Click OK, the installation process will be printed as follows

insert image description here

3. Add library management

open Tools —> Manage Librariesinterface

insert image description here

4. Select the development board

open Select Board —> Select other board and portinterface

insert image description here

Search for ESP32the series

insert image description here

Click OKto jump out of the installation interface

insert image description here

Select Yes, install immediately, you will enter the following installation process, this process needs to wait for a while

insert image description here

The installation content will be printed in a black box

insert image description here

After the installation is complete, the ESP32 series development board option will be added to Tools —> Board —> esp32the interface

insert image description here

Many ESP32 test routines will also be added in File —> Examples —> ESP32the directory .

insert image description here

Next, you can open any routine to test, select the development board model in Toolsthe directory , and configure COMthe port

insert image description here

Click the button directly 下载to complete 工程编译and固件下载

insert image description here

Finally, you can open Serial Monitorthe interface to view the firmware operation log

insert image description here
insert image description here

The following provides an example test code based on GPIO26 lighting

/*
  BlinkRGB

  Demonstrates usage of onboard RGB LED on some ESP dev boards.

  Calling digitalWrite(RGB_BUILTIN, HIGH) will use hidden RGB driver.
    
  RGBLedWrite demonstrates controll of each channel:
  void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)

  WARNING: After using digitalWrite to drive RGB LED it will be impossible to drive the same pin
    with normal HIGH/LOW level
*/
//#define RGB_BRIGHTNESS 64 // Change white brightness (max 255)
#define RGB_BUILTIN 26
// the setup function runs once when you press reset or power the board

void setup() {
    
    
  // No need to initialize the RGB LED
  Serial.begin(115200);
  pinMode(RGB_BUILTIN, OUTPUT);
  Serial.printf("GPIO is %d \r\n", RGB_BUILTIN);
}

// the loop function runs over and over again forever
void loop() {
    
    
#ifdef RGB_BUILTIN
  digitalWrite(RGB_BUILTIN, HIGH);
   Serial.printf("Light on \r\n ");
  delay(1000);
  
  digitalWrite(RGB_BUILTIN, LOW);   // Turn the RGB LED off
  Serial.printf("Light off \r\n");
  delay(1000);

#endif
}

Guess you like

Origin blog.csdn.net/Marchtwentytwo/article/details/130260756