How to get flame sensor to work


#1

We are trying to connect the flame sensor to the mBot using this code:

Scratch (v3.4.10) only allows us to read the flame sensor from port 3 or port 4 ( the firmware on the mBot is up to date).

The following happens whether plugged into port 3 or port 4.

We can only upload code to the mBot when flame senor isn’t plugged into the mBot.

The mBot is working perfectly fine otherwise ( LED screen and wheels).

In order to upload the code we have to unplug the flame sensor.

When the code is running, the panda says 0 the whole time even with a flame in front of it.

Can anyone help us to make the flame sensor work?

P.S. We have tried a different mBot and a different RJ25 cable, but still have the same problem.


#2

Hi Rowatc,

As you can see the Me flame sensor has black color ID port, so it only works when connected to the RJ25 Port which has black color ID. That’s why you can only plug it into Port 3 or Port 4.

Normally, you can upload program to mBot via mBlock even with the Me flame sensor connected to Port 3/Port 4. But when you upload the program, please temporarily remove the Bluetooth module from mcore. Kindly try upload program again have a check.

As for the issue that the panda keeps saying 0 the whole time, I suspect you haven’t upgrade firmware for the mBot before you testing the mBlock online program.
Please kindly upgrade firmware for mBot refer to this instruction first.1. How to Upgrade Firmware for mBot.docx.zip (690.6 KB)
Then please test above program to read the value detected by the Me flame sensor.


#3