Description Usage Arguments Value Examples
Connect to the SDS011 air particulate sensor connected via USB
1 2 3 4 5 6 7 8 | sds011_connect(
port = "ttyUSB0",
mode = "115200,n,8,1",
buffering = "none",
newline = TRUE,
translation = "auto",
open = TRUE
)
|
port |
Part name. This is usually operating software dependent. For Raspberry Pi with an SDS011 device plugged via USB, this will be ttyUSB0. |
mode |
A string concatenating the baud rate, parity, databits and stopbits of the communication mode separated by a comma. Default to "115200,n,8,1". |
buffering |
Connection buffering. Default to "none". Other options is "line" to send buffer after new line character or "full" where write operations are buffed until a connection is flushed. |
newline |
Logical. Should a transmission end with a newline or not. Default is TRUE or 1. |
translation |
End of line character to use. Could be "lf", "cr", "crlf", "binary", or "auto". Default to "auto". |
open |
Logical. Should connection be opened once established? Default to TRUE |
A serial interface connection to the SDS011 device via USB
1 2 3 4 | ## Not run:
sds011_connect()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.