Skip to content

Commit

Permalink
Changed LED intensity.
Browse files Browse the repository at this point in the history
  • Loading branch information
fornellas committed Nov 26, 2012
1 parent 1d46367 commit 8210f4f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion notAnotherClockProject/Logger.cpp
Expand Up @@ -22,7 +22,7 @@ void Logger::update(){
btime_t date;
DS1307 time(UTC);

analogWrite(PIN_R, light->read(255-20)+20);
analogWrite(PIN_R, light->read(255-5)+5);
lastLoggerUpdate+=LOGGER_UPDATE_MS;
// prefix
date=time.getBTime();
Expand Down
2 changes: 1 addition & 1 deletion notAnotherClockProject/Logger.h
Expand Up @@ -5,7 +5,7 @@
#include <avr/pgmspace.h>


#define LOGGER_UPDATE_MS (30*1000)
#define LOGGER_UPDATE_MS (120*1000)

class Logger {
private:
Expand Down
2 changes: 1 addition & 1 deletion notAnotherClockProject/Net.cpp
Expand Up @@ -25,7 +25,7 @@ Net::Net(){

void Net::processAll(){
if(EthernetInterrupt::available()){
analogWrite(PIN_G, light->read(255-20)+20);
analogWrite(PIN_G, light->read(255-5)+5);
for(int8_t c=0;c<processorCount;c++){
if(processor[c]()){
removeProcessor(processor[c]);
Expand Down
8 changes: 4 additions & 4 deletions notAnotherClockProject/WUnder.cpp
Expand Up @@ -40,7 +40,7 @@ Serial.println("New connection.");
lastUpdate=millis();
// new connection
digitalWrite(PIN_G, LOW);
analogWrite(PIN_B, light->read(255-20)+20);
analogWrite(PIN_B, light->read(255-5)+5);
if(client.connect(strcpy_P(sendBuff, PSTR(WUNDER_HOST)), WUNDER_PORT)){
DS1307 time(UTC);
btime_t bt;
Expand Down Expand Up @@ -111,7 +111,7 @@ Serial.println(sendBuff);
Serial.println("Failed to open new connection.");
lastUpdate=millis();
}
analogWrite(PIN_G, light->read(255-20)+20);
analogWrite(PIN_G, light->read(255-5)+5);
digitalWrite(PIN_B, LOW);
}
}else{
Expand All @@ -125,7 +125,7 @@ uint8_t WUnder::loop(){
if(client.connected()){
//Serial.println("connected");
digitalWrite(PIN_G, LOW);
analogWrite(PIN_B, light->read(255-20)+20);
analogWrite(PIN_B, light->read(255-5)+5);
// Headers
if(skipHeaders){
//Serial.println("skipHeaders");
Expand Down Expand Up @@ -185,7 +185,7 @@ Serial.println(recvBuff);
}
}
}
analogWrite(PIN_G, light->read(255-20)+20);
analogWrite(PIN_G, light->read(255-5)+5);
digitalWrite(PIN_B, LOW);
}else{
//Serial.println("Connection lost before end of transaciton.");
Expand Down

0 comments on commit 8210f4f

Please sign in to comment.