I connect Grove-OLED Display 0.96"to I2C_2, Grove - Button(P) to GPIO_50, Grove - PIR Motion Sensor to A0, Grove - Fingerprint Sensor to UART1 and servo to P8_13 pin on the Grove Base Cape for Beaglebone as the picture above.
Please note that servo need to work with an extra 5V power(as BBGW can't provide enough current). And it means that the extra power needs to connect its GND to BBGW. The bread board is for this.
git clone <a href="https://github.com/jerryyip/candy_machine.git"> https://github.com/jerryyip/candy_machine.git</a>
When the pir sensor detects someone nearby, the fingerprint sensor will start to blink one time per second, then you could place your finger on it . If you have stored your fingerprint before, the servo will work and give you a candy. And if you don't, you can't get anything.
So how to store a fingerprint? Press the button for about 2-6 senconds, then the fingerprint sensor will start to blink 2.5 times per second, much more fast the before. Then you could place your finger---move your finger---place the same finger again on the fingerprint sensor according to the guide in the OLED to store your fingerprint.
In this part, we need to make an box as the picture below shows, you can download the drawings here.
Then we need to cut the the board using laser cutting. I guess you don’t have a laser cutting at home, you can find some in the hacker space near from you easily. If there's no hacker space nearby, you can try the Laser Cutting Service supply by Seeed.
Here's we use 3mm wood~
This part is easy, just use pillars fix 5 woods. Nothing special to note~
Put candy warehouse on the box we just made. then we can put the candy and test.
PS: If the candy size doesn't match the wheel, we have to adjust the wheel size~