Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabConnections.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labdev
LabConnections.jl
Commits
eca2c020
There was a problem fetching the pipeline summary.
Commit
eca2c020
authored
Jan 19, 2018
by
Marcus Thelander Andrén
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
8b4615bc
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+22
-4
22 additions, 4 deletions
README.md
with
22 additions
and
4 deletions
README.md
+
22
−
4
View file @
eca2c020
...
...
@@ -82,11 +82,29 @@ To tell the BBB that we want to control the LED, we make a call to `init_devices
init_devices!(stream, led)
Now we can start controlling the LED on the BBB. Let's begin by turning it on
put!(led, true)
send(stream)
The function
`put!`
puts a new command (
`true`
) to a device (
`led`
) to the file stream buffer.
Then, the function
`send`
empties the buffer, and sends the commands to the BBB.
send(led, true)
You should now see the first system LED on the BBB being lit.
The function
`send`
puts a new command (
`true`
) to a device (
`led`
) to the file stream buffer and
sends it immediately to the BBB.
We can read the current status of the LED by calling
`read`
v = read(led)
You should now see a printout saying that the LED is turned on.
We can also stack several commands to the buffer before sending them to the BBB.
We do this with the command
`put!`
. To turn on 2 LEDS at the same time, we can call
led2 = SysLED(2)
led3 = SysLED(3)
init_devices!(stream, led2, led3)
put!(led2, true)
put!(led3, true)
send(stream)
Similarly we can read from several devices at the same time by using
`get`
get(led2)
get(led3)
v1, v2 = read(stream)
### More Examples
There are several examples found
[
here
](
https://gitlab.control.lth.se/labdev/LabConnections.jl/blob/master/docs/build/examples/examples.md#examples
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment