dmays / google-code-arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

sketch_jun17a:6: error: expected initializer before '.' token #1125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here is my code:

int pinr = 3;
int piny = 5;
int ping = 6;
int lightLevel = 0;
int bv.Serial;

void setup () {
  bv.Serial.setAudioInput(0);
  Serial.begin(115200);
  pinMode(pinr, OUTPUT);
  pinMode(piny, OUTPUT);
  pinMode(ping, OUTPUT);
}

void loop()
{
  bv.Serial.processAudio(46);
}
if(bvSerial.engineRunning)
{
  bvSerial.processAudio(46);
}
}

{
  bvSerial.getData();
  if(dataType ==BV_COMMAND)
  sampleTest = bvSerial.cmdData;

  if(dataType == BV_STATUS&&bvSerial.engineRunning==true)
  bvSerial.startStopListening();

  if(dataType==BV-STR)
  setLEDS();
}

{
  if (bvSerial.strData=="wake")
  {
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    digitalWrite(pinr, HIGH);
    digitalWrite(piny, HIGH);
    digitalWrite(ping, HIGH);
    delay(200);
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    delay(200);
    digitalWrite(pinr, HIGH);
    digitalWrite(piny, HIGH);
    digitalWrite(ping, HIGH);
    delay(200);
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    delay(200);
    digitalWrite(pinr, HIGH);
    digitalWrite(piny, HIGH);
    digitalWrite(ping, HIGH);
    delay(200);
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    lightLevel=0;
  }
  else if (bvSerial.strData == "sleep")
  {
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    digitalWrite(pinr, HIGH);
    digitalWrite(piny, HIGH);
    digitalWrite(ping, HIGH);
    delay(200)
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    delay(200);
    digitalWrite(pinr, HIGH);
    digitalWrite(piny, HIGH);
    digitalWrite(ping, HIGH);
    delay(200)
    digitalWrite(pinr, LOW);
    digitalWrite(piny, LOW);
    digitalWrite(ping, LOW);
    lightLevel=0;
  }
  else if (bvSerial.strData == "brighter")
  {
    if(lightLevel <255)
    {
      lightLevel += 85;
      analogWrite(pinr, lightLevel);
      analogWrite(piny, lightLevel);
      analogWrite(ping, lightLevel);
    }
  }
  else if(bvSerial.strData == "darker"
  {
   lightLevel -= 85;
   analogWrite(pinr, lightLevel);
   analogWrite(piny, lightLevel);
   analogWrite(ping, lightLevel);
  }
}
else
{
  bvSerial.startStopListening();
  bvSerial.sendToBV("ERROR" + bvSerial.strData);
  bvSerial.starStopListening();
 }
}

Yes, I do have some problems with the code but,

here is the main problem:
sketch_jun17a:6: error: expected initializer before '.' token

Original issue reported on code.google.com by d...@asbindia.org on 17 Jun 2013 at 1:06