PyTmcStepper 0.7.8__tar.gz → 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/LICENSE +5 -4
  2. {pytmcstepper-0.7.8/src/PyTmcStepper.egg-info → pytmcstepper-0.9.0}/PKG-INFO +28 -5
  3. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/README.md +27 -4
  4. pytmcstepper-0.9.0/pyproject.toml +16 -0
  5. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/setup.cfg +1 -1
  6. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0/src/PyTmcStepper.egg-info}/PKG-INFO +28 -5
  7. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/PyTmcStepper.egg-info/SOURCES.txt +6 -0
  8. pytmcstepper-0.9.0/src/tmc_driver/_tmc_gpio_board.py +681 -0
  9. pytmcstepper-0.9.0/src/tmc_driver/_tmc_logger.py +224 -0
  10. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/_tmc_math.py +18 -0
  11. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/_tmc_stallguard.py +153 -152
  12. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/_tmc_stepperdriver.py +15 -3
  13. pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_spi.py +101 -0
  14. pytmcstepper-0.7.8/src/tmc_driver/com/_tmc_com_spi.py → pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_spi_base.py +41 -72
  15. pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_spi_ftdi.py +67 -0
  16. pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_spi_micropython.py +92 -0
  17. pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_uart.py +116 -0
  18. pytmcstepper-0.7.8/src/tmc_driver/com/_tmc_com_uart.py → pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_uart_base.py +79 -109
  19. pytmcstepper-0.9.0/src/tmc_driver/com/_tmc_com_uart_micropython.py +117 -0
  20. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/enable_control/_tmc_ec.py +4 -0
  21. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/enable_control/_tmc_ec_pin.py +53 -52
  22. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/_tmc_mc.py +13 -0
  23. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/_tmc_mc_step_dir.py +23 -12
  24. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/_tmc_mc_step_pwm_dir.py +97 -96
  25. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/_tmc_mc_step_reg.py +5 -4
  26. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/_tmc_mc_vactual.py +30 -6
  27. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/reg/_tmc220x_reg.py +1 -1
  28. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/reg/_tmc224x_reg.py +1 -1
  29. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/tmc_2209.py +1 -2
  30. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/tmc_220x.py +8 -7
  31. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/tmc_2240.py +12 -13
  32. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc_com_uart.py +1 -1
  33. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc_math.py +7 -0
  34. pytmcstepper-0.9.0/tests/test_tmc_modules.py +62 -0
  35. pytmcstepper-0.7.8/pyproject.toml +0 -6
  36. pytmcstepper-0.7.8/src/tmc_driver/_tmc_gpio_board.py +0 -403
  37. pytmcstepper-0.7.8/src/tmc_driver/_tmc_logger.py +0 -179
  38. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/PyTmcStepper.egg-info/dependency_links.txt +0 -0
  39. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/PyTmcStepper.egg-info/requires.txt +0 -0
  40. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/PyTmcStepper.egg-info/top_level.txt +0 -0
  41. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/__init__.py +0 -0
  42. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/_tmc_exceptions.py +0 -0
  43. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/com/__init__.py +0 -0
  44. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/com/_tmc_com.py +0 -0
  45. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/enable_control/__init__.py +0 -0
  46. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/enable_control/_tmc_ec_toff.py +0 -0
  47. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/motion_control/__init__.py +0 -0
  48. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/reg/__init__.py +0 -0
  49. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/reg/_tmc2209_reg.py +0 -0
  50. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/reg/_tmc_reg.py +0 -0
  51. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/src/tmc_driver/tmc_2208.py +0 -0
  52. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc2209.py +0 -0
  53. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc2240.py +0 -0
  54. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc_com_spi.py +0 -0
  55. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc_ec_pin.py +0 -0
  56. {pytmcstepper-0.7.8 → pytmcstepper-0.9.0}/tests/test_tmc_move.py +0 -0
@@ -2,10 +2,11 @@ Copyright (C) 2010-2018 Mike McCauley
2
2
  Copyright (c) 2020 troxel
3
3
  Copyright (c) 2014 The Python Packaging Authority (PyPA)
4
4
  Copyright (c) 2014 Mapbox
5
-
6
-
7
-
8
-
5
+ Copyright (c) 2013, 2014 micropython-lib contributors
6
+
7
+
8
+
9
+
9
10
  GNU GENERAL PUBLIC LICENSE
10
11
  Version 3, 29 June 2007
11
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyTmcStepper
3
- Version: 0.7.8
3
+ Version: 0.9.0
4
4
  Summary: This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi
5
5
  Home-page: https://github.com/Chr157i4n/PyTmcStepper
6
6
  Author: Christian Köhlke
@@ -98,6 +98,8 @@ gpiozero | RASPBERRY_PI5 | Pi5
98
98
  Jetson.GPIO | NVIDIA_JETSON | Nvidia Jetson
99
99
  pheriphery | LUCKFOX_PICO | Luckfox Pico
100
100
  OPi.GPIO | ORANGE_PI | Orange Pi
101
+ pyftdi | - | Windows/Linux
102
+ machine | - | Pico, Pico2, ESP32, etc.
101
103
 
102
104
  Those libraries are needed for this library to work. You can either install the correct library yourself.
103
105
  You can also install the needed GPIO library by specifing the Installation Parameter while installing this library:
@@ -149,10 +151,11 @@ Further methods of controlling the motion of a motor could be:
149
151
 
150
152
  ### Com
151
153
 
