Write to custom (or arduino based) device in live mode


#1

Hi,

I am putting this little code in

onRun(args, app, device, block) => {
device.writeRaw([0xc0, 0x01]);
}

in an Arduino based device (also tried in an Arduino based extension)
to use it in live mode. No data is sending, Is it working?

Thanks regards.


#2

Could you give more info and screenshots, perhaps?


#3

Simple new device with a block. Conection is successful, but nothing is sending by serialport.
Thanks, regards


#4

Update: It is working in desktop app but is not working in preview (from extension builder, using mLink)


#5

I’ve had problems with the mBlock online preview not running code properly. You can disable online mBlock support for your extension (it won’t show up on ide.mblock.cc) or you can publish it and see if it works after publishing.