Lesson 3: Computer Science with the Shake
Understanding Computer Science with Your Shake!
Lesson Length: ~1 hour
Lesson Objective:
Use Raspberry Shake to understand core Computer Science principles and lay the groundwork for future coding projects with the Shake.
Classroom Prep:
- Ensure that your Raspberry Shake is setup and connected to the internet
- Install Node-Red on a computer, and practice with it to gain understanding
- Create a ShakeMeter in Node Red (follow this tutorial)
- Prepare to provide students access to computers with internet access
- Pre-install Node-Red on the student computers (optional – can be done in class too)
- Print student reading materials (optional)
This lesson plan assumes that educators have gone through and completed all setup necessary for the Raspberry Shake. Regardless of whether you have or have not completed set up, we recommend that before educators start teaching with the Shake, they visit and read through our Classroom Tips page. Then, you are ready to get your classroom shaking!
Learning Context/Anticipatory Set:
Before instruction, spark the students interest with having a “Shakemeter” running live on your screen (follow the tutorial here to build it). Tell the students that this is the next exciting direction to go in with the Shake – computer science and programming!
Key Terms:
- Computer: A device that accepts data as input, processes that data using logical processes called programs, and outputs the processed data
- Input: When a computer or device is receiving a command or signal from outer sources
- Output: The signal that the computer sends out to another device or system, or to the screen
- Process: The instance of a computer program that is being executed
- Analog: Of or pertaining to continuous variations or transmissions of a continuous signal
- Digital: Of or pertaining to discrete measurements or approximations that can be stored by a computer
- Network: A set of computers connected together for the purpose of sharing resources
- Internet: The global information system that is logically linked together by a globally unique address space, based on the Internet Protocol (IP)
- UDP (User Datagram Protocol): A protocol for sending data over a network
Direct Instruction:
Basics of Computer Science – with Raspberry Shake
Use Raspberry Shake to understand core Computer Science principles and lay the groundwork for future coding projects with the Shake.
To fully understand the Raspberry Shake, you must understand at least the very basics of computer science. In this lesson we will go through those basics, in order to set the foundations for opportunities in the future to do community projects. So, let’s start with the basic question:
What is a computer?
Code.org has this excellent video. Please share with your students!
In summary, computers receive an input, process and store information, then provide an output.
It is important to understand that all data and information computers deal with is digital data. It is expressed, at least in the computer’s inner workings, as ones and zeros. These are decoded and encoded to make it easier for humans to read. The real-world complement to digital data is analog data, which is just a constant stream of information represented by a continuously variable physical quantity. Digital data approximates analog data using a process known as sampling. You can think of this as putting many points along a curve and connecting those points like connect-the-dots. The analog signal and the digital signal will never perfectly sync up, but the digital signal is a good approximation.
We can understand these concepts very well through understanding the Raspberry Shake and the components that make it up. We have the Raspberry Pi, which is the main “computer”. We also have the geophone sensor and digitizer as part of the Raspberry Shake board. The geophone responds to analog data signals, because of its ability to turn ground movement into a constant stream of voltage information. Then, that voltage is sampled by the digitizer, which means it records a data point by converting the data from voltage (analog) to digital. This process of quantifying voltage data is the heart of the process of recording seismic data.
The class will take these concepts and use them as part of a coded program to process and display the Raspberry Shake’s UDP data!
Practice:
Time: 20+ minutes – Start with Node-Red connectivity
(If there is less than 20 minutes remaining, go to closing and complete this activity next class.)
Every student should get out a laptop or a Raspberry Pi to run a Node-Red Server on. Students can work together in pairs.
Follow this tutorial to get started.
Closing:
Time: 5-10 minutes — Written Reflection
Students write a short, 3-5 sentence reflection on what they learned and any insights they made.
- Did today’s lesson change your perspective on computer science? How?
- Did it increase your curiosity? Why?
- Was it difficult to understand? Why?