In our last meeting before the showcase we implemented the controllers and adjusted the patterns to work with the radio.
One problem we had encountered was that any actions within the forever loop without any conditions would interrupt and end any commands that the radio sends. This would make the artbot only partially respond to the radio signal in regards to motion. To fix this I moved my pattern out of the forever loop and into a new action based on receiving a specific number over the radio on channel 56. In this case it was the number 2.
Doing this enabled actions to be taken to disrupt their own pattern. We still left the distance sensor in the for loop so that, above all else, it would try to stay away from obstacles.
Below I include the final code for the radio controller (left) and the ArtBot (right):
To accommodate the tilting and shaking motion that the radio controller required, I based the design of my controller on twirling batons and used a cardboard tube as the base on which I would mount my controller. Here it is:
Its quite fun to use and I plan on decorating it with masking tape for the expo tomorrow as well.
Well, that’s all for now!