STEP 13: Now that we have time and temperature, we can start graphing!

  • In SUBJECT, go to and drag Update Scatter Plot into the interval event.
  • Change the first parameter of the update command from x_data to time_list.
  • Change the second parameter of the update command from y_data to data_list.
  • Click Run. Then click Submit and Next to move on.

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 def interval(): data = microbit.get_temp() data_list.append(data) global time time_list.append(time) stage.event_interval(interval, 2)