The code to take advantage of the Nunchuk information was all pulled from the Internet in the form of an Arduino library, and then a sample code was edited for our uses.
The code in this example was what was used to test the different axes on the Nunchuk. The final code will just take advantage of two axes, and the buttons. While the actual coding for using the button presses has not been coded, it has been planned and written on paper to get the step by step coding planned.
The thought process behind this code is that when the button is pressed it will keep the last value of the servo position stored, and use that as a reference value to go into 'fine tuning mode'. In this mode, the angles will be mapped to a small range that involves negative numbers. This will allow it to go clockwise and counter clockwise in small increments around the last known position. When the button is released it will go back to using the normal servo position variables.
--
Andrew Southworth
No comments:
Post a Comment