Skip to content

Commit 8297a08

Browse files
committed
Adding some very basic documentation.
1 parent 425d073 commit 8297a08

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vscode/
22
.idea/
33
build/
4+
cmake-build-debug/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<a href="https://opencyphal.org/"><img align="right" src="https://raw.githubusercontent.com/107-systems/.github/main/logo/opencyphal.svg" width="25%"></a>
2+
:floppy_disk: `example-01-opencyphal-basic-node`
3+
================================================
4+
* Setup a virtual CAN interface (`vcan0`)
5+
```bash
6+
sudo ./setup_vcan.sh
7+
```
8+
* Install `yakut`
9+
```bash
10+
python3 -m pip install yakut
11+
```
12+
* Compile OpenCyphal DSDL
13+
```bash
14+
yakut compile https://github.com/OpenCyphal/public_regulated_data_types/archive/refs/heads/master.zip
15+
```
16+
* Setup `yakut`
17+
```bash
18+
./setup_yakut.sh
19+
```
20+
* Start `yakut`
21+
```bash
22+
yakut monitor
23+
```
24+
* Use `yakut`
25+
26+
Read the register list of the node.
27+
```bash
28+
yakut rl 42
29+
[cyphal.node.description, cyphal.node.id, cyphal.pub.temperature.id, cyphal.pub.temperature.type]
30+
```

extras/cyphal++/examples/example-01-opencyphal-basic-node/example-01-opencyphal-basic-node.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
* Contributors: https://github.com/107-systems/107-Arduino-Cyphal/graphs/contributors.
66
*/
77

8-
/*
9-
* Note: Before running this example make sure to set-up a virtual can interface
10-
* by executing
11-
* sudo ./setup_vcan.sh
12-
*/
13-
148
/**************************************************************************************
159
* INCLUDES
1610
**************************************************************************************/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export YAKUT_COMPILE_OUTPUT=.yakut
2+
export YAKUT_PATH="$YAKUT_COMPILE_OUTPUT"
3+
export UAVCAN__CAN__IFACE='socketcan:vcan0'
4+
export UAVCAN__CAN__MTU=8
5+
export UAVCAN__NODE__ID=$(yakut accommodate) # Pick an unoccupied node-ID automatically for this shell session.
6+
echo "Auto-selected node-ID for this session: $UAVCAN__NODE__ID"

0 commit comments

Comments
 (0)