Benefits of Knowing pin configuration through code .
- Accurate configuration: Configuring pins through code is more accurate than configuring them manually. By using code, you can specify exactly how each pin should be configured, including its function, direction, and other important parameters.
- Flexibility: When you configure pins through code, you have more flexibility in how you use them. You can easily change the configuration of a pin to suit your project’s needs without having to reconfigure it manually.
- Reusability: Configuring pins through code makes your code more reusable. You can use the same code on different microcontrollers or PCB boards without having to manually configure each pin.
- Debugging: Debugging hardware issues is easier when you use code to configure your pins. You can use debugging tools to identify and fix issues in your code, and quickly isolate any problems that are related to the pin configuration.
- Time-saving: Using code to configure pins can save you a lot of time. You can configure all of the pins in your project quickly and easily, without having to spend time manually configuring each one.
- Customization: Configuring pins through code allows you to customize your project’s behavior. You can specify exactly how each pin should behave based on your project’s specific requirements.
STEP 1 – Getting started with ESP32
STEP-2 Put this simple code in your Arduino IDE
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.print("Mosi :");
Serial.println(MOSI);
Serial.print("MISO :");
Serial.println(MISO);
Serial.print("CS :");
Serial.println(SS);
Serial.print("sck :");
Serial.println(SCK);
Serial.print("scl :");
Serial.println(SCK);
Serial.print("sda :");
Serial.println(SDA);
}
void loop() {
// put your main code here, to run repeatedly:
}
Go through this video —