//Smart Glasses
//Made by: Vasco2020
#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_LED, OUTPUT);
pinMode(PIN_BUZZER, OUTPUT);
pinMode(SEL_PIN, INPUT_PULLUP);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
dht.begin();
// start the DS1307 RTC
rtc.begin();
display.setTextSize(1);
delay(2500);
GUI_FRAME(27, "BIOS");
display.display();
delay(500);
GUI_PROGRESSBAR(1, "Booting to vOS");
display.display();
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);
lockScreen();
menu(27, "Menu", "1", "2", "3", "4", "5", "6", "7", "8", "Enhanced Vision", "- Settings -");
}
void loop() {
if (analogRead(VERT_PIN) <= 312 && cursor <= 9) {
cursor++;
if (SOUND) {
tone(PIN_BUZZER, 75, 50); // Plays 1001Hz tone for 0.1 seconds
};
delay(50);
}
if (analogRead(VERT_PIN) >= 712 && cursor >= 1) {
cursor--;
if (SOUND) {
tone(PIN_BUZZER, 75, 50); // Plays 1001Hz tone for 0.1 seconds
};
delay(50);
}
if (digitalRead(SEL_PIN) == LOW) {
//Make Functions here
if (cursor == 0) { //First Function Option
func_not_implemented();
}
if (cursor == 1) { //Seccond Function Option
func_not_implemented();
}
if (cursor == 2) { //Third Function Option
func_not_implemented();
}
if (cursor == 3) { //Fourth Function Option
func_not_implemented();
}
if (cursor == 4) { //Fourth Function Option
func_not_implemented();
}
if (cursor == 5) { //Fourth Function Option
func_not_implemented();
}
if (cursor == 6) { //Fourth Function Option
func_not_implemented();
}
if (cursor == 7) { //Fourth Function Option
func_not_implemented();
}
if (cursor == 8) { //Fourth Function Option
EnhancedVision();
}
if (cursor == 9) { //Fourth Function Option
Settings();
}
delay(50);
}
menu(27, "Menu", "1", "2", "3", "4", "5", "6", "7", "8", "Enhanced Vision", "- Settings -");
}