I\'m wanting to plot live data from the serial port. I figured R would be a good tool for the job. I\'m stumbling on trying to read data from the serial port (COM4). I\'ve ve
Teraterm and Windows use a different mechanism to configure serial devices. Are your system connection settings ok compared to what is configured in teraterm? Re-check the configuration parameter in teraterm and then use them to set your COM4: configuration in R.
system("mode COM4: BAUD=115200 PARITY=N DATA=8 STOP=1")
see mode /? on your command prompt for further parameters
it might also be helpful to read data character by character using readChar()
It sometimes happens that teraterm doesn't close RS232 connections properly.
i am working with the serial
-package (here) available on CRAN. This was developed to do exactly that what you need. Reading and sending data form and to RS232 etc. connections.
I do really recommend this, because "mode.exe
" seems not to work for virtual COM-ports. See NPort-Server etc.