Writing digital pin in makecode with clouddb

Hi all,

I am quite new to App Inventor and MakeCode. I have tried to use bluetooth uart to send message to the micro:bit to control whether the microbit will write 1 or 0 to the digital pin (connected to LED light, i.e. turn the LED on or off). The LED has successfully turn on or off immediately upon receiving the message.

However, when I enhanced it with IoT features (i.e. using clouddB to store the message so that both the user and the monitor side can get update), the LED light does not response in a short time, (i.e. the LED message indicates on immediately but the LED does not turn on at the moment) and even occasionally does not follow what the message indicates. The above situation happens after the first two times turning on/off the LED.

May I know the reason? The sharing of the messages by clouddB get updated correctly and instantly, however the LED sometimes does not turn on or off consistently with the message.

Thanks a lot

Show your relevant blocks