Sucess with Wii Nunchuck control of Access Dinghy

In on boat testing today,

A Losi LOSB9522 Brushed ESC was used today to control the main sheet servo for a disabled sailor.

The neutral position was different but other than that it worked very well.

Changes made to the Wii Nunchuck 2.4ghz wireless model to LOSB9522 Brushed electronic speed controller are listed below.

 

Testing today was with one skipper and one disabled sailor.

Wii Nunchuck holder was made from a piece of PVC pipe, bottom was sleeved for a nice fit over the existing joystick rudder control.

Sailor was able to steer the boat and control main sheet with the one hand as his particular needs dictated.

This made for a very comfortable and natural sail according to the delighted sailor.

IMG_20140703_130015[1]IMG_20140703_130020[1]

 

// Note : Xcar esc not suitable as reverse is to under powered (esc is not able to be reprogrammed)

// Wii Nunchuck 2.4ghz wireless to Losi LOSB9522 Brushed ESC
// The values below work for my Losi Strike Brushed ESC

#include <Wire.h>
#include <Servo.h>
#include <wiinunchuk.h>

 

Servo escnine; // Electronic Speed Controller One declaration
Servo escfive; // Electronic Speed Controller Two declaration
int neu = 128; // default zero value for X, Y axis


void setup(void)
{
  nunchuk_init();
  delay(50);
  nunchuk_calibrate_joy();

  delay(20); //wait until the esc starts in case of Arduino got power first
  escnine.attach(9, 700, 2000); // attaches the esc to digital pins and
  escfive.attach(5, 700, 2000); // sets max values and the neutral area
 
 
  escnine.write(neu); // Write neutral value.
  delay(20);

  Serial.begin(57600);
  }

  void loop() {

  nunchuk_get_data(); // receives 6 data bytes from controller

  Serial.print("X = ");
  Serial.print(nunchuk_cjoy_x());
  Serial.print("   Y = ");
  Serial.println(nunchuk_cjoy_y());

 

  // Stabilize Wii output and
  // set Max values for Wii X to counter the esc 50% reduction in reverse
  if (nunchuk_cjoy_x() <= 75)
    escnine.write(7);

  else if (nunchuk_cjoy_x() >= 150)
    escnine.write(150);

  else {
    escnine.write(nunchuk_cjoy_x());
  }

  // Stabilize Wii output and

 

  // set Max values for Wii Y to counter the esc 50% reduction in reverse
  if (nunchuk_cjoy_y() <= 75)
    escfive.write(7);

  else if (nunchuk_cjoy_y() >= 150)
    escfive.write(150);

  else {
    escfive.write(nunchuk_cjoy_y());
  }

  delay(20); // ESCs will only change every 20ms
}

 

 

 

 IMG_20140622_152331  IMG_20140622_152324 IMG_20140622_150700 IMG_20140622_150643 IMG_20140622_150447 IMG_20140622_150438 IMG_20140622_150431 IMG_20140622_145059 IMG_20140622_145052 IMG_20140622_145030 IMG_20140622_141523 IMG_20140622_141439