Hello guys, I’m new to the SparkFun forums so please forgive me if I sound rude or inexperienced.
I’ve been working on a project with a small team for some time now. Currently we are trying to hook up a system composed of two Arduino Unos:
[Arduino #1]
This Arduino has connected an RF transmitter that is triggered by the push of a button. The transmitter can be found here: <https://www.sparkfun.com/products/10534>
[Arduino #2]
This Arduino is connected to an RF receiver and an IR Camera. Here are the two products we are using:
The push button transmitter and receiver set works fine as an individual system. The camera also takes pictures fine as an individual system. But what we would like to do is have the receiver trigger the camera upon reception of a signal. The problem is that the camera runs at 38400 while the receiver runs at 9600. I’ve looked into a number of sites concerning the problem (that one Arduino can’t run two baud rates simultaneously) but nothing addressed our problem.
My question is, code-wise, how would you implement two systems that work perfectly fine individually but run at different baud rates. Any help is much appreciated
Have you looked into SoftwareSerial? I don’t have any experience with your situation, but I think I remember people using SoftwareSerial running at different baud rates than Hardware Serial.
From the description of your project, I don’t understand why you need two baud rates. The Arduino should use 38400 baud to talk to the camera, via the serial port.
Those receivers and transmitters don’t have a “baud rate”, they have a maximum bit rate (which you would be exceeding at 9600 baud) and for all practical purposes, must be software controlled via port pins. The VirtualWire library works fine for this purpose.
Just to amplify what jr said above. Those type RF modules are very very basic and don’t include a lot of the functions “higher end” RF modules do. That said they still work for simple things. Several of those functions, that the VW library (or it’s replacement) does, is summed up on this line from their page.
Does not use the Arduino UART. Messages are sent with a training preamble, message length and checksum. Messages are sent with 4-to-6 bit encoding for good DC balance, and a CRC checksum for message integrity.
You should endeavour to learn why a preamble is needed (AGC), why encoding is needed and why CRC is a good idea.