invention

Random Number Generator for the Classroom

by The Nerdy Teacher

Published on July 14, 2016

Sometimes you want to pick a student to participate in class, but you tend to choose the same few students over and over again. With these awesome bits, you can choose a different student with the press of a button. The code will allow you to tweak it so you can adjust to the number of students you have in your class. Give it a try!

Credits: Arduino Website for the base code

How To Make It

1

Assemble the parts Gather all of your parts and assemble based on the picture below. You can use the battery and cord as you set it up, but you can always switch to the microUSB bit later if you want to leave it at your desk. I like the battery and the cord because it makes it mobile so the teacher can walk around the room.

Picture 1

2

The Code Grab the code below and drop it into the Arduino IDE. Feel free to tweak the number based on the number of students in the class. I have it set to 99 right now because the code seems to divide it by 3. I'm still working this part out. For a class in the 30s, 99 has been working great for me. I will update the patch when I figure it out.

3

Push the Button Once the code is loaded up, all you need to do is push the button and wait for it to stop. That is your number. You can release the button and push again if you need another person, or you can hold down the button and another number will appear in a couple of seconds. You can adjust the wait time in the code as well.

Related Projects