BioTac SP driver
This driver reads samples of tactile data from a Syntouch BioTac SP sensor conntected to the PC using a Cheetah SPI/USB adapter.
Currently only reading out a single Biotac sensor is supported.
This driver implements the sensor interface of the generic data recorder and thus a driver instance can be passed directly to the recorder as a sensor.
Installation
Make sure that the system driver for the Cheetah SPI/USB adapter is properly installed.
Driver configuration
Instantiating the driver requires providing a configuration record of type BRML.Drivers.BioTacCfgT
.
1: 2: 3: 4: 5: 6: |
|
Cheetah
is the unique id (UID) of the Cheetah SPI/USB adapter the BioTac sensor is connected to.
Index
is the port the BioTac sensor is connected to on the multiplexer board. It can be 0, 1 or 2.
Driver instance
We can now instantiate the driver.
1:
|
|
After power on and initialization the driver starts to stream samples from the BioTac sensor at the highest possible sampling rate.
Reading the latest sensor sample
The latest acquired sample is available in the biotac.CurrentSample
property.
1:
|
|
If you intend to do machine learning with the tactile sensor data, you are probably interested in the flat sensor data.
It is available in the cs.Flat
field.
1:
|
|
Event-based sample acquisition
The driver also provides an event-based interface to obtain samples.
Subscribe to the biotac.SampleAcquired
event and you will be notified for each newly acquired sample.
This is the recommended method of processing the sample stream.
1: 2: |
|
This code will automatically print each new sample as it is acquired.
Disposing
Dispose the driver instance after usage.
1:
|
|
This will turn off power to the sensor and release the Cheetah SPI/USB adapter.
Full name: Biotac.cfg
val uint32 : value:'T -> uint32 (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.uint32
--------------------
type uint32 = System.UInt32
Full name: Microsoft.FSharp.Core.uint32
Full name: Biotac.biotac
Full name: Biotac.cs
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
type Thread =
inherit CriticalFinalizerObject
new : start:ThreadStart -> Thread + 3 overloads
member Abort : unit -> unit + 1 overload
member ApartmentState : ApartmentState with get, set
member CurrentCulture : CultureInfo with get, set
member CurrentUICulture : CultureInfo with get, set
member DisableComObjectEagerCleanup : unit -> unit
member ExecutionContext : ExecutionContext
member GetApartmentState : unit -> ApartmentState
member GetCompressedStack : unit -> CompressedStack
member GetHashCode : unit -> int
...
Full name: System.Threading.Thread
--------------------
System.Threading.Thread(start: System.Threading.ThreadStart) : unit
System.Threading.Thread(start: System.Threading.ParameterizedThreadStart) : unit
System.Threading.Thread(start: System.Threading.ThreadStart, maxStackSize: int) : unit
System.Threading.Thread(start: System.Threading.ParameterizedThreadStart, maxStackSize: int) : unit
System.Threading.Thread.Sleep(millisecondsTimeout: int) : unit