PRIME LESSONS
By the Makers of EV3Lessons
VIEWING SENSOR VALUES
BY SANJAY AND ARVIND SESHAN
LESSON OBJECTIVES
¢ Learn how to view sensor values on SPIKE Prime and Robot Inventor
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 2
WHY DO YOU NEED SENSOR DATA?
¢ Sensor data can be….
¢ Used to help program more easily (no more guess and check!!)
¢ Used to help program more accurately
¢ Used to debug code as well as build issues
¢ SPIKE Prime and Robot Inventor have no screen, but you can still view sensor data using
the Hub Dashboard
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 3
YOU MUST BE CONNECTED TO HUB
¢ To view any sensor data, you must first be
connected to the Hub (SPIKE Prime or Robot
Inventor)
¢ Click on the small Hub icon in a Project in SPIKE
Prime or Robot Inventor
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 4
SENSOR VALUES ON PROJECT PAGE
¢ Once connected to the Hub, Sensor and Motor Values are visible on the top of each
Project page in both SPIKE Prime and Robot Inventor
SPIKE Prime Robot Inventor
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 5
SENSOR VALUES ON DASHBOARD
¢ Clicking on the Hub Icon in either SPIKE Prime or Robot Inventor takes you to the Hub
Dashboard where you can see more sensor data
SPIKE Prime Robot Inventor
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 6
MORE SENSOR DATA ON THE DASHBOARD
¢ From the Hub Dashboard, you can also see a
Gyro Sensor
lot of additional information about each
sensor/motor
¢ Select the mode using the down arrow
¢ You can also see values for the built-in gyro
sensor
¢ Note: Robot Inventor does not come with a
Force Sensor
Color Sensor Force Sensor Distance Sensor
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 7
SENSOR DATA IS POWERFUL
¢ Sensor data can help you program better and also help you debug your code
¢ As you go through the rest of our lessons, you will use this feature often.
¢ As you complete each challenge, think about how knowing sensor data might help you.
¢ The next page has many several examples to think about.
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 8
WHEN CAN SENSOR DATA CAN HELP?
¢ Reduce Guess-and-Check: I want my robot to turn a particular amount, but I am not
sure how much to turn without guessing.
¢ Debug Code: The robot does not follow the green line like I programmed it to do. Why
not? What color does the robot think that green line is?
¢ Check Builds: I built my robot with the Force sensor a little bit inside the robot. I am
not sure that the Force sensor is getting pressed enough. How can I make sure the sensor
is getting pressed?
¢ Test Sensors: I told my robot to stop when the Distance sensor is 20cm away. But it
seems to stop earlier. Is the sensor working correctly? How can I see what the Distance
sensor sees?
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 9
CREDITS
¢ This lesson was created by Sanjay Seshan and Arvind Seshan for Prime Lessons
¢ More lessons are available at [Link]
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
License.
Copyright © 2020 Prime Lessons ([Link]) CC-BY-NC-SA. (Last edit: 12/14/2020) 10