Program flame sensor with scratch


#1

Hello,
we have the Makeblock Robot Starter Kit with Bluetooth and Orion board and use MBlock 3.4.11

We also have the RGB-Led module, the light sensor and the flame sensor
bought to it. Driving tests with the rangefinder, different LED and colors that in bright or dark rooms are wonderful !!!

Now we have added the flame sensor and tried again: Flame on should generate red LED, no flame blue LED. But not fun.
I think that I have grown correctly: black code on port 6. Small red LED lights up and if I ignite the lighter in front of it lights a small blue LED!
(There should be another sound module for siren sound, but I can not find one - can you help me with that?)
There’s the problem - because I’m a beginner I do not know exactly which blocks belong together, which operators have to be set and how and if and how I should create new blocks and variables. And the literature specifically for this is quite meager.
Later I would like to convert the tank so that the ultrasonic sensor rotates by servo right / left and measures the distance, stores and drives accordingly.
Is that possible with Scratch?

Sorry, I can only speak German - I do everything with a translation program …

Best regards
koma1965

Flamme-und-LED


#2

Hi koma1965,

Sorry that we may not understand all of your idea.
While first, do you look for a sound sensor? If yes, please see this link.

Besides, you mean you are not sure how to program with the mBlock software for Starter.
Actually, there is no mBlock program material special for Starter, but here is an introduction for the mBlock to you for reference.
Also here is an mBlock program material for mBot, though the mainboard on mBot is different with the Orion board, but the program principle is same , you still can refer to its program.
And here is a picture to show where to set the variable and blocks

For further program, please challenge yourself to program the robot and achieve your project.


#3

Hello,
I do not mean the sensor. I want to make sounds (sound module or speakers).
Example: I use the flame sensor, ignite a lighter:
Blue light (RGB LED) lights up on the robot and a siren sounds.
Is my little program ok (last question)? It does not work!

Thank You !


#4

I don’t have the flame sensor, but I think that it does not give binary results (0 or 1). So your check “flame sensor = 1” will probably not work. First check the values which are returned by the sensor as shown in this example:


#5

Hi koma1965,

Sorry that we don’t have such module to make sounds.
As for the value get from the flame sensor with mBlock program, you can see that the Detected Value is in Analog instead of the digital value according to the generated arduino code.