As a quick refresher from previous Forum posts on this project:
The RC Hammering Duck in the Tub is a radio controlled Rubber Duck in a Tub ( truck chassis inside ) using an Arduino Nano to translate the radio receiver's servo PWM signal to a PWM signal & direction bits to control the H bridge. Steering had a DC motor, now uses a standard servo. The Nano also controls a DFPlayer Mini for the sound effects. When the Duck is moving, it quacks. When the hammer swings, a tilt switch wired back to the Nano will fire the HAMMER IMPACT audio file.
The Hammer is controlled by a third channel on the RC transmitter/receiver.
A carnival style duck target on board, the bullseye has a hidden IR receiver. When the target gets hit from a Star Trek Phaser ( IR TV remote) , the Duck turns red, and the RC is disabled for 10 seconds.
To make things even more interesting, there is a companion robot Chase Tank, with an inboard plastic shark on top. It is guided by a PixyCam to chase the Duck.
The Chase Tank was completed hardware wise, but the Arduino code was not producing good results in tracking the Hammering Rubber Duck in the Tub.
To ensure the Duck could be uniquely identified, white LED strips were installed around the tub circumference. This really helped to make the Duck Tub standout, and it could be identified in Pixyam (verifying thru the PixyMon screen) up to 15 feet away ! YAY !! The LED rings and strings really add a drain on the Lipo battery tho.
.........But Disaster is always looking over success's shoulder. I've been pouring over the setup trying to figure out why my code doesnt work correctly.
I failed the PixyCam. Im not sure what exactly did it: the stalled tilt servo that made smoke come out of PixyCam, accidentally plugging in a 11.1V 3S Lipo rather than the 7.4v 2S Lipo, or plugging in the SPI connector backwards repeatedly on the Arduino Nano.
I had to unplug the locked up tilt servo. The PixyCam blocks transmitted to Arduino were ColorCode blocks CC, even tho there is no CC config setup. If I removed battery power from PixyCam powering strictly from Arduino, the Arduino would stop seeing CC blocks, and report back signature blocks (YAY!!) except the x y coordinated never changed, width & height = 0.
For now, Chase Tank will be put in a drawer because I now I want to upgrade it to true object detection.