Codes from Adafruit's Awesome Libraries (most modified for my personal use)