152
- Com | Class | Driver | Notes
153
- -- | -- | -- | --
154
- UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
155
- SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
154
+ Com | Class | Driver | Notes
155
+ -- | -- | -- | --
156
+ UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
157
+ SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
158
+ SPI over FT232H | [TmcComSpiFtdi](src/tmc_driver/com/_tmc_com_spi_ftdi.py) | TMC2240 | Communication via SPI using a FT232H. This can be used on any OS.<br />[pyftdi](https://pypi.org/project/pyftdi) needs to be installed
156
159
 
157
160
  ## Wiring
158
161
 
@@ -249,6 +252,24 @@ For me these baudrates worked fine: 19200, 38400, 57600, 115200, 230400, 460800,
249
252
  If the TMC2209 driver is connected to the Vmotor, the internal voltage regulator will create the Vio for the chip.
250
253
  So you don't need to connect anything to the Vio pin of the driver.
251
254
 
255
+ ### Micropython
256
+
257
+ First you need to upload all need files to the µController with mpremote or another tool. You can use the script `upload_to_pico.py` for that.
258
+ Then you can run a demo script by using
259
+
260
+ some external micropython-lib are needed to be installed:
261
+
262
+ ```shell
263
+ python -m mpremote connect COM4 mip install threading
264
+ python -m mpremote connect COM4 mip install types
265
+ ```
266
+
267
+ Run the demo script with:
268
+
269
+ ```shell
270
+ python -m mpremote connect COM4 run .\demo\micropython\demo_script_tmc2240_03_basic_movement.py
271
+ ```
272
+
252
273
  ## Usage
253
274
 
254
275
  The library currently uses functions to access the TMC registers, but Python properties for internal getters/setters.
@@ -301,6 +322,8 @@ The code to run the stepper motor is based on the code of the [AccelStepper Libr
301
322
 
302
323
  The code for the UART communication is based on this [code from troxel](https://github.com/troxel/TMC_UART).
303
324
 
325
+ For the implementation of Python-stdlib for micropython [micropython-lib](https://github.com/micropython/micropython-lib)
326
+
304
327
  My goal is to make a library, that can run a stepper motor with a TMC2209 stepper driver and can write the setting in the register of the TMC2209, entirely in Python.
305
328
  The main focus for this are Test setups, as Python is not fast enough for high motor speeds.
306
329
 
@@ -67,6 +67,8 @@ gpiozero | RASPBERRY_PI5 | Pi5
67
67
  Jetson.GPIO | NVIDIA_JETSON | Nvidia Jetson
68
68
  pheriphery | LUCKFOX_PICO | Luckfox Pico
69
69
  OPi.GPIO | ORANGE_PI | Orange Pi
70
+ pyftdi | - | Windows/Linux
71
+ machine | - | Pico, Pico2, ESP32, etc.
70
72
 
71
73
  Those libraries are needed for this library to work. You can either install the correct library yourself.
72
74
  You can also install the needed GPIO library by specifing the Installation Parameter while installing this library:
@@ -118,10 +120,11 @@ Further methods of controlling the motion of a motor could be:
118
120
 
119
121
  ### Com
120
122
 
121
- Com | Class | Driver | Notes
122
- -- | -- | -- | --
123
- UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
124
- SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
123
+ Com | Class | Driver | Notes
124
+ -- | -- | -- | --
125
+ UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
126
+ SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
127
+ SPI over FT232H | [TmcComSpiFtdi](src/tmc_driver/com/_tmc_com_spi_ftdi.py) | TMC2240 | Communication via SPI using a FT232H. This can be used on any OS.<br />[pyftdi](https://pypi.org/project/pyftdi) needs to be installed
125
128
 
126
129
  ## Wiring
127
130
 
@@ -218,6 +221,24 @@ For me these baudrates worked fine: 19200, 38400, 57600, 115200, 230400, 460800,
218
221
  If the TMC2209 driver is connected to the Vmotor, the internal voltage regulator will create the Vio for the chip.
219
222
  So you don't need to connect anything to the Vio pin of the driver.
220
223
 
224
+ ### Micropython
225
+
226
+ First you need to upload all need files to the µController with mpremote or another tool. You can use the script `upload_to_pico.py` for that.
227
+ Then you can run a demo script by using
228
+
229
+ some external micropython-lib are needed to be installed:
230
+
231
+ ```shell
232
+ python -m mpremote connect COM4 mip install threading
233
+ python -m mpremote connect COM4 mip install types
234
+ ```
235
+
236
+ Run the demo script with:
237
+
238
+ ```shell
239
+ python -m mpremote connect COM4 run .\demo\micropython\demo_script_tmc2240_03_basic_movement.py
240
+ ```
241
+
221
242
  ## Usage
222
243
 
223
244
  The library currently uses functions to access the TMC registers, but Python properties for internal getters/setters.
@@ -270,6 +291,8 @@ The code to run the stepper motor is based on the code of the [AccelStepper Libr
270
291
 
271
292
  The code for the UART communication is based on this [code from troxel](https://github.com/troxel/TMC_UART).
272
293
 
294
+ For the implementation of Python-stdlib for micropython [micropython-lib](https://github.com/micropython/micropython-lib)
295
+
273
296
  My goal is to make a library, that can run a stepper motor with a TMC2209 stepper driver and can write the setting in the register of the TMC2209, entirely in Python.
274
297
  The main focus for this are Test setups, as Python is not fast enough for high motor speeds.
275
298
 
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=42",
4
+ "wheel"
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [tool.pylint."messages control"]
9
+ disable = "C0103,W0511,W0012,R0801"
10
+
11
+ [tool.pylint.main]
12
+ ignored-modules = "machine"
13
+ unsafe-load-any-extension = true
14
+
15
+ [tool.pylint.format]
16
+ max-line-length = 160
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = PyTmcStepper
3
- version = 0.7.8
3
+ version = 0.9.0
4
4
  author = Christian Köhlke
5
5
  author_email = christian@koehlke.de
6
6
  description = This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyTmcStepper
3
- Version: 0.7.8
3
+ Version: 0.9.0
4
4
  Summary: This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi
5
5
  Home-page: https://github.com/Chr157i4n/PyTmcStepper
6
6
  Author: Christian Köhlke
@@ -98,6 +98,8 @@ gpiozero | RASPBERRY_PI5 | Pi5
98
98
  Jetson.GPIO | NVIDIA_JETSON | Nvidia Jetson
99
99
  pheriphery | LUCKFOX_PICO | Luckfox Pico
100
100
  OPi.GPIO | ORANGE_PI | Orange Pi
101
+ pyftdi | - | Windows/Linux
102
+ machine | - | Pico, Pico2, ESP32, etc.
101
103
 
102
104
  Those libraries are needed for this library to work. You can either install the correct library yourself.
103
105
  You can also install the needed GPIO library by specifing the Installation Parameter while installing this library:
@@ -149,10 +151,11 @@ Further methods of controlling the motion of a motor could be:
149
151
 
150
152
  ### Com
151
153
 
152
- Com | Class | Driver | Notes
153
- -- | -- | -- | --
154
- UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
155
- SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
154
+ Com | Class | Driver | Notes
155
+ -- | -- | -- | --
156
+ UART | [TmcComUart](src/tmc_driver/com/_tmc_com_uart.py) | all | Communication via UART (RX, TX). See [Wiring](#uart)<br />[pyserial](https://pypi.org/project/pyserial) needs to be installed
157
+ SPI | [TmcComSpi](src/tmc_driver/com/_tmc_com_spi.py) | TMC2240 | Communication via SPI (MOSI, MISO, CLK, CS). See [Wiring](#spi)<br />[spidev](https://pypi.org/project/spidev) needs to be installed
158
+ SPI over FT232H | [TmcComSpiFtdi](src/tmc_driver/com/_tmc_com_spi_ftdi.py) | TMC2240 | Communication via SPI using a FT232H. This can be used on any OS.<br />[pyftdi](https://pypi.org/project/pyftdi) needs to be installed
156
159
 
157
160
  ## Wiring
158
161
 
@@ -249,6 +252,24 @@ For me these baudrates worked fine: 19200, 38400, 57600, 115200, 230400, 460800,
249
252
  If the TMC2209 driver is connected to the Vmotor, the internal voltage regulator will create the Vio for the chip.
250
253
  So you don't need to connect anything to the Vio pin of the driver.
251
254
 
255
+ ### Micropython
256
+
257
+ First you need to upload all need files to the µController with mpremote or another tool. You can use the script `upload_to_pico.py` for that.
258
+ Then you can run a demo script by using
259
+
260
+ some external micropython-lib are needed to be installed:
261
+
262
+ ```shell
263
+ python -m mpremote connect COM4 mip install threading
264
+ python -m mpremote connect COM4 mip install types
265
+ ```
266
+
267
+ Run the demo script with:
268
+
269
+ ```shell
270
+ python -m mpremote connect COM4 run .\demo\micropython\demo_script_tmc2240_03_basic_movement.py
271
+ ```
272
+
252
273
  ## Usage
253
274
 
254
275
  The library currently uses functions to access the TMC registers, but Python properties for internal getters/setters.
@@ -301,6 +322,8 @@ The code to run the stepper motor is based on the code of the [AccelStepper Libr
301
322
 
302
323
  The code for the UART communication is based on this [code from troxel](https://github.com/troxel/TMC_UART).
303
324
 
325
+ For the implementation of Python-stdlib for micropython [micropython-lib](https://github.com/micropython/micropython-lib)
326
+
304
327
  My goal is to make a library, that can run a stepper motor with a TMC2209 stepper driver and can write the setting in the register of the TMC2209, entirely in Python.
305
328
  The main focus for this are Test setups, as Python is not fast enough for high motor speeds.
306
329
 
@@ -21,7 +21,12 @@ src/tmc_driver/tmc_2240.py
21
21
  src/tmc_driver/com/__init__.py
22
22
  src/tmc_driver/com/_tmc_com.py
23
23
  src/tmc_driver/com/_tmc_com_spi.py
24
+ src/tmc_driver/com/_tmc_com_spi_base.py
25
+ src/tmc_driver/com/_tmc_com_spi_ftdi.py
26
+ src/tmc_driver/com/_tmc_com_spi_micropython.py
24
27
  src/tmc_driver/com/_tmc_com_uart.py
28
+ src/tmc_driver/com/_tmc_com_uart_base.py
29
+ src/tmc_driver/com/_tmc_com_uart_micropython.py
25
30
  src/tmc_driver/enable_control/__init__.py
26
31
  src/tmc_driver/enable_control/_tmc_ec.py
27
32
  src/tmc_driver/enable_control/_tmc_ec_pin.py
@@ -43,4 +48,5 @@ tests/test_tmc_com_spi.py
43
48
  tests/test_tmc_com_uart.py
44
49
  tests/test_tmc_ec_pin.py
45
50
  tests/test_tmc_math.py
51
+ tests/test_tmc_modules.py
46
52
  tests/test_tmc_move.py