Skip to content

Commit f1a32d5

Browse files
committed
fix potentiometer example from @blogmywiki
1 parent 578685d commit f1a32d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

potentiometer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ from microbit import *
9292

9393
while True:
9494
# set_pixel brightness if between 0 - 9
95-
brightness = (pin0.read_analog() / 1023) * 9
95+
brightness = int((pin0.read_analog() / 1023) * 9)
9696

9797
display.set_pixel(2, 2, brightness)
9898
sleep(10)

0 commit comments

Comments
 (0)