//Smart Glasses
//Made by: Vasco2020
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "OS_Functions.h"
void setup() {
Serial.begin(115200);
pinMode(PIN_TRIG, OUTPUT);
pinMode(PIN_ECHO, INPUT);
pinMode(PIN_BUZZER, OUTPUT);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
dht.begin();
// start the DS1307 RTC
rtc.begin();
GUI_CLEAR();
display.setTextSize(1);
if (GUI_CONFIRM(software_info,"Read Updates?")) {
GUI_INFO("wokwi.com/project","s/359300937908235 265");
}
GUI_FRAME();
display.display();
delay(500);
tone(PIN_BUZZER, 500, 250); // Plays 500Hz tone for 0.250 seconds
delay(250);
tone(PIN_BUZZER, 750, 250); // Plays 500Hz tone for 0.250 seconds
delay(250);
tone(PIN_BUZZER, 1000, 250); // Plays 500Hz tone for 0.250 seconds
delay(500);
GUI_LOCKSCREEN();
delay(125);
}
void loop() {
bool MENUOPEN = false;
if (CONTROLS_MOVEMENT() == "LEFT" && !MENUOPEN) {
MENUOPEN = true;
switch(GUI_LMENU("E.V.","Mini2","Color","Sound","Lock")) {
case 0: EnhancedVision(); break;
case 1: delay(100); break;
case 2: GUI_UPDATECOLOR(); break;
case 3: SoundToggle(); break;
case 4: GUI_LOCKSCREEN(); break;
}
}
if (CONTROLS_MOVEMENT() == "RIGHT" && !MENUOPEN) {
MENUOPEN = true;
switch(GUI_RMENU("E.V.","Mini2","Color","Sound","Lock")) {
case 0: EnhancedVision(); break;
case 1: delay(100); break;
case 2: GUI_UPDATECOLOR(); break;
case 3: SoundToggle(); break;
case 4: GUI_LOCKSCREEN(); break;
}
}
if (CONTROLS_MOVEMENT() == "UP" && cursor == 0) {GUI_STATUSMENU();}
if (CONTROLS_MOVEMENT() == "DOWN" && cursor <= 8) {
cursor++;
if (SOUND) {
tone(PIN_BUZZER, 75, 50); // Plays 1000Hz tone for 0.1 seconds
};
}
if (CONTROLS_MOVEMENT() == "UP" && cursor >= 1) {
cursor--;
if (SOUND) {
tone(PIN_BUZZER, 75, 50); // Plays 1001Hz tone for 0.1 seconds
};
}
if (CONTROLS_MOVEMENT() == "PRESS") {
switch(cursor) {
//Make Functions here
case 0: //1st Function Option
func_not_implemented();
break;
case 1: //2nd Function Option
func_not_implemented();
break;
case 2: //3rd Function Option
func_not_implemented();
break;
case 3: //4th Function Option
func_not_implemented();
break;
case 4: //5th Function Option
func_not_implemented();
break;
case 5: //6th Function Option
func_not_implemented();
break;
case 6: //7th Function Option
func_not_implemented();
break;
case 7: //8th Function Option
func_not_implemented();
break;
case 8: //9th Function Option
EnhancedVision();
break;
case 9: //10th Function Option
Settings();
break;
}
}
GUI_MENU("Home Screen", "1", "2", "3", "4", "5", "6", "7", "8", "Enhanced Vision", "- Settings -");
display.display();
delay(100);
}