-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from AllenNeuralDynamics/docs-add-harp-enviro…
…nment-sensor Add Harp environement sensor documentation
- Loading branch information
Showing
7 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Environment Sensor | ||
========== | ||
|
||
The repository of this device can be found [here](https://github.com/AllenNeuralDynamics/harp.device.environment-sensor). | ||
|
||
# Examples | ||
|
||
It is advisable to first get familiar with the general Bonsai interface for Harp devices. This documentation can be found at [harp-tech.org](https://harp-tech.org/articles/intro.html). | ||
|
||
## Parsing sensor data | ||
|
||
Device sensor data can be parsed from the individual sensor registers ([`Pressure`, `Temperature`, `Humidity`]). For simplicity, a single register with a packed data structure is also provided. By default, this register will emit a period message with the data from all sensors. The following pattern can be used to parse the register: | ||
|
||
:::workflow | ||
![EnvironmentSensorDataParsing](~/workflows/EnvironmentSensorExample.bonsai) | ||
::: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule harp.device.environment-sensor
added at
3731b5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<WorkflowBuilder Version="2.8.5" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core" | ||
xmlns:harp="clr-namespace:Bonsai.Harp;assembly=Bonsai.Harp" | ||
xmlns:p1="clr-namespace:AllenNeuralDynamics.EnvironmentSensor;assembly=AllenNeuralDynamics.EnvironmentSensor" | ||
xmlns="https://bonsai-rx.org/2018/workflow"> | ||
<Workflow> | ||
<Nodes> | ||
<Expression xsi:type="rx:BehaviorSubject" TypeArguments="harp:HarpMessage"> | ||
<rx:Name>Commands</rx:Name> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="p1:Device"> | ||
<harp:OperationMode>Active</harp:OperationMode> | ||
<harp:OperationLed>On</harp:OperationLed> | ||
<harp:DumpRegisters>true</harp:DumpRegisters> | ||
<harp:VisualIndicators>On</harp:VisualIndicators> | ||
<harp:Heartbeat>Disabled</harp:Heartbeat> | ||
<harp:IgnoreErrors>false</harp:IgnoreErrors> | ||
<harp:PortName>COMx</harp:PortName> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="rx:PublishSubject"> | ||
<Name>Events</Name> | ||
</Expression> | ||
<Expression xsi:type="SubscribeSubject"> | ||
<Name>Events</Name> | ||
</Expression> | ||
<Expression xsi:type="p1:Parse"> | ||
<harp:Register xsi:type="p1:SensorData" /> | ||
</Expression> | ||
<Expression xsi:type="MemberSelector"> | ||
<Selector>Pressure</Selector> | ||
</Expression> | ||
<Expression xsi:type="MemberSelector"> | ||
<Selector>Temperature</Selector> | ||
</Expression> | ||
<Expression xsi:type="MemberSelector"> | ||
<Selector>Humidity</Selector> | ||
</Expression> | ||
</Nodes> | ||
<Edges> | ||
<Edge From="0" To="1" Label="Source1" /> | ||
<Edge From="1" To="2" Label="Source1" /> | ||
<Edge From="3" To="4" Label="Source1" /> | ||
<Edge From="4" To="5" Label="Source1" /> | ||
<Edge From="4" To="6" Label="Source1" /> | ||
<Edge From="4" To="7" Label="Source1" /> | ||
</Edges> | ||
</Workflow> | ||
</WorkflowBuilder> |