I had to do that with an ALBER Wheelchair that used a JC2000 joystick with opposing outputs.Woody may have to double-up his digipots to make his RC adapter work for this.
XY axes The twin outputs of the XY axes can be independently selected to be
rising together in the same direction (PP) or opposed (PN).
A box of choice sized to contain all the joystick board bits and bobs PLUS enough room for a PP3 battery and your RC receiver?.
Plus some ACCURATE measurements of the original joysticks output voltages.
Do both...I can do voltages very accurate! Do you mean while connected into the system or loose output unloaded by input impedance?
long deadManInterval = 110; // milisecs interval between
if(mySerial.available()) { // data received from smartphone
deadManTimeout = false;
delay(2);
cmd[0] = mySerial.read();
if(cmd[0] == STX) {
int i=1;
while(mySerial.available()) {
delay(1);
cmd[i] = mySerial.read();
if(cmd[i]>127 || i>7) break; // Communication error
if((cmd[i]==ETX) && (i==2 || i==7)) break; // Button or Joystick data
i++;
}
if (i==2) getButtonState(cmd[1]); // 3 Bytes ex: < STX "C" ETX >
else if(i==7) getJoystickState(cmd); // 6 Bytes ex: < STX "200" "180" ETX >
}
}
if(deadManEnabled) checkDeadMan();
sendBlueToothData();
}
void checkDeadMan() { // stop chair if signal is lost
static long previousMillis = 0;
long currentMillis = millis();
if(currentMillis - previousMillis > deadManInterval) { // send data to smartphone
previousMillis = currentMillis;
if(deadManTimeout) {
BT_Steering = 127; //neutral
BT_Throttle = 127;
Rapidity=127; // Set to HALT value ...
buttonPresses=1; // Arduino and Android phone defaults to HALT after signal loss.
displayStatus = "***!HALT***"; // for debug only
digitalWrite(BTled,LOW);
int joyX = 200; // Offset to avoid
int joyY = 200;
delay(2);
}
else
digitalWrite(BTled,HIGH); // BT Connected indication.
woodygb wrote:NOTE:- That FTDI has recently updated it's driver and the Chinese copies will not work with it ... you need to use an earlier version of the driver.
https://blog.adafruit.com/2016/02/08/ex ... -adafruit/
Return to Buy/Sell Mobility Equipment
Users browsing this forum: No registered users and 108 guests