I have a question, I have an arduino which, when connected, sends the text "Enter name". After connecting the arduino with an OTG cable in the "Serial USB monitor" application (from the play store), I normally see "enter name". In app inventor, I set it to connect in the application after pressing the "connect" button. But when plugging in the cable, I get the message "allow the application to null?" (or something like that - it's about usb) I confirm and I see illegible two stamps that were somehow sent by phone or more by an application and the name has been set to these two strange stamps (diamond with an icon)
But every time it connects when it asks whether to allow connection to "null" (serial) it sends some data and answers itself by typing nickname. The result is 5 diamonds with question marks inside. Someone can solve it for me?
It would seem your final problem is with the SerialOTG extension, which is necessary for USB Serial on App Inventor as AI2 does not include the d2xx.jar needed.
After connecting the arduino, the program replies itself and the nickname is as follows:
"�����"
but in computer serial monitor nickname is empty - no letters (when i chat with second arduino from phone)
Arduino Mega 2560 model (made in Italy) as in the picture.
Chip - I'm not sure how to 100% check.
And I do so that I create the * apk file and put it on the phone and install it.
That's CR LF (Carriage Return + Line Feed) as used by Windows OS to define 'go to new line'
240 = the symbol ð (or other, there isn't a formal ASCII code for 240)
Arduino Mega 2560 is only compatible with USB 2 ports and cable.
You may be able to verify the USB chip (16U2?) - it's probably going to be close to the USB port. I have read that the chip is the same as the UNO's, which is directly supported by the latest version of the SerialOTG extension:
So to recap, you are seeing the ASCII code on the Arduino Terminal, but not on your phone? I see your Smart Phone is Android 9 - but what make and model? Samsung and Huawei can be a pain because they customise the OS (Android is Open Source).
If the devices both send and receive, there can be issues - when using Serial with Bluetooth, two Serial channels can be used to simplify. From your code, you are entering the Username via the Arduino Terminal? Where did the Sketch come from? The radio functions imply wireless comms......
So i have chip MEGA 16U2 1546 PH A3M2MA.
I have a Xiaomi redmi note 9 pro phone. What do you mean with "USB 2"? USB 2.0? I have USB C and OTG adapter. So it's like this:
I connect one arduino to the computer, it shows "enter nickname", I enter nickname and arduino replies "Hello nick1" and with each message sent I have the nickname "nick1". When I connect the cable to the arduino, every time I click "connect" in the application, she asks me if I can "allow this device to null" (something like that - but it's about usb), it gives "yes". And instead of the information "enter name" I have "hello �����" nickname is already entered, it seems to me that during initialization these characters are sent but I don't know. The sketch of arduino comes from .. arduino forum (it works without any problems on a computer or android programs, eg "Serial USB Monitor" (from the play store)
I think that the USB standard is at least 2.0 required. But it works because it shows well in other applications, I wanted to do my own, but it adds "input" some data to the USB.
We can't feed on vague - we need to know the exact messages as these are a potential clue s that can lead to identifying the cause of the issue.
Do you have a schematic of your whole Hardware setup? Your description is difficult to understand - it has the tone of we know what you are doing - but we don't! We don't know the details, I'm having to ask too many questions
What is your goal - what do you hope to achieve that the "Serial USB Monitor" App does not already deliver?
What is your goal - what do you hope to achieve that the "Serial USB Monitor" App does not already deliver?
I am on the programming forum and I would like to make my application and you recommend that I use the program from the play store. xD
It is simple by me on logic, but I'm not a programmer to handle it. I know that when trying to connect, the phone sends some characters to the terminal and I don't want it. That's all I mean.
We need to see your hardware setup and your App Inventor Project file (.aia). Not convinced about the Sketch - post the link to it.
[quote="OMGlinuxIS, post:11, topic:57116"]
you recommend that I use the program from the play store
[/quote] I didn't make a recommendation but I did ask a question.
But that's not a problem, just app sending some data on connection. I know that you can modify the program on arduino, but I prefer the line to be "clean" from the beginning because it can be very useful.
I have 2x Arduino 2xNRF24l01 (one arduino is arduino mega but it does not matter, the connection of the pins is only different) the programs on both arduino are THE SAME. According to your tutorial, I can send data via arduino with nrf and then bluetooth or vice versa using additional TX and RX ports on the arduino MEGA.
It will definitely be the second function, but first I would like to deal with the cable connection. I would like to remove these characters when connecting,
Here's something, but I don't know in the end .. my English is too weak and the translator doesn't always translate well. Re: Data Input demo sketch - #12 by Robin2 - Programming Questions - Arduino Forum
The ATmega16U2 has a bug in firmware. When you open the COM port without resetting the MCU Atmega328P the ATmega16U2 send a pulse to the Atmega328P RX line (and also to the USB lines but it’s ignored, I think) that is interpreted as data depending on baud rate. If you use 9600 is ignored but starting from about 38400 it appears as character.
I doesn’t appear if you use another chip as serial/USB converter, for example clones that use CH340.