go-dht icon indicating copy to clipboard operation
go-dht copied to clipboard

pins could be 4 characters on 64bit RPIs

Open thkukuk opened this issue 2 years ago • 0 comments

On my Raspberry Pi 3 (64bit kernel and userland) the pins are in the 4 character range (e.g. 2017 for GPIO23) according to kernel debug interface. But the library only uses the first two digits:

bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin->pin);

Writing manual a 2 digit number in the kernel interface with echo does not work (creates an error), but the "2017" does work. Will fork the code and try to increase the buffer the next days when I have time again.

thkukuk avatar Jan 27 '23 19:01 thkukuk