Reputation: 1845
I have arithmetic issues with micropython.
from microbit import *
counter = 0
while True:
display.show('8')
if accelerometer.was_gesture('shake'):
display.clear()
sleep(1000)
counter = counter + 1
display.scroll(counter)
sleep(10)
Error displayed on the LEDs: TypeError: can't convert to int
What am I missing here?
Upvotes: 0
Views: 1146
Reputation: 196
Do you have access to the REPL? I would test every line on its own in REPL, this way you will now where the error is.
Alternatively delete most of the code until you have something that works, and add one line at a time. Once you have the line with the error it will be much easier to solve.
Start with this:
from microbit import *
counter = 0
while True:
display.show('8')
sleep(10)
Upvotes: 1