Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New serial begin method for ESP32 to allow the user to specify the cor… #113

Closed

Conversation

NicoBocki
Copy link

@NicoBocki NicoBocki commented Jul 20, 2022

New serial begin method for ESP32, that allows to specify custom RX TX pins. As any pin can be used for this.

grafik

…rect RX TX pins as any pin can be used for this.
@NicoBocki NicoBocki changed the title New serial boot method for ESP32 to allow the user to specify the cor… New serial begin method for ESP32 to allow the user to specify the cor… Jul 20, 2022
@ladyada
Copy link
Member

ladyada commented Aug 1, 2022

we prefer not to have specialized functions for chips - its hard to maintain. what if you set up the Serial object pins then pass it in as a HardwareSerial reference?

@NicoBocki NicoBocki force-pushed the feature_serial_begin_for_esp32 branch from 6944689 to 2bd530f Compare August 2, 2022 07:36
@NicoBocki
Copy link
Author

@ladyada

Hello i can not set the pins before serial begin is executed:

https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.h
espressif/arduino-esp32#7040

In my opinion it is not convenient to set the pins after calling the library method to start communication.

finger.begin(57600);
Serial2.setPins(9, 10);

When a new sample application is provided, for the esp32 it will be ok.
For beginners it is not so nice to use the UART

@ladyada
Copy link
Member

ladyada commented Aug 2, 2022

OK but without the changes to the library, does this initialization work?

finger = Adafruit_Fingerprint(&Serial2);
finger.begin(57600);
Serial2.setPins(9, 10);

@ladyada
Copy link
Member

ladyada commented Aug 7, 2022

no response

@ladyada ladyada closed this Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants