Hi, im working on an extension for arduino uno and reading an sensor values
my problem is that i want to my C variable shows in mblock
for example how can i set my C values to a number block in my extension ?
Output C variable to mblock
yes. for example i want to make an extension that get X Y Z from the mpu6050 gyroscope sensor and show its numbers on the screen of mblock.
i created some blocks for sensor setup but in the next i want to my X Y and Z variables in my C code output to the mblock.
how can i do this?
There is probably already an extension to do this, but if there isn’t, then I will give you directions.
Check this box while you are on the block settings tab and under the block you want to make have a checkbox:
(Note: You may have to scroll down over the different blockk settings until you find the check box)Now the box should look like this:
Click save:
Now preview your extension by going to the extension preview page or clicking the “preview” button.This will create a checkbox next to your block.
If I wasn’t clear enough, or for more information on how to make your block actually return accurate information, please mention me as @Best_codes.
Thanks for your time,
Best_codes
@Best_codes thanks for your tips but my problem wasnt it.
i turn on the (( This block comes with a checkbox for reading value )) but the number was showed was not my C variable .
i have a varable in my Arduino/C code that i want to write it in this block that showing on the stage or screen
my problem is : How to write an Arduino/C variable to extension Block
thanks for your attention ( sorry for my bad English )
sina
@Best_codes Hello, i read this topic but still not undestand how to show some data. I have block that read data from sensor< so i want to show it in live mode or upload mode, how can i do this? Thanks
@ImFox1st you can’t show the value in Upload Mode. You can in Live Mode, but the implementation is a bit tricky.
I haven’t done any extension building in a while, so I can do this. If you find an extension that does what you are looking to do in the same programming language, tell me. I will see if I can send you the source for the extension so you can see how it’s done.
@Best_codes i found 1 solution, but it works only if your device based on official motherdoard like arduino Mega