Hello Guys,
So i create the project in mBlock mode but i would like to see the code behind it.How do i convert that to Arduino code?
Thanks,
Slav
mBlock to Arduino code?
Hello,
Right-click on the start block to open a contextual menu. You should see a “upload to arduino” option.
It will display the C Arduino code.
Hope it helps
BR,
Cyril.
Hello Cyril,
Thank you for your response. I tried to open Arduino extension but it doesn not display the correct code. If you take a look on the snapshot i too, i have the mBlock logic on the right but it is not reflected in Arduino environment on the left. Am i doing something wrong?
Slavisha
Actually, I think you need a starting block “Makeblock program” on the top of your program that does not involve computer input, like the keyboard, but things like IR sensor.
And instead of using “When X key pressed”, you may have to use “if” blocks in a “forever” loop.
If you want to pilot your robot with your computer keyboard you just have to use the firmware that comes with mBlock (Connect > Upload firmware), and if you want to see the code of this firmware, it’s available here : Connect > Firmware
BR,
Cyril