Just so you know (it shouldn't make any difference in this case though), you need to put quotes around the values of parity and flow as they're not built-in constants - like this:
In this case it's fine because none would evaluate to undefined, and the default it none as well - but If you'd tried specifying other parity types then it wouldn't have worked.
If you do have a storage oscilloscope handy then I'd really recommend connecting it to the serial port data pin. By triggering when you scan a barcode you should easily be able to figure out exactly what the baud rate is.
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.
Just so you know (it shouldn't make any difference in this case though), you need to put quotes around the values of
parity
andflow
as they're not built-in constants - like this:In this case it's fine because
none
would evaluate toundefined
, and the default it none as well - but If you'd tried specifying other parity types then it wouldn't have worked.If you do have a storage oscilloscope handy then I'd really recommend connecting it to the serial port data pin. By triggering when you scan a barcode you should easily be able to figure out exactly what the baud rate is.