HI smart people
I a new member of this forum and have a similar problem with this topic. Please help.
It will be a huge favor
currently i making program to compare 2 variable to activate a condition like this
char* memberE[]={"Rendah", "Agak Rendah", "Normal", "Agak Tinggi", "Tinggi"};
char* memberDE[]={"Negatif", "Normal", "Positif"};
char* kondisiEr [1];
char* kondisiDEr [1];
float waktuIr=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
kondisiEr[1] = "Rendah";
kondisiDEr[1] = "Negatif";
float mfE = 0.5;
float mfDE = 1;
if (digitalRead.kondisiEr[] == memberE[] && digitalRead.kondisiDEr []= "Negatif") { //something wrong here
waktuIr= (min(mfE ,mfDE))*5;
Serial.print ("jika error ");
Serial.print (kondisiEr[1]);
Serial.print (" dan delta error ");
Serial.print (kondisiDER[1]);
Serial.print ("maka irigasi besar selama ");
Serial.println (waktuIr);
}
else Serial.print ("kodingan salah");
}
delay (3000);
}
Arduino: 1.6.6 Hourly Build 2015/06/23 05:51 (Windows 8), Board: "Arduino Uno"
Build options changed, rebuilding all
Defuzzifikasi.ino: In function 'void loop()':
Defuzzifikasi:19: error: request for member 'kondisiEr' in 'digitalRead', which is of non-class type 'int(uint8_t) {aka int(unsigned char)}'
Defuzzifikasi:19: error: expected primary-expression before ']' token
Defuzzifikasi:19: error: expected primary-expression before ']' token
Defuzzifikasi:19: error: request for member 'kondisiDEr' in 'digitalRead', which is of non-class type 'int(uint8_t) {aka int(unsigned char)}'
Defuzzifikasi:19: error: expected primary-expression before ']' token
Defuzzifikasi:24: error: 'kondisiDER' was not declared in this scope
Defuzzifikasi.ino: At global scope:
Defuzzifikasi:31: error: expected constructor, destructor, or type conversion before '(' token
Defuzzifikasi:32: error: expected declaration before '}' token
request for member 'kondisiEr' in 'digitalRead', which is of non-class type 'int(uint8_t) {aka int(unsigned char)}'
please help
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.