Go Down

Topic: Serial Event Monitor for Alarm System with SoftwareSerial (Read 738 times) previous topic - next topic

aquadat0r

Hi there,

I'm looking at making use of the SoftwareSerial library to primarily monitor the serial output of my alarm system. It sends out an event in a packet of 30 bytes with byte 30 being a checksum byte. There is no defined start and end byte. I'll probably need to implement a scrolling window method to find the first valid packet whereafter it should easy.

I need to be able to read this in via the SoftwareSerial library in a byte array form, and not in a char array. Having these is byte form will make my further parsing a lot easier.

Please if anyone can assist, it would be much appreciated.

robtillaart

PLease post your code sofar?

declare

uint8_t buffer[60];

if you have read 60 bytes you are sure you have captured a sequence of 30 ...

What baud rate do you use? SWserial is not the most reliable one. Is the HW serial occupied?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy