I am planning to use a joystick to input joystick stroke directions, save the directions as number in a variable. The idea is to start a servo motor if the directions match the directions in the sketch. for example, let us say, I perform the following movement on the joystick: 1. two left movement along x axis ( <-, <-) 2. two right movement along x axis ( ->, ->) 3. One Up movement along y axis and 4. one down movement along y axis. These movements are as a result of a user solving a clue. (two left strokes could mean an alphabet 'A' or a number 1, not decided yet, and so on..)
I would like to save the 4 or 5 joystick directions in a variable and if it matches the directions declared in the sketch (True condition), then DC servo motor would start and pull a screen up, which will expose 'SOLVED' written behind the screen.
Hope the scenario is clear. Since, I am new to this, I would like to get some help with the sketch and the connections (Arduino Joystick inputs and DC server output are available on web, it will be helpful if someone can give an overall guidance as well.