- Go to Sketch and down to Include Library and select Servo. Notice that the line of code “#include <Servo.h>” appears at the top of the coding window.
- Again, go to Sketch and down to Include Library and this time select “SoftwareSerial”. Notice that the line of code “#include <SoftwareSerial.h>” appears at the top of the coding window.
STEM Connections
Remember from the Servo activity that we include the Servo library to help us communicate with the Servo easily. Likewise, we use the Software Serial library to communicate with the Bluetooth module easily.
Explain to students that including the Servo and SoftwareSerial libraries makes it easier to write code to control the Servo and Bluetooth module.
- Can’t find ‘Servo’ or “SoftwareSerial” in Sketch>Include Library
- It’s there, keep looking!
- Can’t find “#include <Servo.h>” or “#include <SoftwareSerial.h>”
- Check the very top of the sketch code
- Try this step again