al5D Master-Slave System

Hi,
I was looking into potentiometers to buy in order to configure a master slave system with my current al5D arm. Would anyone have suggestions on potentiometers that could interface with the botboarduino board that came with the AL5D arm?
Thanks so much

Essentially this: youtube.com/watch?v=F-5-ymKTiMU
You can use almost any 10k pot.

Hi,
I’ve been trying to test potentiometers with the al5d arm, and the botboarduino but can’t seem to get it to work. Attached are pictures of the arm, the wiring, and the sample code I’m using to try and get 1 potentiometer to function correctly. Does anyone have any suggestions as to how to make this work better in terms of wiring/code? I was originally trying to rotate the base rotate servo in pin 2, with the potentiometer attached to A2 analog pin. Any help would be greatly appreciated.

Thanks so much,
Chris

Code:

[code]#include <Servo.h>

///This script transfers the input from a single potentiometer to a single servo
int potPin = A2; // select the input pin for the potentiometer
int value = 0; // variable to store the value coming from the sensor

Servo servo1;
int servo1Pin = 2;

void setup() {

// initialize serial
Serial.begin(9600);

servo1.attach(servo1Pin);

}

void loop() {

value = GetValue(potPin);

//value = map(value, 0, 1023, 0, 180);
//servo1.write(value);

Serial.print(value);
Serial.println();

}
// Does the process
int GetValue(int apin)
{
int val;
int temp[2];

// Ready the analog converter (and wait for initialization)
analogRead(apin);
delayMicroseconds(100);

// Get readings
temp[0] = analogRead(apin);
temp[1] = analogRead(apin);

// Calculate average
val = (temp[0] + temp[1]) / 2;

return val;
}[/code]



Don’t start with a complete arm. Start with the code for one servo, and one potentiometer. There are many examples online for this.