All
Member
Hello everyone!
I'm trying to write a program for B4A (android 7..10) which should be a text terminal and a basic editor window for an Arduino nano program.
The Arduino nano has Tiny Basic installed which communicates with an external terminal or programming via plain text. It uses a serial virtual com port on the CH340 chip (Chinese driver).
This Arduino BASIC can receive a program or execute commands like a regular remote text server. Those. it accepts and transmits lines of text with an end (newline).
When I use a Windows computer and a usb connection, a virtual com port is created, the CH340 driver is loaded and everything works fine.
When I connect my ardruine with a basic interpreter to OTG Android, the android not sees the CH340 chip point blank.
I need to write a beautiful basic code editor for the interpreter running on the Arduino board, and also get beautiful text and digital results of the basic work from Arduino.
I can do everything beautifully and correctly, except for the implementation of a simple text communication channel with the 340 chip from Android
I've been studying forms for a week now and trying many examples!
I can't figure out how I can do such a simple thing, which is in all textbooks for communication between a 340 chip and another device (terminal).
Class Serial port
Method: Initialize port (baud rate=9600, CH340 driver)
Method: Pass string(string)
Function : Get string from buffer()
I believe there is a special B4A library that can see the CH340 chip as a virtual serial port for text strings. But I can't find it here.
Excuse me! I understand that this is very, very simple, and I'm stupid. This is the basics, just open the port and send or receive lines of text! But I'm completely confused! I'm ashamed and I'm asking for help.
Help me please!
This is probably too simple, because I wrote this 4-line code for a large computer in C#, and got completely confused when I tried to find drivers and libraries for Android basic.
Many thanks in advance to everyone!
I'm trying to write a program for B4A (android 7..10) which should be a text terminal and a basic editor window for an Arduino nano program.
The Arduino nano has Tiny Basic installed which communicates with an external terminal or programming via plain text. It uses a serial virtual com port on the CH340 chip (Chinese driver).
This Arduino BASIC can receive a program or execute commands like a regular remote text server. Those. it accepts and transmits lines of text with an end (newline).
When I use a Windows computer and a usb connection, a virtual com port is created, the CH340 driver is loaded and everything works fine.
When I connect my ardruine with a basic interpreter to OTG Android, the android not sees the CH340 chip point blank.
I need to write a beautiful basic code editor for the interpreter running on the Arduino board, and also get beautiful text and digital results of the basic work from Arduino.
I can do everything beautifully and correctly, except for the implementation of a simple text communication channel with the 340 chip from Android
I've been studying forms for a week now and trying many examples!
I can't figure out how I can do such a simple thing, which is in all textbooks for communication between a 340 chip and another device (terminal).
Class Serial port
Method: Initialize port (baud rate=9600, CH340 driver)
Method: Pass string(string)
Function : Get string from buffer()
I believe there is a special B4A library that can see the CH340 chip as a virtual serial port for text strings. But I can't find it here.
Excuse me! I understand that this is very, very simple, and I'm stupid. This is the basics, just open the port and send or receive lines of text! But I'm completely confused! I'm ashamed and I'm asking for help.
Help me please!
This is probably too simple, because I wrote this 4-line code for a large computer in C#, and got completely confused when I tried to find drivers and libraries for Android basic.
Many thanks in advance to everyone!
Last edited: