Closed tungalbert99 closed 8 months ago
@tungalbert99
Sorry to trouble you, set_cgpio_digital
is to set the digital output IO of cgpio (CO0~CO7, DO0 ~ DO7), and get_cgpio_digital
is to get the digital input IO of cgpio (CI0 ~ CI7, DI0 ~ DI7).
Thank you for your suggestion, we will fully consider it, thank you for your support
This makes sense and matches what I'm seeing. Thank you for your quick response and constant improvements to this SDK!
Problem:
Using the function
set_cgpio_digital
changes the state of a cgpio pin to either high or low on the control box. Unfortunately, the corresponding getterget_cgpio_digital
does not returned the changed value.Potential Solution:
Calling
arm.get_cgpio_state()[1][5] >> 9 & 0x0001
where the 9 is the correct ionum seems to work correctly after a call toset_cgpio_digital(9, 1)
. Ifget_cgpio_digital(9)
is meant to not be the corresponding getter function toset_cgpio_digital(9, 1)
, I would advise changing the name.