B
B
Boris Lapin2015-06-01 18:33:12
Arduino
Boris Lapin, 2015-06-01 18:33:12

No data is being received from the serial port on the Arduino Mega2560 side. What to do?

The situation is this. I have an Arduino, it has been sitting on a shelf for about two months, and it seems that it did not receive any damage. I recently needed it again. But as it turned out, reading from the serial port does not work. The program is sent to the arduino, and it itself regularly sends data to the computer via the serial port, the computer regularly receives them. But the connection does not work in the opposite direction. When sending something from the computer to the board, RX lights up on the board properly. But in the program itself, for some reason, the data is not available.
For example this program:

void setup() {
    Serial.begin(9600);
}
void loop() {
    Serial.write(Serial.read());
}

When sending data to the arduino through the serial port (both through the port monitor in the IDE, and using your own simple programs in Python or C ++), the Arduino does not return anything.
If you make, for example, such a program:
void setup() {
    Serial.begin(9600);
}
void loop() {
    Serial.println("I am sending");
}

Then the arduina will regularly send "I am sending" to the computer.
Previously (2 months ago), data was regularly sent and received.
Guess 1:
Maybe it's because I previously used the driver that creates a virtual Serial port from Arduino IDE version 1.0.5, and now I switched to Arduino IDE 1.6.4 (and installed directly to version 1.0.5) I would not find that the Mega2560 does not support something in the new IDE.
Note:
After installing IDE 1.6.4, I could not install a version below, or reinstall 1.6.4, because an NSIS_Error was generated, I decided to write, although the error is basically not related to the topic, here you need to clean the garbage ...
Guess 2:
Windows 7, which I am currently using, has not been reinstalled for quite a long time, and about a month ago there was an incident, as a result of which I completely reconfigured the system (registry, startup, services). Now there are two antiviruses DrWEB and SpyHunter, one monitors everything, the other I use once a week to scan for viruses. I think that either I didn’t enable something (for example, a service) or configured it incorrectly, or this antivirus is blocking transmission over the Serial port. But after all, loading the program works (and at the time of loading both TX and RX (LED) work))
Guess 3:
For unknown reasons, the board has become unusable.
Guess 4:
In addition, the LED L on the board is on and never goes out (if you do not turn it off yourself), it lights up yellow, and blinks only when you restart. I heard somewhere that it burns at the moment of opening a serial connection. This is what happens, the serial connection hangs when loading? But after all sending that works.
Help please) I really don’t want to buy another board because of this. (If it’s the case). Suggestions are also welcome.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Lapin, 2015-06-01
@MrBoriska

Revealed problems with configuring ports on Windows. Oh, it's always like this...

A
Armenian Radio, 2015-06-01
@gbg

Write down the firmware that exposes the mega pins for reading and hangs the controller.
Close pins TX0 and RX0.
Connect the board to the serial port.
Everything that you write to the port will be returned back.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question