Skip to content

SIM800l #1318

Answered by phoddie
salarizadi asked this question in Q&A
SIM800l #1318
Mar 4, 2024 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

The Arduino example uses println which, I believe, adds a line feed at the end of the transmission. Your #serialWrite function uses write() which does not add a line feed. You probably need to do something like this:

    #serialWrite (cmd = "") {
        Timer.delay(500)
        this.#serial.write(ArrayBuffer.fromString(cmd + "\n"));
    }

Also, this may not do what you intend:

this.#serialWrite(26);

Your code will call ArrayBuffer.fromString which will output the characters "2" and "6". If you intend to output an ASCII 26, then you could do:

this.#serial.write(Uint8Array.of(26));

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@phoddie
Comment options

@phoddie
Comment options

Answer selected by salarizadi
@salarizadi
Comment options

@phoddie
Comment options

@salarizadi
Comment options

@phoddie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants