Forum >GoBLE with Bluno Beetle, Joystick issue
GoBLE with Bluno Beetle, Joystick issue

Hello All,
I have just received a Bluno Beetle with the firmware 1.97
The first thing I did was to try the GoBLE app on an iPhone7 (iOS 10.1.1)
With the GoBLE_test program on the beetle to check the app sends to the Beetle on the serial monitor.
#include <Metro.h>
#include "GoBLE.h"
int joystickX, joystickY;
int buttonState[6];
void setup(){
Goble.begin();
Serial.begin(115200);
}
void loop() {
if(Goble.available()){
joystickX = Goble.readJoystickX();
joystickY = Goble.readJoystickY();
buttonState[SWITCH_UP] = Goble.readSwitchUp();
buttonState[SWITCH_DOWN] = Goble.readSwitchDown();
buttonState[SWITCH_LEFT] = Goble.readSwitchLeft();
buttonState[SWITCH_RIGHT] = Goble.readSwitchRight();
buttonState[SWITCH_SELECT] = Goble.readSwitchSelect();
buttonState[SWITCH_START] = Goble.readSwitchStart();
Serial.print("Joystick Value: ");
Serial.print(joystickX);
Serial.print(" ");
Serial.println(joystickY);
for (int i = 1; i < 7; i++) {
Serial.print("Button ID: ");
Serial.print(i);
Serial.print("\t State: ");
if (buttonState[i] == PRESSED) Serial.println("Pressed!");
if (buttonState[i] == RELEASED) Serial.println("Released!");
}
}
}
My issues is that everythings works perfectly expect that when I move the joystick , only JoystickX updates, JoystickY is fixed to 1.... JoystickX changes to 255 when moving towards the top of the screen and 1 when moving towards bottom of the screen.
Joystick Value: 114 1
Button ed!
Joystick Value: 109 1
Button IDJoystick Value: 93 1
Button Ieleased!
Joystick Value: 87 1
Button I: Released!
Joystick Value: 77 1
Button Ileased!
Joystick Value: 75 1
Button ID: 1 State: Released!
Button ID: 2 State
Joystick VaJoysticdd!
Joystick ValuJoystick eJoystick lJoystick Val
Joystick sed!
Joystick VaJoystick Joystick VaJoystick Va State: Released!
Joystick State: Released!
Joystick ValJoystick VJoystick Value: 185 1
Button ID: 1 Steased!
Joystick ValJoystick VJoystick VaJoystick Value: 225 1
Button ID: 1 Stsed!
Joystick Value: 250 1
BJoystick Value: 255 1
Joystick Y is always fixed to 1 except when pressing the Start button, it goes to 0.
Joystick Value: 128 0
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Pressed!
Joystick Value: 128 1
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Released!
Joystick Value: 128 0
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Pressed!
Joystick Value: 128 1
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Released!
There must be a bug somewhere...
Is there anything I can do to help figure out the issue?
Thanks a lot for your help.
Seb
I have just received a Bluno Beetle with the firmware 1.97
The first thing I did was to try the GoBLE app on an iPhone7 (iOS 10.1.1)
With the GoBLE_test program on the beetle to check the app sends to the Beetle on the serial monitor.
#include <Metro.h>
#include "GoBLE.h"
int joystickX, joystickY;
int buttonState[6];
void setup(){
Goble.begin();
Serial.begin(115200);
}
void loop() {
if(Goble.available()){
joystickX = Goble.readJoystickX();
joystickY = Goble.readJoystickY();
buttonState[SWITCH_UP] = Goble.readSwitchUp();
buttonState[SWITCH_DOWN] = Goble.readSwitchDown();
buttonState[SWITCH_LEFT] = Goble.readSwitchLeft();
buttonState[SWITCH_RIGHT] = Goble.readSwitchRight();
buttonState[SWITCH_SELECT] = Goble.readSwitchSelect();
buttonState[SWITCH_START] = Goble.readSwitchStart();
Serial.print("Joystick Value: ");
Serial.print(joystickX);
Serial.print(" ");
Serial.println(joystickY);
for (int i = 1; i < 7; i++) {
Serial.print("Button ID: ");
Serial.print(i);
Serial.print("\t State: ");
if (buttonState[i] == PRESSED) Serial.println("Pressed!");
if (buttonState[i] == RELEASED) Serial.println("Released!");
}
}
}
My issues is that everythings works perfectly expect that when I move the joystick , only JoystickX updates, JoystickY is fixed to 1.... JoystickX changes to 255 when moving towards the top of the screen and 1 when moving towards bottom of the screen.
Joystick Value: 114 1
Button ed!
Joystick Value: 109 1
Button IDJoystick Value: 93 1
Button Ieleased!
Joystick Value: 87 1
Button I: Released!
Joystick Value: 77 1
Button Ileased!
Joystick Value: 75 1
Button ID: 1 State: Released!
Button ID: 2 State
Joystick VaJoysticdd!
Joystick ValuJoystick eJoystick lJoystick Val
Joystick sed!
Joystick VaJoystick Joystick VaJoystick Va State: Released!
Joystick State: Released!
Joystick ValJoystick VJoystick Value: 185 1
Button ID: 1 Steased!
Joystick ValJoystick VJoystick VaJoystick Value: 225 1
Button ID: 1 Stsed!
Joystick Value: 250 1
BJoystick Value: 255 1
Joystick Y is always fixed to 1 except when pressing the Start button, it goes to 0.
Joystick Value: 128 0
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Pressed!
Joystick Value: 128 1
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Released!
Joystick Value: 128 0
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Pressed!
Joystick Value: 128 1
Button ID: 1 State: Released!
Button ID: 2 State: Released!
Button ID: 3 State: Released!
Button ID: 4 State: Released!
Button ID: 5 State: Released!
Button ID: 6 State: Released!
There must be a bug somewhere...
Is there anything I can do to help figure out the issue?
Thanks a lot for your help.
Seb
2017-03-07 00:46:02 Hi
This is largely related to the Arduino authorities and I'm afraid we can do very little. But I will give a feedback to our software team to see if there are any update in the near future.
Wendy.Hu
This is largely related to the Arduino authorities and I'm afraid we can do very little. But I will give a feedback to our software team to see if there are any update in the near future.


