When the sensor is powered on it outputs a number between 0 and 1023, the phone light or flame makes the sensor output a lower number. Using an if statement, I coded the flame sensor to trigger the fans power source when it senses this light. The flame sensor works best when the top of the bulb is facing the light or flame. Because of this positioning the flame sensor on our robot will be important for ensuring it is successful.