Project20.Joystick =================== Description ------------ Lots of robot projects need joystick. This module provides an affordable solution. By simply connecting to two analog inputs, the robot is at your commands with X, Y control. Specification -------------- - Supply Voltage: 3.3V to 5V - Interface: Analog x2, Digital x1 - Size: 40*28mm - Weight: 12g Connect -------- .. image:: /img/connect/20_bb.png Code ----- .. code-block:: c int value = 0; void setup() { pinMode(3, OUTPUT); Serial.begin(9600); } void loop() { value = analogRead(0); Serial.print("X:"); Serial.print(value, DEC); value = analogRead(1); Serial.print(" | Y:"); Serial.println(value, DEC); delay(100); } Phenomenon ----------- .. image:: /img/phenomenon/20.jpg