Hello,
I have an mbot and I would like to create blocks in mblock5.
I created an account on the online extension builder.
I would like to begin with a simple block to reset the gyroscope of the Me 3-axis Accelerometer and Gyro Sensor in both live and upload modes.
I managed to create an extension for mcore with a ‘Command’ block called “reset gyroscope” that works on upload mode but do nothing in live mode (no error and no effect).
In the extension builder, in Blocks settings, under Upload transcode, I entered :
- in include section : <MeMCode.h>
- in declare section : MeGyro gyro;
- in code section : gyro.begin(); (this is the code in C to reset the gyroscope)
I understand that I must input code in javascript for live mode but I don’t know where to put the code, and what code I should enter. Actually, I don’t really understand what javascript will know about MeGyro or not. I’m used to programming in C but not in javascript.
Would anybody help me please ?
Thank you in advance.
PS : Here is the extension I made : mbot_addons_hh.mext.zip (315.1 KB) (Just remove the .zip extension, I had to rename the file to attach it to my post)