You are reading a single comment by @user7143 and its replies. Click here to read the full conversation.
  • Took another look at the Serial.write cmd. I had the / \ mixed up. Now it seems to work.

    On to the issue of reading and processing the send command output. Would a swicth statement in the serial.on("data") make sense?

    if I send the command Serial.write("AT+CBC\n\r", 500, "+CBC",function(){}); to check the battery voltage I get +cbc: 0,94,3978 returned from the serial port. With a switch statement I could act on this by parsing the +cbc from the line and comparing it to the expected response from the Serial.write line (+CBC). If these agree I could then return an array for the 0,94,3878, that shows battery % charge left and the battery voltage.

    I will try to code this later today if someone agrees this is a good way to proceed.

About

Avatar for user7143 @user7143 started