Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from microbit import *
- if compass.is_calibrated() == False:
- compass.calibrate()
- while True:
- needle = ((15 - compass.heading()) // 30) % 12 # 측정된 방위각을 12개로 나눈다.
- display.show(Image.ALL_CLOCKS[needle])
Add Comment
Please, Sign In to add comment