Advertisement
Guest User

Untitled

a guest
May 21st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. let Tau = 0
  2. let Zeit = 0
  3. let Messung = false
  4. Messung = false
  5. Zeit = 0
  6. Tau = 0
  7. basic.forever(function () {
  8. if (input.buttonIsPressed(Button.A)) {
  9. pins.analogWritePin(AnalogPin.P0, 1023)
  10. // store current time
  11. Zeit = input.runningTime()
  12. Messung = true
  13. }
  14. while (Messung == (true && pins.analogReadPin(AnalogPin.P0) < 644)) {
  15. basic.showLeds(`
  16. # # # # #
  17. . # # # .
  18. . . # . .
  19. . # # # .
  20. # # # # #
  21. `)
  22. Tau = input.runningTime() + Zeit
  23. }
  24. Messung = false
  25. basic.showNumber(Tau)
  26. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement