Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let Tau = 0
- let Zeit = 0
- let Messung = false
- Messung = false
- Zeit = 0
- Tau = 0
- basic.forever(function () {
- if (input.buttonIsPressed(Button.A)) {
- pins.analogWritePin(AnalogPin.P0, 1023)
- // store current time
- Zeit = input.runningTime()
- Messung = true
- }
- while (Messung == (true && pins.analogReadPin(AnalogPin.P0) < 644)) {
- basic.showLeds(`
- # # # # #
- . # # # .
- . . # . .
- . # # # .
- # # # # #
- `)
- Tau = input.runningTime() + Zeit
- }
- Messung = false
- basic.showNumber(Tau)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement