mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Docs: Refactor icsneopy examples
This commit is contained in:
committed by
Kyle Schwarz
parent
cf2cf3e28b
commit
3c0c0dd44c
@@ -0,0 +1,56 @@
|
||||
===================
|
||||
CAN Getting Started
|
||||
===================
|
||||
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
- Python 3.8 or higher
|
||||
- icsneopy library installed
|
||||
- CAN hardware device connected
|
||||
|
||||
:download:`Download complete example <../../examples/python/can/can_complete_example.py>`
|
||||
|
||||
Basic Setup
|
||||
===========
|
||||
|
||||
1. Import the library and discover devices:
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 11-19
|
||||
|
||||
2. Configure and open the device:
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 22-37
|
||||
|
||||
Transmitting CAN Frames
|
||||
========================
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 40-53
|
||||
|
||||
Receiving CAN Frames
|
||||
=====================
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 56-72
|
||||
|
||||
Cleanup and Resource Management
|
||||
===============================
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 75-79
|
||||
|
||||
Complete Example with Error Handling
|
||||
====================================
|
||||
|
||||
.. literalinclude:: ../../examples/python/can/can_complete_example.py
|
||||
:language: python
|
||||
:lines: 82-125
|
||||
|
||||
Reference in New Issue
Block a user