Skip to content

Commit ad9b408

Browse files
committed
Fix 4th exercise digital output toggle
1 parent c56fb2c commit ad9b408

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

tutorials/hobgoblin-closeloop.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ To better understand what each parameter controls, try the following modificatio
136136
- Insert a [`Grayscale`] and a [`Threshold`] transform (or the color segmentation operators).
137137
- Insert a [`Sum`] transform, and select the `Val0` field from the output.
138138
- Insert a [`GreaterThan`] transform and configure the `Value` property to an appropriate threshold. Remember you can use the visualizers to see what values are coming through the [`Sum`] and what the result of the [`GreaterThan`] operator is.
139-
- Insert a [`CreateMessage`] operator, select [`DigitalOutputSetPayload`] for the `Payload`, and `GP15` for the [`DigitalOutputSet`] property.
139+
- Insert a [`CreateMessage`] operator, select [`DigitalOutputTogglePayload`] for the `Payload`, and `GP15` for the [`DigitalOutputToggle`] property.
140140
- Insert a [`MulticastSubject`] operator and configure the `Name` property to `Hobgoblin Commands`.
141141
- Run the workflow and verify that entering the region of interest turns on the LED.
142142
- **Optional:** Replace the [`Crop`] transform by a [`CropPolygon`] to allow for non-rectangular regions.
143+
- **Optional:** Modify the workflow to replace the digital output toggle with a pulse train.
143144

144145
> [!Note]
145146
> The [`CropPolygon`] operator uses the `Regions` property to define multiple, possibly non-rectangular regions. The visual editor is similar to [`Crop`], where you draw a rectangular box. However, in [`CropPolygon`] you can move the corners of the box by right-clicking _inside_ the box and dragging the cursor to the new position. You can add new points by double-clicking with the left mouse button, and delete points by double-clicking with the right mouse button. You can delete regions by pressing the `Del` key and cycle through selected regions by pressing the `Tab` key.

workflows/hobgoblin-closeloop-roi.bonsai

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
</Expression>
4949
<Expression xsi:type="p1:CreateMessage">
5050
<harp:MessageType>Write</harp:MessageType>
51-
<harp:Payload xsi:type="p1:CreateDigitalOutputSetPayload">
52-
<p1:DigitalOutputSet>GP15</p1:DigitalOutputSet>
51+
<harp:Payload xsi:type="p1:CreateDigitalOutputTogglePayload">
52+
<p1:DigitalOutputToggle>GP15</p1:DigitalOutputToggle>
5353
</harp:Payload>
5454
</Expression>
5555
<Expression xsi:type="MulticastSubject">

workflows/hobgoblin-closeloop-roi.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)