Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Minor updates.

  • Loading branch information...
commit 2a9fd606281eca0300948662ac7ac300083b5f3c 1 parent cdd8ba4
Dean Fogarty authored

Showing 2 changed files with 6 additions and 7 deletions. Show diff stats Hide diff stats

  1. +0 4 README
  2. +6 3 relay.ino
4 README
@@ -63,10 +63,6 @@ serial libraries on read()s; adding some small delays in the serial read()
63 63 seemed to tidy these up. Should look at the interrupts, but like I said,
64 64 I put this together in a hurry.
65 65
66   -The WiFly wakes up independently of the Arduino. You might want to sacrifice
67   -a pin or two to check RTS on the WiFly to be sure it's there before you tell
68   -it to upload.
69   -
70 66 The Bluetooth bee is put to sleep by manipulating pin 5 on the Seeeduino
71 67 Stalker. There is a track you have to cut on the board in order to be able
72 68 to do this; read the Stalker specs for details.
9 relay.ino
@@ -18,6 +18,9 @@
18 18
19 19 #define MAX_RETRIES 3
20 20
  21 +#define SLEEP_SHORT 10
  22 +#define SLEEP_LONG 60
  23 +
21 24 unsigned long last_total_kwh;
22 25 unsigned long last_spot_ac;
23 26 unsigned long last_now;
@@ -112,18 +115,18 @@ void loop(void) {
112 115 if (total_kwh == last_total_kwh &&
113 116 spot_ac == last_spot_ac &&
114 117 now == last_now) {
115   - sleep_minutes = 60;
  118 + sleep_minutes = SLEEP_LONG;
116 119 } else {
117 120 last_total_kwh = total_kwh;
118 121 last_spot_ac = spot_ac;
119 122 last_now = now;
120   - sleep_minutes = 10; /* pvoutput default upload is 10 minutes */
  123 + sleep_minutes = SLEEP_SHORT; /* pvoutput default upload is 10 minutes */
121 124
122 125 wifly_init();
123 126 wifly_upload_stats(total_kwh, spot_ac, now, tmp102_get());
124 127 }
125 128 } else {
126   - sleep_minutes = 10;
  129 + sleep_minutes = SLEEP_SHORT;
127 130 }
128 131
129 132 wifly_sleep(sleep_minutes); /* put wifly to sleep */

0 comments on commit 2a9fd60

Please sign in to comment.
Something went wrong with that request. Please try again.