2017-03-04 03:29:54 Hi Wendy,
Thanks a lot for the reply, will try that ASAP.
However the 1.0.x IDE is no longer supported by the arduino dev team so I would prefer to continue using the latest build.
Any chance you could make it work under 1.8.1 IDE?
Thanks
Seb
seb.frys
Thanks a lot for the reply, will try that ASAP.
However the 1.0.x IDE is no longer supported by the arduino dev team so I would prefer to continue using the latest build.
Any chance you could make it work under 1.8.1 IDE?
Thanks
Seb

2017-03-02 02:11:26 Hi Seb,
So sorry for the late reply.
I did a test just now and find its a problem with IDE version. Please use I.0.* IDE to try again. Then it should be no problem.
Wendy.Hu
So sorry for the late reply.
I did a test just now and find its a problem with IDE version. Please use I.0.* IDE to try again. Then it should be no problem.


2017-02-27 19:35:42 Hi guys,
It has been a week already, could someone from DFrobot try to replicate and analyse this issue please?
This is DFrobot sample code provided to test the board and it is not OK that it does not work.
This bluetooth remote functionality is the reason I bought the board so I would appreciate if you could look into it ASAP.
Thanks a lot.
Seb
seb.frys
It has been a week already, could someone from DFrobot try to replicate and analyse this issue please?
This is DFrobot sample code provided to test the board and it is not OK that it does not work.
This bluetooth remote functionality is the reason I bought the board so I would appreciate if you could look into it ASAP.
Thanks a lot.
Seb
