View source: R/bed_connection.R
bed_connection | R Documentation |
Setup a connection to the bed serial output with all the specifications needed for the type of its output stream.
bed_connection(port = "COM3", buffersize = 2^21)
port |
(chr) the serial port used for the connection. |
buffersize |
(int, default 2^21, i.e. ~2 MB) number of bytes to dedicate to the buffer. |
a connection
The number of bytes used is set to approx 2 MB because the bed stream a line of information of less than 100 characters (about 50-60), collecting sensors signals at 5Hz. So, at 1 Byte each character, it sum up to 0.5 kB/s. 2 MB of buffer should be sufficient to collect 4000 seconds of data (~ 1 hour), that should be both a sufficient and reasonable amount of time for a single session of data collection.
## Not run: # connect the serial cable to the computer and con <- bed_connection() # default port is "COM3" port_used <- "COM1" bed_connection(port = port_used) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.