I’m trying to use the GPIO from python. I’m using the doc at page: Remote Hardware Service | Meshtastic
I can set a PIN to 1 or 0 with a command like:
meshtastic --gpio-wrb 2 1 --dest \!f244c480 meshtastic --gpio-wrb 2 0 --dest \!f244c480
Now I’d like to understand what return the read.
$ meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!f244c480 Connected to radio Reading GPIO mask 0x10 from !f244c480 GPIO read response gpio_value=16
What is gpio_value=16 ?
Is it the buffer of the gpio set to output ? Meaning the value of the PIN in Output mode.
Usually on a microcontroller we have to define if a PIN is input or output.
I can’t see any command to set the direction.
Can someone help ?