Simple arduino clock

Well, I like clocks, especially custom made or diy. Here is the code and some photos. #include “Wire.h” #include “LiquidCrystal_I2C.h” #include “TimeLib.h” #include “DS1307RTC.h” LiquidCrystal_I2C lcd(0x27,20,4); String time; int inPinA = 2; int inPinB = 3; int valPinB = 0; boolean previousStatusPinA = false; boolean previousStatusPinB = false; byte x10[8] = {0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07}; byte x11[8] =Continue reading “Simple arduino clock”

Digispark lock button

Ok here is the code for locker button. The main feature of this device is to lock the screen of the computer when you leave the office. #include “DigiKeyboard.h” const int buttonPin=0; int buttonState=0; void setup() { DigiKeyboard.update(); DigiKeyboard.sendKeyStroke(0); pinMode(buttonPin, INPUT); } void loop() { buttonState=digitalRead(buttonPin); if (buttonState == HIGH) { DigiKeyboard.sendKeyStroke(KEY_L, MOD_GUI_LEFT); } }