Final Project Concept:
Idea: Robotic "Gatekeeper"
Automatic Attendance Tracker / Gift distributor

Problem: At the IRA, an extra-curricular centre, children come to prepare for Robotics competitions, working independently with their teams.
The staff should take attendance but sometimes forget and sometimes children come at odd times and stay for an unspecified time. Recently the academy expanded with another hall of 100 square metres, further increasing the difficulty of tracking the attendance of the 100+ children on competition teams.
Solution: Robot “gatekeeper” - a facial recognition system which also records the time the child enters and leaves. And distributes candy.
It would require a screen which clearly communicates that the child is registered as both entering and later exiting. It may include a kind of arm which is blocking the door and then is raised after the child is recognised.
At a higher level, the system should be able to display the names of children currently in the lab for confirmation and verification by staff. The system would ideally aggregate that information at the end of the month and convert for billing purposes.
It should also have fun aspects like dispensing food / candy, in keeping with the positive and welcoming educational environment. Logically, if a machine is sophisticated enough to take attendance, it should also be able to dispense candies or something else.

Here is the initial sketch of the project which details some of the possible features.
Perhaps a simplified implementation would just be to recognize a child, and if the child shows his/her face 3 hours apart in the same day,
they get a candy bar. It means they are working in the lab for a long time and need some sustenance to keep working.
Perhaps the facial recognition idea is too complicated and better to just distribute key cards for scanning.
Project Parts / Decomposition
Analyzing the project we can divide it into at least 5 parts or sub-projects
- Physical Structure (CNC machine)
- Input: object-person recognition / computer vision - update: RFID
- Output: candy-dispensing mechanism
- Communication Method(s)
- Programming / working with participant data
1. Physical Structure (CNC machine)
1st Prototype during CNC Week 7

The CNC week gave the perfect opportunity to make a prototype of the structure.
So basically this is the first photo with myself and my replacement. It's not completely bad.
Pros:
- Very strong.
- Mouth is sufficiently big to dispense candy.
Cons:
- Very blocky; better to have a rounded head.
- Eyes may be too big for the camera.
- Kerfed door is nice, but not secure.
- Rico thinks the mouth is creepy?

Here is initial design for a rounded head. It is reminiscent of a Lego Mini-Figure Head. I like that..
Still need a new design for mouth. And what about ears / nose? Hmm...
2. Input: object-person recognition / computer vision - update: RFID
Raspberry Pi Camera V2.1
Benefits:
- I have several.
- Supports OpenCV which has ArUco Marker library.
Initial thought was to use facial recogntion, but that might take time to develop and in any case I don't have sufficient photos of the subjects.
Another idea is to use ArUco Markers. ArUco markers are similar to QR codes in being a grid of black and white squares, but they have the benefit of having less complex patterns (a smaller grid), so can be more easily and consistently be detected.
Here's an ArUco generator!
Idea! We could 3D-print participant IDs using a Bambu printer with multiple colours so that the ArUco marker shows!
Prototype:

The card is beautiful, but ArUco markers can best be used with OpenCV which needs an OS apparently.
According to the critera of final project, we should use a microcontroller. That means we should use something like the Grove Vision AI Module V2 instead of a Raspberry Pi. This type of module can be called an "edge" device.
vThe "edge" label means the Grove Vision AI Module V2 is a smart, self-contained unit that processes data where its captured—right at the edge of the system. This makes it faster, more efficient, and versatile for real-time, low-power, or offline AI applications, perfectly aligning with its design for vision-based tasks using an external camera. (source: Grok.ai)
There are at least 3 methods/platforms/ways to use this module:
- SenseCraft AI Model Assistant: tested out a pre-trained model for gesture recognition. no code.
- Program on Arduino connecting with Seeed Studio XIAO Board: for this will need another board and also the additional XIAO board is just for communicating with the Grove board. The processing is still taking place on that module.
- Edge Impulse: this is another platform and specifically for projects like this on the "edge". Worth exploring more..
RFID
RFID cards will be easier to implement than facial recognition so in the interest of completing the project on time will use that. The disadvantage of RFID cards is that they can be borrowed or shared - they are not so closely linked to identity. Anyway, we'll use the standard RFID module available everywhere which is the RC522.

3. Output: candy-dispensing mechanism
A very important aspect of the attendance-tracker is to distribute candy. Initial idea was a conveyer belt, but as it has a limited capacity, another design is needed. The ideal dispenser will have a larger capacity and also detect when the candy is finished. Thanks S.I.B.I.N. for his thoughts on this.
There is a particular type of chocolate in Kazakhstan that has a small profile and could be ideal to dispense in bulk:

Here is an initial design for the dispenser. It will contain chocolates as well have the ability to dispense a small item such as a key. Anything that can fit in a small space. Perhaps some money. This is added because it sometimes is needed to pass some important object, such as a key, and this way it may be done asynchronously without necessitating meeting.

4. Communication Method(s)
There will be one main controller, the XIAO-RP2040 because I have it. Connected to that will be the other peripherals, by that I mean the inputs and outputs.

The RC522 module supports all standard methods of communication: UART, I2C, and SPI. However, since the UART ports on the main controller will be used for communication with the motor(s) and since we want to program in MicroPython and there is more library support for SPI, we will choose to communicate in that method. Of course SPI will require more pins (4), but since we are otherwise basically only connecting a motor, we will be fine.

Pin assignment as follows:
UART (for NEMA17 motor) - TX: GPIO0 (D6); RX: GPIO1 (D7)
SPI (for RC522) - SCK: GPIO2 (D8), MOSI: GPIO3 (D10), MISO: GPIO4 (D9), SS: Any available GPIO pin