Okay, so with the following I get this error:
sketch_may10a:3: error: expected constructor, destructor, or type conversion before '.' token
#include <SoftwareSerial.h>
SoftwareSerial WirelessSerial = SoftwareSerial(2, 13);
WirelessSerial.begin(9600); // Setup Serial library at 9600 bps
void setup() {
Serial.begin(9600); // Setup Serial library at 9600 bps
}
void loop() {
// read the IO:
if (Serial.available() > 0) {
int inByte = Serial.read();
for (int thisPin = 9; thisPin < 11; thisPin++) {
pinMode(thisPin, OUTPUT);
switch (inByte) {
//Pin 9 - Lights
case '1':
digitalWrite(9, HIGH); // Turns on Lights
break;
case '2':
digitalWrite(9, LOW); // Turns off Lights
break;
default:
// turn all the connections off:
for (int thisPin = 9; thisPin < 11; thisPin++) {
digitalWrite(thisPin, LOW);
}
}
}
}
}