This is an old version of SerialOTG with suffix serial in the method names.
From the documentation:
Using single byte
ReadByte()
Read a byte as a number 0..255 from serial line, if empty return -1
WriteByte(num)
Write a number 0..255 as a byte to serial line
Using multiple bytes in lists
ReadBytes()
Read unsigned bytes 0..255 from serial line to a list.
WriteBytes(List)
Write unsigned bytes 0..255 in a list, to serial line.
In the process of learning how the extension works,
there is something I don't understand
Single symbol "Ё" is not sent (blocks as in the picture)
Only the next time a character is sent (double-clicking on the button),
two characters "ЁЁ" are sent at once.
Maybe I don't understand How should I use the block set?
We do not know how you send and how you receive data. Show the blocks with which you have a problem and show the arduino code with which you receive data.
If in this program we write a symbol,
as i showed in this picture
The symbol will not be sent with one click of the button.
If there are two clicks on the button,
the character will be sent to the terminal,
but only in the amount of 2 pieces.
I can't see any problem with the program. Tested with loop-back connection on the USB-Serial adapter and Byte, Hex sting and Byte List protocol. What I send will come back each time I press the Send button. Maybe it's on the receiving end?
"SerialOTG.aia" is a good tutorial for me,
With the transmission of a single character, I did not experiment anymore.
Because, I began to use the WriteBytes block for this purpose. WriteBytes transmits the data I need, all at once in a packet.
Using the "SerialOTG.aix" extension,I am using an OTG cable.
now I can change JDY-41 settings, everything is working.
Many thanks to everyone for the tips, everything worked out.
Good luck everyone! :))
I have used this extension together with an esp32 for a long time, now I intend to replace it with an Arduino Giga but I am unable to send/receive data.
Is there a solution to be able to use my new Arduino? ?
Please check the VID PID for the Giga. Also check the driver needed. You will probably have to force the driver to CdcAcm. Use USBDriver(1) to force CdcAcm (see the documentation)
Hi kl099, thanks for your help!
Could you be more specific in your answer?
I don't know where to find the documentation and which parameters to change or even where they are located.
No, I have updated the Physicaloid library to make it work. Also done some refactoring to make it work together with the Physicaloid library included in MIT Appinventor.
I don't have access to this board, so I can't answer in detail.
Are you using the USB-C port for communication?
Do you have to do anything in the Arduino code to enable serial communication?
Are baudrate etc. the same for both boards?
What is the status after "open" in AI code (open,not open) or return value from the "open"?
Can you use the serial terminal app for communication?
Command--> SerialOTG open
results:
connected:true
isopen:true
Command--> 1)write data
results:
connected:true
isopen:true
Command--> 2)write data
results:
connected: true
èopen: true
I'm seeing an error
error 3209: error writing data to serial
I want to point out that the program on the Arduino is written correctly (I used a simple program for serial communication for Android "Serial USB Terminal").
P.S.
I use an sbc odroid and android version 9