Reward Machine
When you put something, the machine will automatically sense, and then some rewards will appear when the motor rotates. In this video, my reward is Switch, so when I place the item in the correct position, the machine will automatically sense it, and my reward will appear.
Prepare All the Materials You Need
You need to prepare:
- an Arduino board
- a breadboard
- a USB Cable
- a 5 sides box(use cardboard that thicker than ordinary A4 white paper)
- a 4k paper (Do not choose too heavy paper. If the paper is too heavy, the motor will not be able to rotate because it cannot bear the weight of the paper.)
- 13 x Jumper wires
- a motor
- a 10k ohm resistors
- a Photoresistance
- some clay
- some tape
Setup
Connect the jumper wires from breadboard to the Arduino board according to the picture above.
Uploading and Modifying the Code
Creating the Box
First, get a 4k cardboard. Second, measure the required size (if you want to put the Switch, you need a length: 17cm, width: 29cm area). Then, fold in half along the measured size and cut off the unnecessary four corners. Last, fold the remaining cardboard in the middle, and use the tape sticks the rest of the cardboard together to form an open box.
Install the Photoresistor
Use scissors to poke a hole where the photoresistor can be exposed.
Install the Motor
Stick the motor to the middle of the box with clay. Remember that the shaft that the motor rotates should be outside the box. Otherwise, if the shaft is stuck, the machine cannot be used.
Install the Cover
Stick the clay on the shaft of the motor, and take out the cut paper (17cm * 29cm), and finally stick it on the shaft of the motor.