// 2015-12-30 this PicoC program block writes via RS232 to Velleman K8056 RelayCards // This test should show ABCD on the RS232 sniffer .... STREAM* pRs232Stream = stream_create("/dev/tty/RS232",0,0); // create rs232 stream to the name of the Loxone RS232 extension, which I named "RS232" char* pRS232Cmd = "ABCD"; while(TRUE) { if (pRs232Stream != NULL) { setoutputtext(0, pRS232Cmd); // this shows "ABCD" in Loxone Liveview stream_write( pRs232Stream, pRS232Cmd, strlen( pRS232Cmd )); // write to output buffer stream_flush(pRs232Stream); printf("%s", pRS232Cmd ); // shows "ABCD" in Loxone Log window setoutput(0,1) ; // set AQ1 to show activity sleep(1000); setoutput(0,0) ; // reset AQ1 to show activity sleep(1000); } } } stream_close(pRs232Stream);