Skip to content

Commit

Permalink
atarted implementing a single file for all the nodes message decode..…
Browse files Browse the repository at this point in the history
….continued the previous work to run the plug6way with the new protocol
  • Loading branch information
marco committed Sep 7, 2016
1 parent 38c35cb commit af00c69
Show file tree
Hide file tree
Showing 18 changed files with 715 additions and 638 deletions.
23 changes: 7 additions & 16 deletions arduino_code/Plug6way.pde
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Wire up as following (ENC = module side):

//uncomment this for dev mode

//#define DEVMODE 1
#define DEVMODE 1


//pin setup print
//#define DEVMODE2 1
#define DEVMODE2 1

//#define DEVMODE3 1
#define DEVMODE3 1

#define onos_center_port 81

Expand Down Expand Up @@ -563,23 +563,17 @@ void pinsSetup(){
//old 192.168.0.101/onos_cmd?cmd=pinsetup&node_sn=ProminiA0001&node_fw=4.85&node_ip=192.168.0.7__


// "pinsetup?sn=ProminiA0001&fw=4.85_#]"
// "[S_001sy3.05Plug6way0001_#]"

char ask_setup[37];
strcpy(ask_setup,"pinsetup?sn=");
strcat(ask_setup,serial_number);
strcat(ask_setup,"&fw=");
strcat(ask_setup,node_fw);
strcat(ask_setup,"_#]");
composeSyncMessage();


#if defined(DEVMODE)
Serial.print(F(" setup:"));

Serial.println(ask_setup);
Serial.println(syncMessage);
#endif

client.println(ask_setup);
client.println(syncMessage);
client.flush();
boolean en=1;
next = millis() + 1000;
Expand Down Expand Up @@ -789,9 +783,6 @@ void loop() {
sync_time=millis();
if (client.connect(IPAddress(192,168,101,1),onos_center_port)){


char ask_sync[33]="n_sync?sn=";

composeSyncMessage();

client.print(syncMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ boolean radio_enabled=1;

unsigned long sync_time=0;

char serial_number[13]="WLightSS0003";
char serial_number[13]="WLightSS0004";

char node_fw[]="5.13";

Expand Down Expand Up @@ -468,7 +468,7 @@ void setup() {
while (!Serial); // wait until serial console is open, remove if not tethered to computer
Serial.begin(SERIAL_BAUD);

Serial.println("Feather RFM69HCW Receiver");
Serial.println("Feather RFM69W Receiver");

// Hard Reset the RFM module
pinMode(RFM69_RST, OUTPUT);
Expand Down

0 comments on commit af00c69

Please sign in to comment.