Assignment 11/16

So here is the code and the video.. it doesnt work perfectly with the LED but couldnt figure out why.