diff --git a/LaserClock/LaserClock.ino b/LaserClock/LaserClock.ino index 098e780..be9e70b 100644 --- a/LaserClock/LaserClock.ino +++ b/LaserClock/LaserClock.ino @@ -15,7 +15,9 @@ const unsigned char M[] = {2,3,4,5,6,7}; //how long takes a minute in ms? //const unsigned int mindelay = 60000; -const unsigned int mindelay = 59500; +const unsigned int mindelay = 59000; +//intensity of laser, when "off": 0 -> 0% on; 255 -> 100% on +const unsigned int offtime = 160; //current time unsigned char min = 0; @@ -31,11 +33,11 @@ unsigned long lastmin; void write(unsigned char m = 255, unsigned char h = 255) { //write minutes for(unsigned char i = 0; i < 6; i++) { - analogWrite(M[i], (m & (1 << i)) ? 255 : 1); + analogWrite(M[i], (m & (1 << i)) ? 255 : offtime); } //write hour for(unsigned char i = 0; i < 4; i++) { - analogWrite(H[i], (h & (1 << i)) ? 255 : 4); + analogWrite(H[i], (h & (1 << i)) ? 255 : offtime); } #ifndef nolog //send data to Serial