+ 1
Help with a python and microbit code??
I have a 7-segment display, a microbit and little knowledge on how to code in python. The display flashes but the numbers are not correct. i think it maybe a coding problem how someone can help me. If the code is wrong help me change it thanks. from microbit import * pins = [pin0, pin1, pin2, pin8, pin12, pin13, pin14, pin15] digits = ["11111100","01100000","11011010","11110010","01100110", "10110110","10111110","11100000","11111110","11110110"] while True: for i in range(0,10): bits=digits[i] for j in range(0,8): pins[j].write_digital(int(bits[j])) display.scroll(str(i)) sleep(1000)
1 Odpowiedź