Skip to content

Commit

Permalink
Auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jjfalling committed Sep 22, 2012
1 parent b4d65d0 commit b3407a2
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions development/ArduPowerStrip.ino
Expand Up @@ -342,21 +342,21 @@ void setup() {


com[0]=(Command){
"HELP", "Prints this. Try HELP <CMD> for more", command_help };
"HELP", "Prints this. Try HELP <CMD> for more", command_help };
com[1]=(Command){
"INFO", "Shows system information", command_info };
"INFO", "Shows system information", command_info };
com[2]=(Command){
"STATUS", "Shows the status of a outlet", command_status };
"STATUS", "Shows the status of a outlet", command_status };
com[3]=(Command){
"ON", "Sets an outlet to on", command_on };
"ON", "Sets an outlet to on", command_on };
com[4]=(Command){
"OFF", "Sets an outlet to off", command_off };
"OFF", "Sets an outlet to off", command_off };
com[5]=(Command){
"REBOOT", "Reboots an outlet", command_reboot };
"REBOOT", "Reboots an outlet", command_reboot };
com[6]=(Command){
"QUIT", "Quits this session gracefully", command_quit };
"QUIT", "Quits this session gracefully", command_quit };
com[7]=(Command){
"RESET", "Preform a software reset on this device (and resets ALL relays!)", command_reset };
"RESET", "Preform a software reset on this device (and resets ALL relays!)", command_reset };
//com[8]=(Command){"SET", "Set system params (maybe?)", command_set};

pinMode(statusLED, OUTPUT);
Expand Down Expand Up @@ -400,26 +400,26 @@ void setup() {

// if the resetSwitch is LOW restore password and tcp parameters todefaul values
if ( digitalRead( defaultPin ) == LOW ) {

delay(1000);

Serial.println("Default button pressed");

unsigned long previousMillisSensor = 0;

lcdSerial.write(12); // Clear

int foovar = 0;
int resetMessage = 0;
// lcdSerial.write(128); // line 0 pos 0
// lcdSerial.write("Default? press"); // Turn backlight on
// lcdSerial.write(148); // line 1 pos 0
// lcdSerial.write("LCD button to"); // Turn backlight on

// lcdSerial.write(128); // line 0 pos 0
// lcdSerial.write("Default? press"); // Turn backlight on
// lcdSerial.write(148); // line 1 pos 0
// lcdSerial.write("LCD button to"); // Turn backlight on


while(foovar < 200){

unsigned long currentMillis = millis();

// read the current state of the button
Expand All @@ -430,17 +430,15 @@ void setup() {
previousMillisSensor = millis();

if (resetMessage == 0) {

lcdSerial.write(12); // Clear
lcdSerial.write(128); // line 0 pos 0
lcdSerial << rest1;
lcdSerial.write(148); // line 1 pos 0
lcdSerial << rest2;
resetMessage = 1;
}

else if (resetMessage == 1 ) {

lcdSerial.write(12); // Clear
lcdSerial.write(128); // line 0 pos 0
lcdSerial << rest3;
Expand All @@ -450,17 +448,16 @@ void setup() {
}

else if (resetMessage == 2 ) {

lcdSerial.write(12); // Clear
lcdSerial.write(128); // line 0 pos 0
lcdSerial << rest5;
lcdSerial.write(148); // line 1 pos 0
lcdSerial << rest6;
resetMessage = 0;
}

}

}
}

Expand Down Expand Up @@ -1428,3 +1425,4 @@ void validatePin(int pin, String args){




0 comments on commit b3407a2

Please sign in to comment.