Modifying extensions


#1

I am trying to modify the forward, backward, right, left (F, B, R, L) mbot commands to work wirelessly (2.4G). The firmware file does not list these commands (the “move” command in MeMbotDCMotor.cpp), but I did find them programmed in the mbot extension, where it sets the M1 and M2 motor speeds for each type of movement (F, B, R, L). The extension appears to be a javascript file, named mbot.js. If I modify the command in that file, do I need to compile the file (like making the .hex file when modifying the firmware file mbot_firmware.ino) or will Makeblock load it correctly without my having to compile it? I am trying to modify the “move” command for the mbot so that the motors run for a specified amount of time rather than at a specified speed. That way, beginning students can make “steps” (always 15 cm for example) and turns (always 90 degrees for example) without having to start and then stop the motors at a precise time. The time delay needs to be precise, but the timing of the commands sent wireless is somewhat variable, so I want the delay between start and stop to be in the code on the mbot, where it will be quite precise. Thanks for your help! efrank03


#2