Arduino Uno serial monitor printing garbage












0















I am using Arduino Uno and GSM sim800l for a project and looks like something is wrong and I don't know what it is. Here is my code:



#include <AltSoftSerial.h>

AltSoftSerial altSerial;

void setup() {
Serial.begin(19200);
Serial.println("AltSoftSerial Test Begin");
altSerial.begin(19200);
altSerial.println("Hello World");
}

void loop() {
char c;

altSerial.print("altSerial is working.");
if (Serial.available()) {
c = Serial.read();
altSerial.print(c);
}
if (altSerial.available()) {
c = altSerial.read();
Serial.print(c);
}
}


Its output was like this:



AltSoftSerial Test Begin (linebreak)
Hello World (linebreak)
ltSerial is ok⸮⸮M⸮ɥ⸮⸮⸮is okalt //insert long random garbage here


I tried changing the baud rate of the code and serial monitor to keep it matched but it is not working, I tried to lower it as low as 300 and tried up to 19200 as well.

Any ideas would help. I also tried Tools-> Fix encoding and reload but it still didn't solve the problem. It is my first time using this type of hardware so please bear with me. My goal is to use it to send SMS messages but right now I'm trying a smaller task with it to try and understand it better.



Btw, the Arduino IDE I am using is 1.8.7










share|improve this question

























  • did you set the baud rate in Serial Monitor to 19200 baud?

    – Juraj
    Nov 24 '18 at 11:19













  • yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

    – Need2learn
    Nov 25 '18 at 8:40











  • how do you get both outputs to one Serial Monitor?

    – Juraj
    Nov 25 '18 at 8:43
















0















I am using Arduino Uno and GSM sim800l for a project and looks like something is wrong and I don't know what it is. Here is my code:



#include <AltSoftSerial.h>

AltSoftSerial altSerial;

void setup() {
Serial.begin(19200);
Serial.println("AltSoftSerial Test Begin");
altSerial.begin(19200);
altSerial.println("Hello World");
}

void loop() {
char c;

altSerial.print("altSerial is working.");
if (Serial.available()) {
c = Serial.read();
altSerial.print(c);
}
if (altSerial.available()) {
c = altSerial.read();
Serial.print(c);
}
}


Its output was like this:



AltSoftSerial Test Begin (linebreak)
Hello World (linebreak)
ltSerial is ok⸮⸮M⸮ɥ⸮⸮⸮is okalt //insert long random garbage here


I tried changing the baud rate of the code and serial monitor to keep it matched but it is not working, I tried to lower it as low as 300 and tried up to 19200 as well.

Any ideas would help. I also tried Tools-> Fix encoding and reload but it still didn't solve the problem. It is my first time using this type of hardware so please bear with me. My goal is to use it to send SMS messages but right now I'm trying a smaller task with it to try and understand it better.



Btw, the Arduino IDE I am using is 1.8.7










share|improve this question

























  • did you set the baud rate in Serial Monitor to 19200 baud?

    – Juraj
    Nov 24 '18 at 11:19













  • yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

    – Need2learn
    Nov 25 '18 at 8:40











  • how do you get both outputs to one Serial Monitor?

    – Juraj
    Nov 25 '18 at 8:43














0












0








0








I am using Arduino Uno and GSM sim800l for a project and looks like something is wrong and I don't know what it is. Here is my code:



#include <AltSoftSerial.h>

AltSoftSerial altSerial;

void setup() {
Serial.begin(19200);
Serial.println("AltSoftSerial Test Begin");
altSerial.begin(19200);
altSerial.println("Hello World");
}

void loop() {
char c;

altSerial.print("altSerial is working.");
if (Serial.available()) {
c = Serial.read();
altSerial.print(c);
}
if (altSerial.available()) {
c = altSerial.read();
Serial.print(c);
}
}


Its output was like this:



AltSoftSerial Test Begin (linebreak)
Hello World (linebreak)
ltSerial is ok⸮⸮M⸮ɥ⸮⸮⸮is okalt //insert long random garbage here


I tried changing the baud rate of the code and serial monitor to keep it matched but it is not working, I tried to lower it as low as 300 and tried up to 19200 as well.

Any ideas would help. I also tried Tools-> Fix encoding and reload but it still didn't solve the problem. It is my first time using this type of hardware so please bear with me. My goal is to use it to send SMS messages but right now I'm trying a smaller task with it to try and understand it better.



Btw, the Arduino IDE I am using is 1.8.7










share|improve this question
















I am using Arduino Uno and GSM sim800l for a project and looks like something is wrong and I don't know what it is. Here is my code:



#include <AltSoftSerial.h>

AltSoftSerial altSerial;

void setup() {
Serial.begin(19200);
Serial.println("AltSoftSerial Test Begin");
altSerial.begin(19200);
altSerial.println("Hello World");
}

void loop() {
char c;

altSerial.print("altSerial is working.");
if (Serial.available()) {
c = Serial.read();
altSerial.print(c);
}
if (altSerial.available()) {
c = altSerial.read();
Serial.print(c);
}
}


Its output was like this:



AltSoftSerial Test Begin (linebreak)
Hello World (linebreak)
ltSerial is ok⸮⸮M⸮ɥ⸮⸮⸮is okalt //insert long random garbage here


I tried changing the baud rate of the code and serial monitor to keep it matched but it is not working, I tried to lower it as low as 300 and tried up to 19200 as well.

Any ideas would help. I also tried Tools-> Fix encoding and reload but it still didn't solve the problem. It is my first time using this type of hardware so please bear with me. My goal is to use it to send SMS messages but right now I'm trying a smaller task with it to try and understand it better.



Btw, the Arduino IDE I am using is 1.8.7







arduino serial-port arduino-uno gsm baud-rate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 18:52









Federico Grandi

3,08821229




3,08821229










asked Nov 24 '18 at 11:03









Need2learnNeed2learn

188




188













  • did you set the baud rate in Serial Monitor to 19200 baud?

    – Juraj
    Nov 24 '18 at 11:19













  • yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

    – Need2learn
    Nov 25 '18 at 8:40











  • how do you get both outputs to one Serial Monitor?

    – Juraj
    Nov 25 '18 at 8:43



















  • did you set the baud rate in Serial Monitor to 19200 baud?

    – Juraj
    Nov 24 '18 at 11:19













  • yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

    – Need2learn
    Nov 25 '18 at 8:40











  • how do you get both outputs to one Serial Monitor?

    – Juraj
    Nov 25 '18 at 8:43

















did you set the baud rate in Serial Monitor to 19200 baud?

– Juraj
Nov 24 '18 at 11:19







did you set the baud rate in Serial Monitor to 19200 baud?

– Juraj
Nov 24 '18 at 11:19















yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

– Need2learn
Nov 25 '18 at 8:40





yeah, when I change the baud rate in the source code I change the baud rate in arduino serial monitor as well. I make sure that they always match.

– Need2learn
Nov 25 '18 at 8:40













how do you get both outputs to one Serial Monitor?

– Juraj
Nov 25 '18 at 8:43





how do you get both outputs to one Serial Monitor?

– Juraj
Nov 25 '18 at 8:43












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457467%2farduino-uno-serial-monitor-printing-garbage%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457467%2farduino-uno-serial-monitor-printing-garbage%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python