Hello.
I tried to run an example of reading a barcode using the gm65 module in Arduino Mega, but the serial monitor output is not working.
The following code is an example.
#include <SoftwareSerial.h>
SoftwareSerial GM65(2, 3); // RX, TX
void setup() {
Serial.begin(9600);
GM65.begin(9600);
}
void loop() {
if(GM65.available()){
String barcode = GM65.readStringUntil('\n');
Serial.println(barcode);
}
}
I checked the board rate, circuit, UART interface settings, serial communication interface output settings
, but the serial monitor is still not working.
(The USB output has been tested to confirm that it is working. Read the barcode and enter the information in Notepad.)
How can i solve this problem? If anyone has experienced the same problem as me, please reply. Thank you always for your help.
If you tell me the information you need to solve the problem, I will provide it.
I am sorry for my poor English...