chipKIT® Development Platform

Inspired by Arduino™

SerialEvent()

Created Wed, 30 Jul 2014 19:09:18 +0000 by ziovic


ziovic

Wed, 30 Jul 2014 19:09:18 +0000

Hello,

I am porting an Arduino sketch to Uno32. The sketch receives data from a radio modem connected to UART, and serialEvent() puts every byte in a buffer until a certain char is received, then sets a string complete flag.

I cannot get it to work with Uno32, I believe serialEvent() is not supported by chipkit, as stated in some old posts in this forum.

Please tell me if I am wrong, or if there is an alternative method to inplement serialEvent functionality.

Thank you,

Vittorio


majenko

Wed, 30 Jul 2014 19:38:13 +0000

SerialEvent is pointless.

All it does is the same as having:

if (Serial.available()) {
  // code here
}

at the start of your loop() function. I don't know what drove Arduino to write that system. They must have been having a particularly disturbed day - more so than usual.


ziovic

Wed, 30 Jul 2014 21:31:12 +0000

Thanks for the prompt answer.

About Arduino people confusion, that's maybe because one of them is Italian :)

Vittorio

PS: I am using UECIDE, very good job!!