Hello everybody, I'm new in this forum. I'm trying to control leds with MYO armband.
Myo is connected to PC(bridge between myo and arduino) with it's dongle and arduino is connected via HC-06 to PC. I'm using ARDUINO 1.6.4 software and myoduino.
Underneath is my code. What is wrong.
switch ( val == myo.getCurrentPose() ) {
case rest:
...
A comparison can only have two results: true or false
val = Serial1.read();
Serial.read() will read only one character and removes it from the serial input buffer. So your val will contain only one character. Is this what you want to do?
Other than that, it's not possible to tell you what is wrong, because you don't explain what it is doing that you think is wrong..
How does the MyController instance know where to get data? I suspect that it is expecting to get data from the hardware serial port. If that is the case, you will need to re-write the library to make it get data from a SoftwareSerial instance, using the pins the bluetooth device is connected to.