Normally I use Beagle Terminal on my Chromebook for serial comms with a micro:bit.
Now, I want to use a terminal app on an Android phone instead. I have tried one or two apps (e.g. Serial USB Terminal) but I can’t get it to work fully!
Here’s my micro:bit code which looks for serial input and echoes it back to the terminal app - this works fine - the echo text is displayed on the terminal correctly!
basic.forever(function () {
charIn = serial.readString()
stringIn = "" + stringIn + charIn
if (charIn.compare(String.fromCharCode(13)) == 0) {
serial.writeString("" + String.fromCharCode(13) + String.fromCharCode(10))
parseCommand()
stringIn = ""
} else {
serial.writeString(charIn)
}
})
But when I send the micro:bit a command (which correctly returns data on Chromebook + Beagle Terminal) then I get no output on Android + Serial USB Terminal.
Any ideas?
I use normal serial commands like:
serial.writeString(", ")