Your Turn: Add More Data
Let’s put ease of expanding the application to the test by adding a feature. Instead of just counting down seconds, the expanded application will ask you for the millisecond (ms) time between counts. You can still choose 1000 to have it count in seconds, but you can also specify a value like 100 to have it count in tenths of seconds.
- Make the changes to the sender and receiver projects shown below.
- Flash the updated code to the sender and receiver micro:bit modules and then go to the terminal tabs.
Sender changes for countdown_sender
Receiver Changes for countdown_receiver
- Try setting the countdown start to 30, the ms time between counts to 100, and the end message to ‘That was faster!’.
- Verify that the receiver result resembles the one shown below.
Only three blocks had to be added to the sender to send the ms value, and another block to the receiver to recover it. The rest of the changes would have been made, even if it was just one project on a single micro:bit.