Docs: Refactor icsneopy examples

This commit is contained in:
Thomas Stoddard
2025-08-28 11:40:57 -04:00
committed by Kyle Schwarz
parent cf2cf3e28b
commit 3c0c0dd44c
11 changed files with 635 additions and 94 deletions
+56
View File
@@ -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