pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
196 stars 167 forks source link

Pin mapping ESP32 to Wipy2.0/3.0 #132

Closed Kiogora closed 6 years ago

Kiogora commented 6 years ago

Hi,

I notice the use of antennas(int/ext) controlled by an RF switch connected to pin micropy_hw_antenna_diversity_pin_num=16 in main.c, and I notice it maps transparently to GPIO16 in driver/gpio.h. Do the numerical pin numbers in the source code all map back like this?

What is the use of MICROPY_HW_HB_PIN_NUM and MICROPY_HW_SAFE_PIN_NUM on the Wipy?

danicampora commented 6 years ago

Hello,

On the WiPy3 the antenna control pin is P12 (GPIO21 of the ESP32):

https://docs.pycom.io/chapter/datasheets/downloads/wipy3-pinout.pdf

Cheers, Daniel