Advertisement
cmass

그림 신호등_UP1

Oct 15th, 2019
791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. from microbit import *      # 마이크로비트 모듈의 모든 명령 사용
  2.  
  3. stop = Image("00900:00900:00900:00900:00900")  # 서 있는 이미지
  4.  
  5. walk1 = Image("00900:"          # 걷는 이미지 첫 번째  
  6.               "09990:"
  7.               "00900:"
  8.               "09090:"
  9.               "09090")
  10.  
  11. walk2 = Image("00900:"      # 걷는 이미지 두 번째
  12.               "09990:"
  13.               "90909:"
  14.               "09090:"
  15.               "90009")
  16.              
  17. display.show(stop)      # 서있는 이미지 보여주기
  18. sleep(3000)             # 3초 지연
  19. display.show(walk1)     # 첫 번째 걷는 이미지 보여주기
  20. sleep(300)              # 0.3초 지연
  21. display.show(walk2)     # 두 번째 걷는 이미지 보여주기 
  22. sleep(300)              # 0.3초 지연
  23. display.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement