The proposed project is the 3D-gesture-controlled toy crossbow. Toy crossbow fixed on top of X-Y plan and X-Z plan free rotary Cloud Terrace, can be adjusted to fire inking cotton ball to target paper. While this project achieved half-way of cloud terrace adjustment, the fire of cotton ball is not achieved yet, since the proper trigger can not function properly.
With Walabot, the movement of the cloud terrace and fire-action can be simply controlled by hand gesture of move-forward, backward, upward, downward.
The cloud terrace is servo-driven. In most cases, buttons or capacitor touch sensors are used for human interface control. Gesture control can be more use-interface friendly and pose more control ability like speed and strength. It can control two plan at the same time as the hand gesture reveals.
The cloud terrace is good for camera tracing and good for crossbow firing. Two sg90 servos shall be used for 4-direction control.
I have tested Walabot in window 10 system, it works fine. While in my project, one embedded hardware shall be used to make one compact size and scalable for function improvement. It takes me really a lot of time testing ARM-A8 based TI-AM335 based board, MIPS based Creator Ci40 and Finally Raspberry Pi 2B, which I used in the end.
It seems that the SDK for Debian can work in 64bit architecture, but not in 32 bit. There is little problems with Raspberry Pi. But SDK installation location is different from Installation guide.
The obvious short-coming for raspberryPi is that PWM is supported for Pin 1 only. I have to define customized timer to control the servo. Since the the latency of codes can not be proper calculated, the operation frequency is not accurate, only enough for demo purpose.
Raspbian Jessie is used for development. But the SDK for Python can not work stable. I have tested all the python examples, but fail another time with wrong file including. I think that I have not define parameter proper, some SDK files can not be found when I reboot and change the environment parameters.
In the end I have found out that C++ environment is stable and fast. Only that graphic user Interface can not be achieved as easy as that of Python with tinker library.
In the end, coding in C++ in raspbian Jessie is my final choice.
Here is the program Flow Diagram
In run_crossbow(), the xPosCm and yPosCm shall be compared with THRESHHOLD value. If the data exceed the threshold, the 4 direction of move-forward, backward, upward, downward can be detected and send command to raspberryPi for servo operation. zPosCm is not used yet. It can be reserved as cotton-ball-fire gesture control.
For more detail: Finger Gesture-controlled Toy Crossbow