STEP 8: We'll use a special event to let us continually collect data with the micro:bit!

Code indented underneath an interval event runs continuously.

  • In GRAPHICS, go to and drag out Interval Event to the bottom of your code editor.
  • Delete the line that says ····sprite.turn_left(15).
  • Then, in SUBJECT, click on and drag out Temperature INSIDE your interval event.

microbit = codesters.Microbit() microbit.show_string("hello") data = microbit.get_temp() microbit.show_number(data) data_list = [] time_list = [] my_display = codesters.ScatterPlot(time_list, data_list) time = 0