MegaPi programming help


#1

I have Makeblock mBot Ultimate kit with MegaPi board. I choose “MegaPi Pro” device in mBlock5 editor. I added “2.4G Wireless Controller”, “mBlock3 blocks”, and “MegaPi Tools”. I plugged the 2.4G adapter into my computer’s USB port. In the editor, I added

encoder motor [port1] rotates at power [2.4G wireless controller’s joystick [LY]%

but I don’t know which event to add to top of the above block. Why was

when [key] key released

moved to “mBlock3 blocks” extension? How can I fix the 2.4G wireless controller problem?


#2

Could you please be more specific about the problem you are having?


#3


#4

You are not really telling us what you are trying to do (& not very appreciative of any help given) - but re. this topic see my earlier post here:

You can find lots of guidance if you work your way through Forum posts using the search box.


#5

I opened Arduino IDE and loaded “Me_Megapi_encoder_pwm.ino” file. Pressing keys [1] to [6] run the motors at different speeds and directions. Pressing key [0] stops the motors. I want to press a key to run the motors and release a key to stop the motors. the code could look like this:

if [up arrow] key pressed
run motors
if [up arrow] key released
stop motors


#6

What controller are you using?