- Sep 20, 2017
- 7
- 5
I'm not having any luck trying to read BI output when and alarm is triggered. I'm trying to use the GE electronics protocol using the program in the following thread.
ARDUINO & BLUE IRIS SERIAL digital i/o DIO
But, I don't know if the Arduino is actually seeing any output. The COM ports are configured correctly to match with a baud of 9600. Arduino is connected to PC through a USB cable. I can access the Arduino through the Arduino software so I know it's communicating.
So basically, what I would like help with is writing a basic sketch that captures the output of BI and displays it in the Serial Monitor.
void setup(){
Serial.begin(9600);
int Byte1; // incomming data value "S" will be read into this variable:
int Byte2; // incomming data value "0","1","2" or "3" will be read into this variable:
int Byte3; // incomming data value "0" or "1" will be read into this variable:
}
void loop(){
Serial.println(Byte1);
Serial.println(Byte2);
Serial.println(Byte3);
}
I know that sketch isn't complete by any means, but I'm just looking for something for testing.
Also, is there any guidance on the other option of Arduino Single Byte I/O?
Thanks.
ARDUINO & BLUE IRIS SERIAL digital i/o DIO
But, I don't know if the Arduino is actually seeing any output. The COM ports are configured correctly to match with a baud of 9600. Arduino is connected to PC through a USB cable. I can access the Arduino through the Arduino software so I know it's communicating.
So basically, what I would like help with is writing a basic sketch that captures the output of BI and displays it in the Serial Monitor.
void setup(){
Serial.begin(9600);
int Byte1; // incomming data value "S" will be read into this variable:
int Byte2; // incomming data value "0","1","2" or "3" will be read into this variable:
int Byte3; // incomming data value "0" or "1" will be read into this variable:
}
void loop(){
Serial.println(Byte1);
Serial.println(Byte2);
Serial.println(Byte3);
}
I know that sketch isn't complete by any means, but I'm just looking for something for testing.
Also, is there any guidance on the other option of Arduino Single Byte I/O?
Thanks.