Qt Py ESP32-S2 Arduino Pinout

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
davidwalker555
 
Posts: 5
Joined: Thu Jul 04, 2024 5:01 am

Qt Py ESP32-S2 Arduino Pinout

Post by davidwalker555 »

Hi all. Does anybody know the in designators to use for Arduino IDE? The documentation, including the pinout diagram only shows the GPIO and CircuitPython designators. For example, if I want to write Arduijo code for pin A0, what pin should I declare in the IDE?

User avatar
mikeysklar
 
Posts: 15468
Joined: Mon Aug 01, 2016 8:10 pm

Re: Qt Py ESP32-S2 Arduino Pinout

Post by mikeysklar »

You can reference A0.

With Arduino there is a pins_arduino.h that has all the pin names that are included with the board support package.

Code: Select all

$HOME/Library/Arduino15/packages/esp32/hardware/esp32/3.0.2/variants/adafruit_qtpy_esp32s2/pins_arduino.h
generated example code:

Code: Select all

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(115200);
  
  // Set pin A0 as an input
  pinMode(A0, INPUT);
}

void loop() {
  // Read the analog value from pin A0
  int analogValue = analogRead(A0);
  
  // Print the analog value to the Serial Monitor
  Serial.print("Analog value: ");
  Serial.println(analogValue);
  
  // Add a small delay before the next reading
  delay(1000);
}

pins_arduino.h for this board Qt Py ESP32-S2:
pins_arduino.h
(1.71 KiB) Downloaded 3 times

User avatar
davidwalker555
 
Posts: 5
Joined: Thu Jul 04, 2024 5:01 am

Re: Qt Py ESP32-S2 Arduino Pinout

Post by davidwalker555 »

This is a very helpful reply thank you!

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”