Advertisement
DrAungWinHtut

Micropython Microbit Basic

Apr 21st, 2022
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. from microbit import *
  2.  
  3. def showNumber(N):
  4.     display.scroll(str(N))
  5.  
  6.  
  7. # 1- Show String Green Hackers
  8. display.scroll('GH')
  9. # 2- Show 1 Sec
  10. sleep(1000)
  11. # 3- Show Animation LED run from left to right
  12. image = Image("40009\n"
  13.               "04090\n"
  14.               "00400\n"
  15.               "09040\n"
  16.               "90004")
  17.              
  18. display.show(Image.HEART)
  19. sleep(1000)
  20. display.clear()
  21.  
  22.  
  23.  
  24. while True:    
  25.     showNumber(100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement