The software serial library claims speeds of up to 115200 - though I have not tested this. In simple serial communication it can do 57600 easily though.
If I change the baudrate at all, then the camera fails to transmit anything.
Bizarrely the same sketch compiles to different sizes under both Linux and Windows (using the same version of the IDE - 1.0)!
This is the code:
/*
* latest version of the camera tester - 09-12-2012
*
*/
#include <SoftwareSerial.h>
SoftwareSerial camport(10,11);
void setup()
{
Serial.begin(115200);
// set up the software serial pins properly
// rx = input, tx = output
pinMode(10, INPUT);
pinMode(11, OUTPUT);
camport.begin(38400);
}
void loop()
{
// send a command to the camera
Serial.println("resetting camera");
resetCamera();
delay(4000);
// try and read the camera response
while(camport.available() > 0)
{
byte inByte = camport.read();
Serial.print(inByte, HEX);
Serial.print(" ");
}
Serial.println();
// stop
while(true)
{
}
}
// send the reset command to the camera: 0x56 0x00 0x26 0x00
void resetCamera()
{
byte resetCmd[4] = {0x56, 0x00, 0x26, 0x00};
camport.write(resetCmd, 4);
}
Which weighs in at 5056 bytes under Windows and 4688 bytes in Linux.
I am about to try the very latest Linux version - will report how that goes!
Thanks for your help,
Alex