This is the Particle Web IDE code that runs the Particle Argon automated lights in my room.
The "alexfirstremote.ino" file is the simplified file that interacts with the particle mobile app, Alexa (through IFTTT), and a relay-connected IR remote that controls the outlets connected to the lights.
The "alexfinalcode4.ino" and "finaltaylor4.ino" codes can be used together with two separate Particle Argons and HC-SR04 ultrasonic sensors to automatically control the lights based upon the position of a user in the room