Skip to content

Instantly share code, notes, and snippets.

@FranciscoJCE
Created May 7, 2025 23:54
Show Gist options
  • Select an option

  • Save FranciscoJCE/ee309df56867854a5965a5602e99b89a to your computer and use it in GitHub Desktop.

Select an option

Save FranciscoJCE/ee309df56867854a5965a5602e99b89a to your computer and use it in GitHub Desktop.

input.onButtonPressed(Button.A, function () { logging = !(logging) if (logging) { basic.showIcon(IconNames.Butterfly) music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Nyan), music.PlaybackMode.UntilDone) } else { basic.clearScreen() } }) let logging = false logging = false loops.everyInterval(60000, function () { if (logging) { datalogger.log( datalogger.createCV("temp", input.temperature()), datalogger.createCV("light", input.lightLevel()) ) } })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment