Hello,
I have a problem that I think is simple to solve but i'm a beginner so i can't understand it. When I verify my program arduino says (you can see it below) : "message cannot be used as a function"
Its a programm linked to an application that "should" change the delay on a waterpump if you press one of the 3 buttons (a, b and c).
Thanks for your help
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(11, 10); // (RX, TX)int led = 13;
void setup()
{
// Démarrer la liaison Bluetooth
Serial.begin(9600);
// Démarrer la liaison Série
bluetooth.begin(9600);
// LED
pinMode(led, OUTPUT);
}void loop()
{
if (bluetooth.available()) {
int message = bluetooth.read();if ( message != -1)
{
Serial.print( message());// Si le message = A, allumer la LED
if ( message == 'a') {
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (86375000);
}// Si le message = B, éteindre la LED
if ( message == 'b') {
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (43175000);
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (43175000);
}// Si le message = C, éteindre la LED
if ( message == 'c') {
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (28775000);
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (28775000);
digitalWrite(13, LOW);
delay (25000);
digitalWrite(13,HIGH);
delay (28775000);
}}
}