CyberPI


#1

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

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.
code

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

Note for Makeblock : Add a CyberPi category ??


#2

Hi Crackel,

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

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

Greetings

phg


#3

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.


#4

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](https://www.yuque.com/books/share/14a64757-795b-4b53-8ea0-07ad1214c120?# 《mBlock-Python Editor Online Help》) guiding use mBlock Python editor and program CyberPi in Python to you for reference.