Skip to content
New issue

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

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

Already on GitHub? # to your account

Any measurement pins grouped in the table #5

Open
spairo1741 opened this issue Apr 18, 2022 · 1 comment
Open

Any measurement pins grouped in the table #5

spairo1741 opened this issue Apr 18, 2022 · 1 comment

Comments

@spairo1741
Copy link

  • not every esp32 board has all the next pins. Is it realistic that active pins should be listed in the table?

Pin 18 -> 1 => OK
Pin 19 -> 10 => OK
Pin 21 -> 1000 => OK
Pin 22 -> 10000 => OK
Pin 23 -> 100000 => OK
Pin 25 -> 10000000 => OK
Pin 26 -> 0 => ERROR
Pin 27 -> 0 => ERROR

int arr[] = {18, 19, 21, 22, 23, 25, 26, 27}; // free pins for esp32 Wroom 32
...
for(int pin : arr) {
//for (int pin = pinStart; pin < pinStart + numberOfPins; pin++) {
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
...
}

@pschatzmann
Copy link
Owner

I think it is quite tricky to come up with an efficient generic solution that works on all platforms.
I suggest that you just implement your own subclass of PinReader. There you could handle all the necessary bit shift operations...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants