ESP32-POE pins in arduino code

Started by mahad, March 02, 2020, 03:04:55 PM

Previous topic - Next topic

mahad

Hello!

I'm using an OLIMEX ESP32-PoE Rev C for a project and I'm trying to figure out how to program the GPIO pins in the EXT1/EXT2 headers. When I look at it's schematic and I try to toggle some pins on the arduino IDE it never manages to work. For instance I try to toggle GPIO32 and I write this code:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(12, OUTPUT); //esp32-poe schematic pin number
  pinMode(6, OUTPUT); //esp32 general schematic pin number
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(6, HIGH);
  digitalWrite(12, HIGH);
  delay(1000);                       // wait for a second
  digitalWrite(6, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(12, LOW); 
  delay(1000);                       // wait for a second
}

So far I have not gotten any pin to be able to toggle in the board. I use arduino IDE with "OLIMEX ESP32-POE" board chosen. My main questions are the following:

Am I using the right board, should it instead be the "ESP32 Dev Module" board? The next question is which pin numbers are correct? The one from the OLIMEX schematic https://github.com/OLIMEX/ESP32-POE/blob/master/HARDWARE/ESP32-PoE-hardware-revision-D/ESP32-PoE_Rev_D.pdf

or the ESP32 datasheet? https://www.digikey.se/en/datasheets/espressif-systems/espressif-systems-esp32_datasheet_en

Stanimir5F

Try this:

void setup()
{
  pinMode(32, OUTPUT);
}

void loop()
{
  digitalWrite(32, HIGH);
  delay(1000);
  digitalWrite(32, LOW);   
  delay(1000);
}
May the Source be with You!

mahad