Will work on the Switch code and share when I have a few minutes free. This should take care of the differing responses based on different commands. A if statement before the switch statement should be able to check the expected response vs actual response.
The Digital.write code that Gordon posted above still does not seem to work correctly. I think rather than using a delay time after the 2 second high turn on code is run, the right way to handle this is to read a pin on the modem that lights up the ready LED to make sure the modem is ready to read commands.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Will work on the Switch code and share when I have a few minutes free. This should take care of the differing responses based on different commands. A if statement before the switch statement should be able to check the expected response vs actual response.
The Digital.write code that Gordon posted above still does not seem to work correctly. I think rather than using a delay time after the 2 second high turn on code is run, the right way to handle this is to read a pin on the modem that lights up the ready LED to make sure the modem is ready to read commands.
This is fun stuff!