Updated it so it detects movement 

Also turns out you can't use the 'digitalWrite' feature alongside the sensor, as it breaks the program