Kajo Lab 101

Your first replay.

A light sensor sends the reading 88. The recorded program says ON. Edit one threshold and see what the same reading does.

Change the rule.

These ten observations are from a real Raspberry Pi Pico recording. Each observation contains one sensor reading and the LED command it produced. What do you expect to happen at 88 if the program turns on only below 80?

Night Light recording, observations 421–430
ObservationInputRecorded command
421134OFF
422121OFF
423109OFF
42498OFF
42588ON
42692ON
42789ON
42885ON
42980ON
43076ON
See why the command changes

At observation 425, input 88 is below 92, so the original program commands ON. The edited program stays OFF. At 429 it still stays OFF because 80 is equal to the threshold. At 430, input 76 turns it ON. Both rules turn OFF at 116 or above and keep the previous command in between.

The browser repeats the decision rule over this excerpt, starting at OFF. In Kajo Lab you can replay the full recording with its original timing. The output here is the program’s command to the LED.

Already have Kajo Lab?

Use the full recording in Lab on Windows. You can do this with the Pico unplugged.

  1. Choose Open recording or session… and open Night-Light-Pico.capture. In Signals, click the trace near 8.45 s. Use the arrow keys to compare observations 422 and 425.
  2. Open Program → Forth and choose Recorded source. In Experimental Forth, change DUP 92 U< to DUP 80 U<. Leave 116 as it is.
  3. Choose Compare full recording, then First mismatch. At observation 425 the recorded command is ON (1) and the replayed command is OFF (0). Restore 92 to get the original decisions back.
Watch the full lesson on YouTube

Practice files