Communication "Write Line" block not working?


#1

When I put a “Write Line” block in an Arduino Program, I get a sketch compile error:
MeSerial does not name a type.

The error is because there is a line in the sketch for:
MeSerial se;

but the library MeSerial.h is not included in the top part of the sketch.

When I check the serial.s2e file, it is clear that the MeSerial.h library is supposed to be included, but for some odd reason, it is not making it to the sketch.
This makes the whole sketch not compile.

Any idea why MeSerial.h is not being put in the top of the Arduino sketch, even though the serial.s2e file clearly has a line for :",“inc”:"#include “MeSerial.h”\n" ?

Very odd,
Thanks
Andrew


#2

Hi drew345,

Here we have tested it and it works OK.
Please try following program:

If there is still issue, please download the latest makeblock library have a try:
https://github.com/Makeblock-official/Makeblock-Libraries/archive/master.zip


#3

Thank you very much for the reply and help.
Now I see, you are using the mBot board and the mBot header, and that adds " #include MeMCore.h " to the sketch which includes MeSerial.h also.

When I try to use the Arduino board and Arduino header, it is odd that MeSerial.h does not get included, even though the serial.s2e file calls out for it to be included (see picture).

Anyway, you make the base code available so that is a great help. I will keep searching through the base code. But if you can explain how to get the Write Line and Read line working with the Arduino board and Arduino program header, I appreciate it.

Thanks again! Andrew


#4

Hi Drew345,

I am afraid that I am unable to help further for the explanation which belong to Arduino program.
I think you know very well about program and I believe that you can figure it out yourself, hope you can understand.

Great Day!