Open microbit-carlos opened 1 year ago
In comparison V1 returns the configured period (default is 20ms).
V1:
>>> pin0.get_analog_period_microseconds() 20000
V2:
>>> pin0.get_analog_period_microseconds() -1 >>> pin0.write_analog(512) >>> pin0.get_analog_period_microseconds() 20000
Looks like this is by design? as CODAL is not providing the data: https://github.com/microbit-foundation/micropython-microbit-v2/blob/fd99f400b42857b1094811cea76bd3fb841a8286/src/codal_app/microbithal.cpp#L172-L179
So if we cannot support this V1 compatibility we might need to update the docs.
The resolution of this issue should result in NRF52Pin::getAnalogPeriodUs() to not return DEVICE_NOT_SUPPORTED, so this should be fixed with a future CODAL update:
NRF52Pin::getAnalogPeriodUs()
DEVICE_NOT_SUPPORTED
In comparison V1 returns the configured period (default is 20ms).
V1:
V2:
Looks like this is by design? as CODAL is not providing the data: https://github.com/microbit-foundation/micropython-microbit-v2/blob/fd99f400b42857b1094811cea76bd3fb841a8286/src/codal_app/microbithal.cpp#L172-L179
So if we cannot support this V1 compatibility we might need to update the docs.