Transfering Data via BT2.1
Transfering Data via BT2.1
Hi,
my company recently bought a data logger and the task to make it work was given to me. Actually I am quite new to this topic.
My task is to establish a connection via BT 2.1 and read data (Gyro, GPS and Speed) somehow like in the iOS app. However I don't know where to start.
It would be very helpfull if someone could tell me maybe which files are needed for BT connection or what I have to do for a connection between Logger and Computer.
Thanks in advice.
my company recently bought a data logger and the task to make it work was given to me. Actually I am quite new to this topic.
My task is to establish a connection via BT 2.1 and read data (Gyro, GPS and Speed) somehow like in the iOS app. However I don't know where to start.
It would be very helpfull if someone could tell me maybe which files are needed for BT connection or what I have to do for a connection between Logger and Computer.
Thanks in advice.
Re: Transfering Data via BT2.1
you could start with a arduino bluetooth serial terminal app for your phone, this will let you send and recieve data to the logger. let me know if you still want more info.
Re: Transfering Data via BT2.1
Maybe my problem starts already here. I am using this basic code to receive some date via bluetooth:
int counter =0;
void setup() {
Serial.begin(38400);
delay(50);
}
void loop() {
counter++;
Serial.print("Arduino counter: ");
Serial.println(counter);
delay(500);
}
But nothing happens at all. Am I doing something wrong?
int counter =0;
void setup() {
Serial.begin(38400);
delay(50);
}
void loop() {
counter++;
Serial.print("Arduino counter: ");
Serial.println(counter);
delay(500);
}
But nothing happens at all. Am I doing something wrong?
Re: Transfering Data via BT2.1
Ok in arduino, Serial is hardware serial port 0
The logger unit only has 1 hardware port and uses an additional software port.
The hardware one is connected to the internal OBD interface chip, and the software one is connected to the Bluetooth module.
so Serial.begin() would connect to the OBD
http://arduino.cc/en/reference/serial
for debugging/data/readouts you want to use the software serial:
http://arduino.cc/en/Reference/softwareSerial
and in the datalogger sketch it uses
to initiate the software serial 'object'
so then once that has been used, you can address in like:
so doing it that way you should be able to see your prints to your bluetooth terminal
The logger unit only has 1 hardware port and uses an additional software port.
The hardware one is connected to the internal OBD interface chip, and the software one is connected to the Bluetooth module.
so Serial.begin() would connect to the OBD
http://arduino.cc/en/reference/serial
for debugging/data/readouts you want to use the software serial:
http://arduino.cc/en/Reference/softwareSerial
and in the datalogger sketch it uses
Code: Select all
SoftwareSerial SerialInfo(A2, A3);
to initiate the software serial 'object'
so then once that has been used, you can address in like:
Code: Select all
SerialInfo.begin(38400);
so doing it that way you should be able to see your prints to your bluetooth terminal
Re: Transfering Data via BT2.1
Did this work for anybody? I want to use a bluetooth serial terminal app on android to send and receive data to the logger, but did not manage to get a connection.
Re: Transfering Data via BT2.1
linigers wrote:Did this work for anybody? I want to use a bluetooth serial terminal app on android to send and receive data to the logger, but did not manage to get a connection.
it works for me, you will need:
#define ENABLE_DATA_OUT 0
#define STREAM_BAUDRATE 38400 //assuming 2.1 bt
#define VERBOSE 1
then you should see debugging text, to send to it you will need to add code that checks the software serial port connected to the bt module for new data and does with it what you want.
Re: Transfering Data via BT2.1
Thank you! Do you know by chance how it is working with the BLE version? I got a Samsung Galaxy Note 3 which is BLE able.
Re: Transfering Data via BT2.1
well assuming you have the logger model with ble instead of 2.1 then you would just change the baud rate i specified
Re: Transfering Data via BT2.1
haydent wrote:Ok in arduino, Serial is hardware serial port 0
The logger unit only has 1 hardware port and uses an additional software port.
The hardware one is connected to the internal OBD interface chip, and the software one is connected to the Bluetooth module.
so Serial.begin() would connect to the OBD
http://arduino.cc/en/reference/serial
for debugging/data/readouts you want to use the software serial:
http://arduino.cc/en/Reference/softwareSerial
and in the datalogger sketch it usesCode: Select all
SoftwareSerial SerialInfo(A2, A3);
to initiate the software serial 'object'
so then once that has been used, you can address in like:Code: Select all
SerialInfo.begin(38400);
so doing it that way you should be able to see your prints to your bluetooth terminal
This finally works for me. Thanks a lot!
Now I need some special data from the device. Not only GPS and Gyro data but also the temperature of the Gyro sensor as well as the accuracy of the GPS. Is there a way to access this information or even to get the raw data?
Re: Transfering Data via BT2.1
i dont know specifically but if it is available you could find out how from the datasheets for the sensor/modules in there, just google it