KRITSADA

microbit Running LED with Array

May 31st, 2018
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let list: number[] = []
  2. let value = 0
  3. list = [0, 1, 2, 3, 4, 14, 24, 34, 44, 43, 42, 41, 40, 30, 20, 10]
  4. basic.forever(() => {
  5.     for (let value of list) {
  6.         led.plot(value / 10, value % 10)
  7.         basic.pause(100)
  8.     }
  9.     for (let value of list) {
  10.         led.unplot(value / 10, value % 10)
  11.         basic.pause(100)
  12.     }
  13. })
Advertisement
Add Comment
Please, Sign In to add comment