Skip to content

Commit

Permalink
Change quick start example to include network node retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansandberg committed Mar 4, 2018
1 parent d24e10d commit 0cf37d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ Here are some quick examples of what you can do:
network = canopen.Network()
# Add some nodes with corresponding Object Dictionaries
node = network.add_node(6, '/path/to/object_dictionary.eds')
network.add_node(6, '/path/to/object_dictionary.eds')
node = network[6]
# Connect to the CAN bus
# Arguments are passed to python-can's can.interface.Bus() constructor
# (see https://python-can.readthedocs.io/en/latest/bus.html).
network.connect(bustype='socketcan', channel='can0')
network.connect()
# network.connect(bustype='socketcan', channel='can0')
# network.connect(bustype='kvaser', channel=0, bitrate=250000)
# network.connect(bustype='pcan', channel='PCAN_USBBUS1', bitrate=250000)
# network.connect(bustype='ixxat', channel=0, bitrate=250000)
Expand Down

0 comments on commit 0cf37d9

Please sign in to comment.