Last Updated on 10. October 2026 by SuffocationLink status: OK
Ich hatte einen Joystick, einen Arduino und einen Pan Tilt übrig und dachte mir, das könnte man doch mal kombinieren. Seht was dabei rausgekommen ist.
Facts
This is what I needed:
- Analoger Joystick mit zwei Achsen
- Arduino Uno or similar
- Pan and tilt with two servos
- Motorplatine V1 (praktisch, aber nicht nötig)
- A few pin header female to female cables
Areas of application
- Ferngesteuertes Schwenken und Neigen einer Kamera
- pfff … weiss nicht … Teil eines Wurm- oder Schlangenroboters
Views
Programming
Libraries
No additional ones are required.
Test programme 1
Das Programm ist gänzlich einfach aufgebaut, es holt die Stellung des Joysticks und rechnet sie direkt, mit Hilfe des Map Befehls, in Servo Einstellungen um.
Source code PanTiltAndJoy.ino (GitHub GistLink status: OK)
/***********************************************
* Control pan/tilt with joystick
* www.fambach.net
* GPL v2
*
* you can influence the drive of the servos by adjusting the min and max values.
*/
#include<Servo.h>
#define JOYX A0
#define JOYY A1
Servo servox;
Servo servoy;
void setup(){
Serial.begin(115200);
servox.attach(9);
servoy.attach(10);
}
int xmin = 20, xmax = 130, ymin = 0, ymax = 125, step = 10;
void loop(){
int ax = analogRead(JOYX);
int ay = analogRead(JOYY);
int x = map(ax, 1024,0, xmin, xmax);
int y = map(ay, 0,1024, ymin, ymax);
servox.write(x);
servoy.write(y);
Serial.print("aX: ");
Serial.print(ax);
Serial.print(" aY: ");
Serial.print(ay);
Serial.print(" sX: ");
Serial.print(x);
Serial.print(" sY: ");
Serial.print(y);
Serial.println();
}
That's how it looks
Problems
Die Steuerung ist sehr ungenau, weil der Joystick sehr kurze Fahrwege hat. Evtl. gibt es hier bessere als die Chinaware.
Conclusion
The project was easier than expected and actually done with two lines of code.
Related Posts
- Arduino VENTUNO QLink status: OK
- Arduino UNO QLink status: OK
- Digispark Rev.3 rettenLink status: OK
- Retro Projekt – FDC USB Floppy Disk ControllerLink status: OK
- Arduino Nano 33 BLELink status: OK
- Arduino Nano 33 IoTLink status: OK
- Preview – Arduino Motor Shield mit L298PLink status: OK
- Preview – Arduino Mega Logger ShieldLink status: OK
- Preview – Prototyp Schild für Arduino Mega Link status: OK
- Preview – Arduino Nano ZusatzplatineLink status: OK
Sources
| Date | Change | Author |
|---|---|---|
| 10.10.2026 | Gist-Einbettung durch Code-Block ersetzt (Gist als Quelle verlinkt) | Suffocation |
| 04.10.2026 | Rechtschreibung korrigiert: Tippfehler, Kommas, Groß-/Kleinschreibung | Suffocation |
| 03.10.2026 | Log-Liste eingefügt | Suffocation |
| 30.06.2019 | Post created | Suffocation |




