I’m trying to communicate with cs5490 cirrus integrated. When I write under codes I got these errors as below. Please help and check what could was my problem reason.
int resetpin = 7 ;
SoftwareSerial mySerial(0, 1); //RX ve TX
void setup() {
Serial.begin(9600);
mySerial.begin(600);
pinMode(resetpin, OUTPUT);
digitalWrite(resetpin, HIGH);
delay(2000);
digitalWrite(resetpin, LOW);
}
void loop() {
if(Serial.available() > 0){
Serial.write(0x8000);
Serial.print(“register kod =”);
okunankod = Serial.read();
Serial.println(okunankod);
delay(5000);
}
}
This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: “Arduino Mega 2560 or Mega ADK”
sketch_dec15a:2: error: ‘SoftwareSerial’ does not name a type
sketch_dec15a.ino: In function ‘void setup()’:
sketch_dec15a:8: error: ‘mySerial’ was not declared in this scope
sketch_dec15a.ino: In function ‘void loop()’:
sketch_dec15a:28: error: ‘okunankod’ was not declared in this scope
Make up your mind whether you want to use hardware or SoftwareSerial to do the communication. Using SS may be a good idea because it allows you to print debugging information on the Serial monitor but you cannot use pins 0 and 1 for SS.
Board selected as ADK model. codes okay. Circuit as i see okay. there are three lights on arduino. one of is
'L'. Others as 'RX' and 'TX' lights. When i upload. Firstly 'L' is on. then suddenly off. others blinking and off. a few seconds these three off. Then L is on again. 3 times repeating it. Then im taking timeout error
In most cases, you cannot have something wired on RX0 / TX0 while uploading program to board, so either disconnect your device temporarily, or use another one of the 3 remaining Serial ports