More convenient pin initialization for ESP8266
Posted: Wed Apr 21, 2021 4:36 am
Hi all,
I am trying to develop custom firmware for the ESP8266 module that can allow users to initialize Pins on an ESP8266 more conveniently.
Below is an example of how I would want to instantiate the D6 pin using the custom firmware that I aim to develop.
ESP8266 pinout:
https://imgur.com/VN06Xxl
Image of ideal firmware:
https://imgur.com/a/mN9AbB0
Essentially, I want to allow a user to initialize a Pin with a string so that they wouldn’t have to continuously look at the above diagram to know what GPIO pin each label on the microcontroller corresponds to and, instead, just input the labeled pin for convenience.
I am new to the MicroPython codebase and have limited experience with low-level programming, so I would be grateful if anyone has any suggestions on how to go about working through this task.
The current approach that I am thinking about using is to write code to map a string input into the corresponding GPIO pin to minimize the consequences of the modification to the rest of the MicroPython functionality.
Does anyone know where to implement these changes? From the research that I have done, I found that machine_pin.c (https://github.com/micropython/micropyt ... hine_pin.c) initializes possible GPIO pins, but I’m not able to pinpoint how to the function that is used to instantiate a specific pin.
Thank you so much,
Ryan Dehmoubed
I am trying to develop custom firmware for the ESP8266 module that can allow users to initialize Pins on an ESP8266 more conveniently.
Below is an example of how I would want to instantiate the D6 pin using the custom firmware that I aim to develop.
ESP8266 pinout:
https://imgur.com/VN06Xxl
Image of ideal firmware:
https://imgur.com/a/mN9AbB0
Essentially, I want to allow a user to initialize a Pin with a string so that they wouldn’t have to continuously look at the above diagram to know what GPIO pin each label on the microcontroller corresponds to and, instead, just input the labeled pin for convenience.
I am new to the MicroPython codebase and have limited experience with low-level programming, so I would be grateful if anyone has any suggestions on how to go about working through this task.
The current approach that I am thinking about using is to write code to map a string input into the corresponding GPIO pin to minimize the consequences of the modification to the rest of the MicroPython functionality.
Does anyone know where to implement these changes? From the research that I have done, I found that machine_pin.c (https://github.com/micropython/micropyt ... hine_pin.c) initializes possible GPIO pins, but I’m not able to pinpoint how to the function that is used to instantiate a specific pin.
Thank you so much,
Ryan Dehmoubed