# Subject Area(S): Computer Science, Physics

Tags

The Research Experience for Teachers Program /
http://www.cs.appstate.edu/ret

Subject Area(s): Computer Science, Physics

Computer Science Tools: LittleBits, Arduino

Activity Title: Rotations with Little Bits

Grade Level: High School

Time Required: 90min

Recommended Group Size: 1-2

Summary: Using LittleBits and an Arduino, along with C++ to program the Arduino, we will measure the rotations per minute of a wheel using a light sensor and by hand.

Computer Science Connection: Physics, Mathematics

Keywords: LittleBits, speed, math, RPM, Rotations, Arduino, C++

Pre-Requisite Knowledge: None

Materials List: LittleBits STEAM Student kit, LittleBits Arduino, Computer w/ Arduino IDE installed.

Introduction/Motivation: While driving a car, it is critically important to keep eyes on the road and the dashboard at all times. In modern cars, and some older models, microcontrollers are used to adjust different parameters in the car as needed. For example, in hybrid or electronic cars, the gas pedal of the car doesn’t open the throttle to let air into the combustion chamber. It actually measures the amount of weight on the pedal and the car’s computer converts that to electrical flow instead. In this lab we will work with the components in a LittleBit STEAM kit to study the relationship between electrical flow and rotation speed of a small motor.

Before the Activity: Make sure the Arduino IDE is downloaded and installed. See the steps below:

1) Download and install the IDE from

2) Install the correct board by going to “Tools” -> “Board” -> “Board Manager”, searching “Little Bits”, and downloading the option that is available.

3) Make sure you’re connected to the correct port when the Arduino has power (Go to “Tools” -> “Port” and it’s usually the only option except for a Bluetooth option

Accessing Files: You should be provided with a “Slider.ino” file. This file is used for Part 2 of the lab. To open it, simply go to your Arduino IDE, select ‘File’, and then ‘Open’.

Troubleshooting: This lab should be fairly easy to implement. However, if the Arduino is not working, take a look at these tips:

1) Make sure that the Arduino is connected to the correct board. See the steps for adding the correct board in the “Before the Activity” section.

2) Make sure the Arduino is connected to the correct port. Whenever the Arduino loses connection to power, it will sometimes disconnect from the port. Make sure it reconnects every time it is turned on.

If the code was tampered with, consider reopening the original ‘Slider.ino’ file, or looking through the code to see if there are any logical errors.

Other Ideas: This lab could be made more difficult. Consider attaching a small weight, such as a couple pennies, in order to introduce a much more complex physics problem involving, perhaps, torque, centrifugal motion, and other such concepts. This will not be covered here.