This project will start with one @boardname@ and program it to use the @boardname@’s temperature sensor to collect and display the current temperature in Celsius on the @boardname@’s LED display. The data collected can be recorded manually on a paper with a pencil.
2. The ``||basic:on start||`` event will display the title and purpose of the @boardname@ in all caps, `"TEMPERATURE"`. The text is put in the ``||basic:show string||`` block (the title is put in the ``||basic:on start||`` event so when the @boardname@ is started up it will show what it is programmed to do. It is done in all CAPS because it is easier to read as it is displayed in the LED display).
In the ``||basic:forever||`` event temperature data can be continually collected from the @boardname@’s temperature sensor. The data can be sent to the display on the LEDs using a ``||basic:show number||`` block from the ``||basic:Basic||`` toolbox.
**Variation:** Instead of using a ``||basic:forever||`` loop, the **A** and **B** buttons could be programmed to display the temperature in either Celsius or Fahrenheit.
The Windows 10 MakeCode app allows data to directly read serial data from your @boardname@ for data logging and other fun experiments. This allow the collection of data in real time which can be downloaded in a CSV file for additional analysis in a spreadsheet.
With the program downloaded from the MakeCode app to the @boardname@ and the USB cable left connected and using the ``||serial:serial write value||`` block from the ``|serial:Serial||`` toolbox in the **Advanced** tool section.
When the program is running, a purple **Show data Device** button shows up under the Simulator. By clicking on the button the data being observed can monitored and graphed in the **Show data Device** window.
The graph is highlighted with the blue box. The **Download** button in the red highlighted box allows the downloading of the recorded data as a CSV file which can be opened in a spreadsheet and analyzed.
Two @boardname@s can be used to collect and record data using the radio commands. One @boardname@ can be setup remotely and the other @boardname@ can be used to observe the data. The first @boardname@ can send the data it observes to the second @boardname@ for the observer to record. To set up two @boardname@s so they can communicate over the radio they need to be on the same radio group.
In the ``||basic:forever||`` loop the temperature is collected from the @boardname@ sensor and stored in the ``temperature``variable. The temperature is displayed on the LED display. A radio signal is sent to all @boardname@ radios in group 99. The program pauses for `1000` milliseconds and then loops again.
In the ``||radio:on radio received||`` event, the temperature is received from sending the @boardname@ radio. The receive temperature is then displayed on the LED display. This is repeated whenever a radio signal is received.
This code is the same as above but one additional line of code is added to write to the word “Celisus” and the temperature to the MakeCode app to the USB serial connection. This is the same as described in the **Project 2** section above.
Use a radio connection to collect and record the outside temperature. It could be set up so it only detects and reports the temperature every minute or a few times an hour. It could be setup to sound an alarm (play a musical sound) if the temperature were to rise above a certain level.
Several students could use micorbits to observe the temperature at different elevations where the live at set times to see if there are patterns in temperatures at different elevations or regions.