Issues with 'when on-board button [pressed]' Block


#1

Hello

I am on an iPad2, iOs 15.8, mBot-K01-02 and trying to code the event on-board button pressed, see code below. When running the code by pressing the button pressed, the code is being run, instead it is running the firmware code behind the button-pressed button. Is there a way to remove the original firmware code and have mine instead.

Thanks in advance for your help and support.


#2

to resume the code above is not run for this event, only the firmware code is running for this event.


#3

@royam0820 The code above needs fixed, really. Instead of 'when on-board button pressed':
image
You should use ‘When mBot Starts Up’. Then, when the button is pressed, the note will sound in 0.5 second intervals for as long as you hold down the button.


#4

Hi, this option is greyed out. I cannot use this option. How to activate it?


#5

@royam0820 Try switching to upload mode, not live mode?


#6

ok I have done that, now how to launch the code ? When I clicked on the button on the right in the iPad interface to upload, it says that the upload mode is not available for this device mBlock app. Please use your computer to upload programs … any help.


#7

I am on a macOS computer version 10.4.6


#8

@royam0820 You should be able to download mLink 2 and use the web version on your mac PC or download mBlock for macOS:

https://www.mblock.cc/en/download/

Good luck!


#9

Hello
I have installed the software on my mac, and connecting the mBot via a USB port, mBot is now
connected to the application. I have re-written the button-pressed code as suggested and successfully uploaded it to the mBot. Then, I disconnected the mBot so that it is on its own, with no laptop connection. yet the code loaded on the mBot for the button-pressed is not executed when I press the button. Question, can you tell me how to re-initialize the mBot firmware, since nothing is working now ! thanks for your help !


#10

Hi,
Ok I have found how to upgrade the firmware, back to coding. !


#11

:slight_smile: @royam0820 Let me know how this develops!


#12

Hi,

I now am able to re-initialize the firmware, and the button-pressed code once developed on the app mBlock version 5.4.3, I am able to load it onto the mBlock arduino board and test it without any issues.
Happy!


#13

@royam0820 Let me know if you need anything else!


#14

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.