Ultrasonic Sensor & PIR

if (pirVal = 1023);

Not only should the semicolon not be there, the "=" should have a twin.