I tested the 2 code separately and it worked, so I pasted the code to underneath the adafruit library.