2

One sensor has a baud rate of 115200, the other 9600. I think this will create problems in the serial because I can only choose one baud rate.

What do you think? The first sensor is the pulse sensor, while the other is the gsr sensor by grove. Link: http://pulsesensor.com/ Link 2: http://www.seeedstudio.com/wiki/Grove_-_GSR_Sensor

3
  • Do you have a link to the pulse sensor? And do you mean this (seeedstudio.com/wiki/Grove_-_GSR_Sensor) "Grove GSR sensor"? – Paul Mar 29 '16 at 14:35
  • details updated – Gabriele Giordano Mar 29 '16 at 15:55
  • I think you have totally misunderstood the example code. Both of the examples you linked to used the Serial port to send data to your PC, not the sensor. For that purpose just choose one rate (eg. 115200). – Nick Gammon Mar 30 '16 at 5:14
1

You can only have one sensor on one serial port, and the baud rate is set on the serial port.

So as long as you have two serial ports, or SoftwareSerial ports (I wouldn't, it causes more problems that it solves - get a board with multiple UART interfaces) then yes you can have two baud rates.

8
  • ohh I'm disappointed I didn't consider this before – Gabriele Giordano Mar 29 '16 at 10:29
  • I don't understand if genuino 101 has two serials or just one "Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the Serial1 class." – Gabriele Giordano Mar 29 '16 at 10:55
  • I would assume the Serial port is connected direct to USB (CDC/ACM) and Serial1 connected to the GPIO headers. The 101 is all a bit of a mystery since it's all based around an Intel module that no one outside of Intel knows much about. – Majenko Mar 29 '16 at 11:16
  • if you are using multiple sensor use Arduino Mega board because it have 3 serial ports and Software Serial on UNO supports max baudrate of 115200 but sometimes this max baudrate will create the issues and you will receive the garbage – Muhammad Hassaan Bashir Mar 29 '16 at 12:03
  • Yes I read about the Mega and I wondered if it's the only one in the market with this advantage. I'm wondering what does Intel and Raspy offer – Gabriele Giordano Mar 29 '16 at 14:30
1

One sensor has a baud rate of 115200, the other 9600. I think this will create problems in the serial because I can only choose one baud rate.

Why do you think the sensor has a baudrate?

Both the sensors seem to use the "serial connection" of the Arduino to log their information.

What do you think? The first sensor is the pulse sensor, while the other is the gsr sensor by grove. Link: http://pulsesensor.com/ Link 2: http://www.seeedstudio.com/wiki/Grove_-_GSR_Sensor

I think it'll work fine.

Looking at the facts of your sensors, the pulse sensor does have some kind of weird low-level timing/ADC access. But your Grove GSR sensor can basically be read out through an analog input.

So what to choose?

You could choose 9,6k or 115k2 (9600 or 115200). It wouldn't make all that much difference. 9600 or 115200 will work fine. 115200 is a lot faster, but for debugging purpose 9600 is used, since it's often default and (often) more reliable.

Wrapping up

I don't think there is an issue with the two serials. You can easily log both messages to the same serial output.

Try using 115200 since timing is essential in your case, you want your sensor to be response/fast.

They do both use the same analog to digital converter on your board. An Arduino can't check both sensors at the same time. But by switching between them very fast, you will get a resolution that's good enough.

2
  • I will try to use the GSR with 115k. Do I change also the serialBegin of the GSR code to make it work or it's enough to change it just in the Serial monitor? – Gabriele Giordano Mar 29 '16 at 19:23
  • The code and monitor need the same baudrate. – Paul Mar 29 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.