Go Down

Topic: SerialEvent with a bluetooth module (Read 583 times) previous topic - next topic



I am trying to create an interrupt with the bluetooth module. I initialize a serial port with the bluetooth pins and it works, but it doesn't create a serialEvent. Did anybody know if it's possible with the arduino UNO board?

Thank you!


Jul 04, 2015, 05:17 pm Last Edit: Jul 04, 2015, 05:18 pm by Robin2
SerialEvent is NOT an interrupt - though I understand why you may think it is.

It is exactly the same as having the following code as the last thing in loop()

Code: [Select]
void loop() {

   // other stuff

   if (Serial.available() > 0) {

and you can easily add that functionality - if you think it actually adds any value.

Have a look at the examples in serial input basics

Two or three hours spent thinking and reading documentation solves most programming problems.


Ohh... Ok.
I thought that because when you recieve a message it calls automatically to another method.

So, thank you!

Go Up