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.
DescriptionThe 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.
HardwareI 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.
SoftwareRaspbian 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.
CodingHere 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.
Servo A is connected to Pin 4 and Servo B is connected to Pin 5.
Problem not solved yetThere is still one last thing, the configuration of walabot_setprofile.
According to the manual , walabot profiel can be set PROF_SENSOR_NARROW, PROF_SENSOR_NONE, PROF_SENSOR, PROF_SENSOR_MTI.
But in Raspbian system, only
walabot_SetProfile(PROF_SENSOR_NARROW);
can read the walabot data, other definition will return with error. But in window 10 system, every Profile runs OK.
Only with Walabot at hand can you feel the magic in it. Every problem becomes challenge to me and inspiration to me. Make me understand the principle better. In fact, the Walabot is an innovation. I think it can replace keyboard as virtual input hardware, I would make a try afterward.
Comments