I often use the following instruction for ease with a sensor:

However, I have a little trouble understanding how it works. When using it with a button, it is not reset or it is just too fast.

I click once on B and I get my end screen
Thank you for helping me

Note for Makeblock : Add a CyberPi category ??


Hi Crackel,

I know this effect. You must insert a Wait-Block!

Another question: Do you have experience with python at mblock. I have a lot of questions for that.




Hi phg1,

I was afraid of this answer but 0.1 seconds is not too much waiting. Ideally, I would like Makeblock to try to correct the instruction so as not to put 2 instructions.

Thank phg1

Note: Not too much Python experience but I love the language.


Hi Michel,

Actually, you understand it correct and phg1 said it, normally, operation of pressing the button usually takes sometime, while the program runs very fast so that it will go to the second program block "wait until button B proessed " fast and execute the program after it. In this case, this is program logic and we can only midify this program by adding a wait second program block. For example, wait for 3 or 5 seconds.

Hi phg,
[Here is instruction link]( 《mBlock-Python Editor Online Help》) guiding use mBlock Python editor and program CyberPi in Python to you for reference.