microsoft / devicescript

TypeScript for Tiny IoT Devices (ESP32, RP2040, ...)
https://microsoft.github.io/devicescript/
MIT License
3.27k stars 118 forks source link

realtimeclock error #300

Closed louisvangeldrop closed 1 year ago

louisvangeldrop commented 1 year ago
  1. I am using a raspberry pi pico_w mcu flashed with the latest firmware
  2. const realTimeClock = new ds.RealTimeClock()
  3. await realTimeClock.setTime(2023, 3, 29, 1, 21, 20, 0)
  4. The program blocks.
pelikhan commented 1 year ago

The program will block until it finds a server of RealTimeClock on the bus. Try to start the realtime clock server using the simulator page and it should keep going.

pelikhan commented 1 year ago

(agreed that the blocking can be confusing)

pelikhan commented 1 year ago

I've added a few more notes in the JSDocs about this behavior.

louisvangeldrop commented 1 year ago

I have added the server using the simulator page and it is working now.

pelikhan commented 1 year ago

Keeping this issue open to track general "no sensor lock" issue.

pelikhan commented 1 year ago

tracked in https://github.com/microsoft/devicescript/issues/310