Hello everyone. I upload a sketch from wiki to arduino. The sketch is unchanged. The application does not connect to the arduino.


Hi!
There appears to be data corruption in the data coming from the arduino to torque (the corrupted characters you see in the start of the adapter status screen)
This may be that the TX and RX lines are connected together (which would cause corruption similar to this)
Rx and tx are not connected. I downloaded another sketch to arduino to check the operation of Bluetooth and it works
Hi!
You'll need to investigate why there's corruption coming from the arduino then - the protocol only supports the standard ASCII character set, so anything else will likely get mangled if it is being sent from the arduino
If there's nothing strange being sent from the arduino, then there's something else going on as the extra (mangled) characters you can see in the adapter status screen are being sent to Torque and are likely a symptom of the problem
There should be no echo in the default sketch, therefore there should not be any mention of 'ATI' or 'GETDEFINITIONS' in the adapter status screen (that is never sent from the adapter to torque, only sent from torque to the adapter) so you will need to find out where the echo is coming from - this is usually down to RX/TX data lines being joined.
This code from wiki
const int SENSORSSIZE = 9 * 3; // each line is 9 attributes, and we have 3 lines.
const String sensors[SENSORSSIZE] = {
"0", ANALOG, IS_INPUT, "-", "Pot 1", "Potentiometer 1", "v", "0", "5",
"1", ANALOG, IS_INPUT, "-", "LDR 1", "Light Sensor 1", "v", "0", "5",
"4", DIGITAL,IS_OUTPUT, "0", "Dout1", "Digital Out 1", "bit", "0", "1"
};
This code from github
const String sensors[] = {
"0", ANALOG, IS_INPUT, "-", "Pot 1", "Potentiometer 1", "v", "0", "5",
"1", ANALOG, IS_INPUT, "-", "LDR 1", "Light Sensor 1", "v", "0", "5",
//"4", DIGITAL,IS_OUTPUT, "0", "Dout1", "Digital Out 1", "bit", "0", "1"
};
const int SENSORSSIZE = sizeof(sensors);
Code from wiki works, but not from github