12 Mission Instructions

Your mission is to create a robotic seismograph that can travel to remote locations and measure tiny tremors. First, you will invent a way to simulate earthquakes so you can test your robot safely.  Then you will design, test, and refine your robot until it is gathering the most useful data for you. 

5. Code: Outline Your Goals

For this mission, you want to set your robot on your shake table and have it continuously checking for tremors, keeping track of the sensor readings over time. The IMU gives you lots of choices about how exactly you do that.

This is your twelfth GoBox mission, so you already know how to write a lot of different types of programs. What do you want your earthquake robot to detect? Our example code will use the IMU (accelerometer) but you might choose something different. That's ok!

You may remember creating your first list in Mission 8. As a reminder, a list is like a variable, but we can store more than one piece of data in it. Just like your shopping list, we can keep adding entries to our list, and we can go back and look at all the items on our list as well. If you would like to build your program to use the list function, you may do so, but we’ve got another idea.

For this GoBox Mission, we'll take lists to a whole new level by using the log function instead. Logging allows you to download a file with all the data from your robot so you can analyze it, graph it, and look for patterns yourself!

[BONUS: once you start to see some patterns, you can eventually teach your robot or your spreadsheet software to find the patterns for you. That's a version of programming too!]


Just like when we made our lists, you’ll need to set a variable for your robot to log.

Our example program will gather data from the IMU (accelerometer) in the Z-axis, but you can choose either X, Y, or Z. Don't worry too much about what all these different axes are. If your IMU is facing forward and pointing up like in our picture, then:

          • X- axis will measure side-to-side wobbling
          • Y- axis will measure forward-and-backward tilting, and 
          • Z-axis will measure up-and-down bouncing.
Here’s what our example code outline looks like so far.