Open Roberta

Create an example program that uses the buttons from Calliope as a sensor

Background

Many of our users are still new to programming. They are just learning how programming works. For this user group we would like to provide exemplary programs for the use of each of the individual sensors.

Task

Think of a good, but simple use case for the buttons as sensors and create a small example program. Find out about how the sensor works in reality before you start.

Document the program in suitable places and describe the scenario in the description view.

Programs for embedded systems with NEPO differ from programs for PCs. Find out how the data from sensors can be read out effectively and reliably. Try to answer the following three questions within and with the code of your program:

  • Why is it good / bad to use a loop in the program?
  • Should the sensor value be stored in a variable?
  • Should the "wait for ..." programming block be used?

Deliverables

Complete the task by providing the program with explanations.

Task tags

  • best practice
  • sensors
  • robotics
  • nepo
  • advanced

Students who completed this task

RohanC, RichardB, Aria, nishanth1232, Blippy, Olivia, Shrey_vanja

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
  • assessment Outreach / Research
close

2019