Search code examples
bbc-microbit

Draw moving dot based on accelerometer


How do I draw a single dot that moves left and right based on accelerometer x/y input?

When I am using the plot method I noticed that pixels get turned on but stay on.

How do I draw a single moving dot?

Here's my current attempt:

code example, multiple lights turned on


Solution

  • In the forever loop add a clear screen block. This will clear all the dots before drawing any more.

    micro:bit menu pick for clear screen