Finalizing Code and Controller

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.

20181211_215138

Well, that’s all for now!

-Arva Syed

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.