This feels like where I started out:
I had already tried:
#include <SoftwareSerial.h>
SoftwareSerial WirelessSerial = SoftwareSerial(2, 13);
void setup() {
Serial.begin(9600); // Setup Serial library at 9600 bps
WirelessSerial.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);
}
}
}
}
}
When I posted:
#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);
}
}
}
}
}
It never worked =\ (tried it again, doesn't work)
Ideas?