I am working on an iPad Air 2 os version 15.8, mBot-K01-02. I have tried the line follower code, see example attached. The line follower ist connected to port 2, I have testing the slots with lights only and it works I can identify the values (0 on track, 3 off tract … ) but it seems not to work very well, for instance it stays on track for a few second then lost the track …
mBot line follower with mblock-blockly
I have also tried to put some wait conditions but still same issue, the mBot does not stay or follow the track.
@royam0820 I’ll try to get you an example code later this week. I’m quite busy, sorry. Maybe @CommandeR has something.
Thanks! it is really frustrating, I have tried different code but none worked perfectly, way back then the test was pretty straight forward based on the sensor line follower on port 2, using embedded if-then-else
-
if value = 0 move forward
-
if value = 1 turn left, wait 0.02 sec
-
if value = 2 turn right, wait 0.02 sec
-
if value = 3 move backward
I have tried motors, testing black line, and white line with no success …
Of course I have tested the line follower values and they are correctly displayed.
Many thanks for your help and support.
@royam0820 Alright, thanks for the info. I’ll try to see what I can do later. Good luck!
for sure ! Thanks I now need to test the button pressed event and the remote control. I had codes for all that in previous mBlock version on laptop, trying to replicate that on the ,mBlock ipad version.
Using the mBlock application on my latptop 5.4.3 on a macOS. I have coded the following code
Once the code uploaded successfully to the mBot arduino board, the code works fine, ONLY if the mBot remains connected to the laptop USB port. and is disconnected from the application. If I remove the USB cable and try to test the mBot on its own, I can’t, the mBot is completely shut off. Can you please help me! code works really fine if I leave the mBot connected to its USB cable. I have tried firmware re-initialization, and re-connecting, re-uploading the code but yet the same issue occurs.
Weird! can you help me.
Hello
Ok not to worry! I have just redone the settings and connections and now the code is fine by itself.
Thanks for your support
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.