Advertisement
andretafta

DEBUG_SD Advanced_MLS11

Mar 26th, 2025 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from microbit import *
  2.  
  3. x = 0
  4. y = 1
  5. while True:
  6.   display.set_pixel(x, y, 9)
  7.  
  8.     display.clear()
  9.     x = 0
  10.     y = 0
  11.  
  12.   if button_a.was_pressed():
  13.     x = x - 1
  14.     if x > 4:
  15.       x = 4
  16.  
  17.   if button_b.was_pressed():
  18.     y = y - 1
  19.     if x > 4:
  20.       x = 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement