Back to Parent

Process

We started with completing the button press function and publishing it as an event. We had some trouble publishing the event at first, but we were able to overcome this challenge. Once that was done, a test of the servo motor was completed to make sure it was working. Then we wrote the code for controlling the position of the servo with a press of the button. At this point when the button was pressed, an event was publicly published as well as the angle of the servo was changed by 10 degrees. Each consecutive button push rotated it 10 more degrees. Once they reach a certain angle, after rotating to either 10 degrees or 150 degrees and starting at 80 degrees it would reset to 80 degrees and the process could start again. 


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0