Serial reading

Hello,

How can i tell which serial bit rate i need to use? i have the DHT11 which uses 115200, i also have the tmp sensor that came with the arduino kit that uses 9600

Thanks,

Tsachi

Sounds like you need both.
Suggest using Serial (hardware serial port) for 115200, and SoftwareSerial for 9600.

DHT11 doesn't use the UART serial interface but a one wire signal which needs a special library and that library takes care of the timings, you don't need to set a "baud" rate.

What kind of tmp sensor do you use that uses a baud rate of 9600?

Hi,

I'm using the tmp sensor that came with arduino "starter Kit" with 9600, the DHT does come with it's own lib (which i found here on playground) however, it does need 115200 to see the output on the serial interface.

obviously i'm only using it for debug purpose.

I'm only asking because i would like to know how it is possible to debug a program that have 2 type of sensors 1 uses 9600 and the other 115200, if it possible at all.

once i get my new LCD screen with I2C i ordered, i will use the LCD to display the values i need :)))

I'm building a proffing box, taught it would be like very simple project. as usual i made it crazy thing!!!

will share the code and pictures once i have all the parts and it's up and running, still waiting on a few parts to arrive.

Thx

You confuse things. The DHT11 library from the playground doesn't use the serial interface but the example sketch does use it. Of course you're free to change that to your needs without any consequences to the library.
My guess is that the temperature sensor also doesn't use the serial interface (I see no reason for it to use it) but the example sketch prints the values to the serial interface to be able to make any output.

So: just ignore the values in the example sketches that are used as parameters to the Serial.begin() method, use one value that fits your needs (I suggest 57600).