Hi, i’ve been trying to make my mbot move when it detect fire but i actually didn’t accomplish, so can any of you give me a hand pls?
How can i use the flame sensor?
Pablo
#3
Yes, but my code isn’t complete, because i want to make the bot follow the flame when it detect fire and i don’t know how and if that is posible.
My code is in spanish, hope thats not a problem
Spanish is not a problem.
According to the programming information (link) the flame sensor will return a 1 if it detects a flame and a zero if it does not, so your if-statement needs to be modified to use those values. Bear in mind that you will likely need to use the ultrasonic sensor for determining distance if that is your intent. The flame sensor only indicates whether or not it has detected light in the correct frequency.