I have successfully programmed my mbot using Mblock software when plugged into USB port, but I cannot get the mBlockly app to work anymore with this particular mbot. Do I need to do something to allow the mbot to accept code from the app (I had previously used the app to successfully code from my ipad air, but only one time). Any help is appreciated!
Mblockly app
Sorry, and I forgot to mention. It has bluetooth module. Blue light is on…the app claims to connect to the robot.
Try doing a flush (upgrade firmware followed by resetting the default program). When you are running from within one of the IDEs (mBlock, et al.) the IDE is sending messages to the firmata on the mCore board. If you have loaded a custom program on the mCore board via the USB cable, it might not respond the way you expect. Just a thought anyway.
Has anyone made the ultrasonic sensor work properly with mBlocky? I mean programming the mBot to detect obstacles when driving unmanned? I have tried programming the same sequense as with mBlock software but the move forward slot blinks like crazy and the mBot moves irratically. Hard to explain in words.
Thanks for your thoughts on mBlocky.
One of the things I noticed when I was doing a maze solver was the erratic nature of reads from the ultrasonic sensor when the mBot was moving. I think it was @danjger who suggested that I use a .02 second wait before trying to take a reading and if I got a zero, to wait a half second and re-read. You might try that sequence to see if it helps filter out some of the erratic results.
I wrote a simple little averaging block for the ultrasonic reader that smooths out the data.