UC2-REST 0.2.0.24__tar.gz → 0.2.0.26__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 (43) hide show
  1. uc2_rest-0.2.0.26/PKG-INFO +151 -0
  2. uc2_rest-0.2.0.26/README.md +120 -0
  3. uc2_rest-0.2.0.26/UC2_REST.egg-info/PKG-INFO +151 -0
  4. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/UC2_REST.egg-info/SOURCES.txt +0 -1
  5. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/__version__.py +1 -1
  6. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/camera.py +5 -1
  7. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/mserial.py +2 -4
  8. uc2_rest-0.2.0.24/PKG-INFO +0 -305
  9. uc2_rest-0.2.0.24/README.md +0 -274
  10. uc2_rest-0.2.0.24/UC2_REST.egg-info/PKG-INFO +0 -305
  11. uc2_rest-0.2.0.24/uc2rest/ledmatrix_.py +0 -214
  12. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/LICENSE +0 -0
  13. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/UC2_REST.egg-info/dependency_links.txt +0 -0
  14. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/UC2_REST.egg-info/not-zip-safe +0 -0
  15. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/UC2_REST.egg-info/requires.txt +0 -0
  16. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/UC2_REST.egg-info/top_level.txt +0 -0
  17. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/setup.cfg +0 -0
  18. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/setup.py +0 -0
  19. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/MockSerial.py +0 -0
  20. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/UC2Client.py +0 -0
  21. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/__init__.py +0 -0
  22. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/analog.py +0 -0
  23. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/cmdrecorder.py +0 -0
  24. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/config.py +0 -0
  25. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/config_.py +0 -0
  26. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/digitalout.py +0 -0
  27. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/galvo.py +0 -0
  28. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/gripper.py +0 -0
  29. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/home.py +0 -0
  30. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/laser.py +0 -0
  31. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/ledmatrix.py +0 -0
  32. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/logger.py +0 -0
  33. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/message.py +0 -0
  34. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/modules.py +0 -0
  35. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/motor.py +0 -0
  36. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/objective.py +0 -0
  37. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/pid.py +0 -0
  38. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/rotator.py +0 -0
  39. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/slm.py +0 -0
  40. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/state.py +0 -0
  41. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/temperature.py +0 -0
  42. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/utils.py +0 -0
  43. {uc2_rest-0.2.0.24 → uc2_rest-0.2.0.26}/uc2rest/wifi.py +0 -0
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: UC2-REST
3
+ Version: 0.2.0.26
4
+ Summary: This pacage will help you to drive the ESP32-driven microscopy control modules from UC2
5
+ Home-page: https://github.com/openUC2/UC2-REST
6
+ Author: Benedict Diederich
7
+ Author-email: benedictdied@gmail.com
8
+ License: GPL v3
9
+ Keywords: UC2REST API to control ESP32-driven microscopy control boards
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: numpy
17
+ Requires-Dist: requests
18
+ Requires-Dist: pyserial
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license
27
+ Dynamic: license-file
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ <p align="center">
33
+ <img src="https://raw.githubusercontent.com/bionanoimaging/UC2-GIT/master/IMAGES/UC2_logo_text.png" width="320" alt="UC2 logo">
34
+ </p>
35
+
36
+ # UC2‑Python Client
37
+
38
+ Python interface to the **UC2 REST** micro‑controller firmware — control motors, lasers, LED matrices, galvos and more over USB‑Serial or Wi‑Fi from any Python environment.
39
+
40
+ ## Highlights
41
+
42
+ - **Plug‑and‑play connection** via USB (`/dev/ttyUSB*`, `COM*`) or TCP (`host`, `port`).
43
+ - **Rich device model**: every hardware block is a Python object with high‑level helpers (e.g. `motor.move_x`, `led.setPattern`, `laser.set_laser`).
44
+ - **Asynchronous & blocking modes** for precise timing or maximum throughput.
45
+ - **Callback hooks** to react to hardware feedback in real time.
46
+ - **Runs everywhere**: desktop Python, headless Raspberry Pi, or in‑browser with PyScript.
47
+ - **LGPL‑3.0‑or‑later** license – use it in academic and commercial projects.
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ pip install uc2rest # latest release
53
+ # or for the bleeding‑edge version
54
+ pip install git+https://github.com/openUC2/UC2-REST.git#subdirectory=PYTHON
55
+ ```
56
+
57
+ Dependencies (`requests`, `numpy`, `pyserial`) are resolved automatically.
58
+
59
+ ## Quick start
60
+
61
+ ```python
62
+ import uc2rest
63
+
64
+ # USB example
65
+ esp = uc2rest.UC2Client(serialport="/dev/ttyUSB0") # Linux / Mac OS
66
+ # esp = uc2rest.UC2Client(serialport="COM3") # Windows
67
+ # Wi‑Fi example
68
+ # esp = uc2rest.UC2Client(host="192.168.4.1", port=31950)
69
+
70
+ # LED matrix: switch all pixels on at half intensity
71
+ esp.led.setAll(True, intensity=128)
72
+
73
+ # Move X axis by 1 mm (1000 steps @ 1 kHz)
74
+ esp.motor.move_x(steps=1000, speed=1000, is_blocking=True)
75
+
76
+ # Turn green laser to full power
77
+ esp.laser.set_laser(channel="G", value=255)
78
+ ```
79
+
80
+ ## Supported modules (automatically attached to `UC2Client`) citeturn1file12
81
+
82
+ | Object | Purpose | Example method(s) |
83
+ |-----------------|---------------------------------------|--------------------------------------|
84
+ | `motor` | X/Y/Z/θ stages | `move_x / move_xy`, `setup_motor` |
85
+ | `led` | 8×8 RGB LED matrix | `setPattern`, `send_LEDMatrix_rings` |
86
+ | `laser` | 3‑channel RGB or IR lasers | `set_laser`, `set_servo` |
87
+ | `galvo` | Analogue DAC & 2‑axis scanner | `set_dac`, `set_scanner_pattern` |
88
+ | `gripper` | Micro‑gripper (servo) | `open`, `close` |
89
+ | `home` | End‑stop homing routines | `home_x`, `home_z` |
90
+ | `rotator` | Filter wheel or Dove prism | `move`, `set_speed` |
91
+ | `objective` | Piezo objective positioner | `move_z`, `calibrate` |
92
+ | `temperature` | NTC digital temperature sensor | `get_temperature` |
93
+ | `analog` | Arbitrary analogue outputs | `set_voltage` |
94
+ | `digitalout` | GPIO (TTL) outputs | `set_pin`, `pulse` |
95
+ | `wifi` | ESP32 network helpers | `scan`, `connect` |
96
+ | `message` | Generic key‑value messaging/trigger | `register_callback`, `trigger_message` |
97
+
98
+ ## Design philosophy
99
+
100
+ UC2 REST splits interaction into three JSON endpoints per device:
101
+
102
+ ```
103
+ /*_act → perform an action (e.g. move)
104
+ /*_set → configure a device (e.g. speed)
105
+ /*_get → query state (e.g. position)
106
+ ```
107
+
108
+ The Python client wraps those endpoints so you rarely deal with raw JSON.
109
+
110
+
111
+ ## Running in a browser (PyScript)
112
+
113
+ ```html
114
+ <py-config>
115
+ packages = ["uc2rest"]
116
+ </py-config>
117
+ <py-script>
118
+ from uc2rest import UC2Client
119
+ esp = UC2Client(SerialManager=pyserial_manager) # see docs
120
+ esp.led.setAll(True)
121
+ </py-script>
122
+ ```
123
+
124
+ ## Documentation & examples
125
+
126
+ * Jupyter notebook tutorial: `PYTHON/UC2_REST_Tutorial_v0.ipynb`
127
+ * Example scripts: `examples/` directory (motor scan, laser modulation, timelapse)
128
+ * Firmware sources and hardware guides: <https://github.com/openUC2>
129
+
130
+ ## Troubleshooting
131
+
132
+ | Symptom | Fix |
133
+ |------------------------------|-----|
134
+ | `serial.serialutil.SerialException` | Check port name and permissions (`sudo adduser $USER dialout`) |
135
+ | No JSON response / timeout | Increase `timeout` argument; verify baud rate matches firmware |
136
+
137
+ ## Contributing
138
+
139
+ 1. Fork the repo and create a feature branch.
140
+ 2. Follow the `pre‑commit` checks (`black`, `isort`, `flake8`).
141
+ 3. Create pull requests against `develop`.
142
+
143
+ Please open issues for bugs or feature requests.
144
+
145
+ ## License
146
+
147
+ MIT — see `LICENSE` for details.
148
+
149
+ ---
150
+
151
+ Made with 💚 by the OpenUC2 community.
@@ -0,0 +1,120 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/bionanoimaging/UC2-GIT/master/IMAGES/UC2_logo_text.png" width="320" alt="UC2 logo">
3
+ </p>
4
+
5
+ # UC2‑Python Client
6
+
7
+ Python interface to the **UC2 REST** micro‑controller firmware — control motors, lasers, LED matrices, galvos and more over USB‑Serial or Wi‑Fi from any Python environment.
8
+
9
+ ## Highlights
10
+
11
+ - **Plug‑and‑play connection** via USB (`/dev/ttyUSB*`, `COM*`) or TCP (`host`, `port`).
12
+ - **Rich device model**: every hardware block is a Python object with high‑level helpers (e.g. `motor.move_x`, `led.setPattern`, `laser.set_laser`).
13
+ - **Asynchronous & blocking modes** for precise timing or maximum throughput.
14
+ - **Callback hooks** to react to hardware feedback in real time.
15
+ - **Runs everywhere**: desktop Python, headless Raspberry Pi, or in‑browser with PyScript.
16
+ - **LGPL‑3.0‑or‑later** license – use it in academic and commercial projects.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install uc2rest # latest release
22
+ # or for the bleeding‑edge version
23
+ pip install git+https://github.com/openUC2/UC2-REST.git#subdirectory=PYTHON
24
+ ```
25
+
26
+ Dependencies (`requests`, `numpy`, `pyserial`) are resolved automatically.
27
+
28
+ ## Quick start
29
+
30
+ ```python
31
+ import uc2rest
32
+
33
+ # USB example
34
+ esp = uc2rest.UC2Client(serialport="/dev/ttyUSB0") # Linux / Mac OS
35
+ # esp = uc2rest.UC2Client(serialport="COM3") # Windows
36
+ # Wi‑Fi example
37
+ # esp = uc2rest.UC2Client(host="192.168.4.1", port=31950)
38
+
39
+ # LED matrix: switch all pixels on at half intensity
40
+ esp.led.setAll(True, intensity=128)
41
+
42
+ # Move X axis by 1 mm (1000 steps @ 1 kHz)
43
+ esp.motor.move_x(steps=1000, speed=1000, is_blocking=True)
44
+
45
+ # Turn green laser to full power
46
+ esp.laser.set_laser(channel="G", value=255)
47
+ ```
48
+
49
+ ## Supported modules (automatically attached to `UC2Client`) citeturn1file12
50
+
51
+ | Object | Purpose | Example method(s) |
52
+ |-----------------|---------------------------------------|--------------------------------------|
53
+ | `motor` | X/Y/Z/θ stages | `move_x / move_xy`, `setup_motor` |
54
+ | `led` | 8×8 RGB LED matrix | `setPattern`, `send_LEDMatrix_rings` |
55
+ | `laser` | 3‑channel RGB or IR lasers | `set_laser`, `set_servo` |
56
+ | `galvo` | Analogue DAC & 2‑axis scanner | `set_dac`, `set_scanner_pattern` |
57
+ | `gripper` | Micro‑gripper (servo) | `open`, `close` |
58
+ | `home` | End‑stop homing routines | `home_x`, `home_z` |
59
+ | `rotator` | Filter wheel or Dove prism | `move`, `set_speed` |
60
+ | `objective` | Piezo objective positioner | `move_z`, `calibrate` |
61
+ | `temperature` | NTC digital temperature sensor | `get_temperature` |
62
+ | `analog` | Arbitrary analogue outputs | `set_voltage` |
63
+ | `digitalout` | GPIO (TTL) outputs | `set_pin`, `pulse` |
64
+ | `wifi` | ESP32 network helpers | `scan`, `connect` |
65
+ | `message` | Generic key‑value messaging/trigger | `register_callback`, `trigger_message` |
66
+
67
+ ## Design philosophy
68
+
69
+ UC2 REST splits interaction into three JSON endpoints per device:
70
+
71
+ ```
72
+ /*_act → perform an action (e.g. move)
73
+ /*_set → configure a device (e.g. speed)
74
+ /*_get → query state (e.g. position)
75
+ ```
76
+
77
+ The Python client wraps those endpoints so you rarely deal with raw JSON.
78
+
79
+
80
+ ## Running in a browser (PyScript)
81
+
82
+ ```html
83
+ <py-config>
84
+ packages = ["uc2rest"]
85
+ </py-config>
86
+ <py-script>
87
+ from uc2rest import UC2Client
88
+ esp = UC2Client(SerialManager=pyserial_manager) # see docs
89
+ esp.led.setAll(True)
90
+ </py-script>
91
+ ```
92
+
93
+ ## Documentation & examples
94
+
95
+ * Jupyter notebook tutorial: `PYTHON/UC2_REST_Tutorial_v0.ipynb`
96
+ * Example scripts: `examples/` directory (motor scan, laser modulation, timelapse)
97
+ * Firmware sources and hardware guides: <https://github.com/openUC2>
98
+
99
+ ## Troubleshooting
100
+
101
+ | Symptom | Fix |
102
+ |------------------------------|-----|
103
+ | `serial.serialutil.SerialException` | Check port name and permissions (`sudo adduser $USER dialout`) |
104
+ | No JSON response / timeout | Increase `timeout` argument; verify baud rate matches firmware |
105
+
106
+ ## Contributing
107
+
108
+ 1. Fork the repo and create a feature branch.
109
+ 2. Follow the `pre‑commit` checks (`black`, `isort`, `flake8`).
110
+ 3. Create pull requests against `develop`.
111
+
112
+ Please open issues for bugs or feature requests.
113
+
114
+ ## License
115
+
116
+ MIT — see `LICENSE` for details.
117
+
118
+ ---
119
+
120
+ Made with 💚 by the OpenUC2 community.
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: UC2-REST
3
+ Version: 0.2.0.26
4
+ Summary: This pacage will help you to drive the ESP32-driven microscopy control modules from UC2
5
+ Home-page: https://github.com/openUC2/UC2-REST
6
+ Author: Benedict Diederich
7
+ Author-email: benedictdied@gmail.com
8
+ License: GPL v3
9
+ Keywords: UC2REST API to control ESP32-driven microscopy control boards
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: numpy
17
+ Requires-Dist: requests
18
+ Requires-Dist: pyserial
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license
27
+ Dynamic: license-file
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ <p align="center">
33
+ <img src="https://raw.githubusercontent.com/bionanoimaging/UC2-GIT/master/IMAGES/UC2_logo_text.png" width="320" alt="UC2 logo">
34
+ </p>
35
+
36
+ # UC2‑Python Client
37
+
38
+ Python interface to the **UC2 REST** micro‑controller firmware — control motors, lasers, LED matrices, galvos and more over USB‑Serial or Wi‑Fi from any Python environment.
39
+
40
+ ## Highlights
41
+
42
+ - **Plug‑and‑play connection** via USB (`/dev/ttyUSB*`, `COM*`) or TCP (`host`, `port`).
43
+ - **Rich device model**: every hardware block is a Python object with high‑level helpers (e.g. `motor.move_x`, `led.setPattern`, `laser.set_laser`).
44
+ - **Asynchronous & blocking modes** for precise timing or maximum throughput.
45
+ - **Callback hooks** to react to hardware feedback in real time.
46
+ - **Runs everywhere**: desktop Python, headless Raspberry Pi, or in‑browser with PyScript.
47
+ - **LGPL‑3.0‑or‑later** license – use it in academic and commercial projects.
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ pip install uc2rest # latest release
53
+ # or for the bleeding‑edge version
54
+ pip install git+https://github.com/openUC2/UC2-REST.git#subdirectory=PYTHON
55
+ ```
56
+
57
+ Dependencies (`requests`, `numpy`, `pyserial`) are resolved automatically.
58
+
59
+ ## Quick start
60
+
61
+ ```python
62
+ import uc2rest
63
+
64
+ # USB example
65
+ esp = uc2rest.UC2Client(serialport="/dev/ttyUSB0") # Linux / Mac OS
66
+ # esp = uc2rest.UC2Client(serialport="COM3") # Windows
67
+ # Wi‑Fi example
68
+ # esp = uc2rest.UC2Client(host="192.168.4.1", port=31950)
69
+
70
+ # LED matrix: switch all pixels on at half intensity
71
+ esp.led.setAll(True, intensity=128)
72
+
73
+ # Move X axis by 1 mm (1000 steps @ 1 kHz)
74
+ esp.motor.move_x(steps=1000, speed=1000, is_blocking=True)
75
+
76
+ # Turn green laser to full power
77
+ esp.laser.set_laser(channel="G", value=255)
78
+ ```
79
+
80
+ ## Supported modules (automatically attached to `UC2Client`) citeturn1file12
81
+
82
+ | Object | Purpose | Example method(s) |
83
+ |-----------------|---------------------------------------|--------------------------------------|
84
+ | `motor` | X/Y/Z/θ stages | `move_x / move_xy`, `setup_motor` |
85
+ | `led` | 8×8 RGB LED matrix | `setPattern`, `send_LEDMatrix_rings` |
86
+ | `laser` | 3‑channel RGB or IR lasers | `set_laser`, `set_servo` |
87
+ | `galvo` | Analogue DAC & 2‑axis scanner | `set_dac`, `set_scanner_pattern` |
88
+ | `gripper` | Micro‑gripper (servo) | `open`, `close` |
89
+ | `home` | End‑stop homing routines | `home_x`, `home_z` |
90
+ | `rotator` | Filter wheel or Dove prism | `move`, `set_speed` |
91
+ | `objective` | Piezo objective positioner | `move_z`, `calibrate` |
92
+ | `temperature` | NTC digital temperature sensor | `get_temperature` |
93
+ | `analog` | Arbitrary analogue outputs | `set_voltage` |
94
+ | `digitalout` | GPIO (TTL) outputs | `set_pin`, `pulse` |
95
+ | `wifi` | ESP32 network helpers | `scan`, `connect` |
96
+ | `message` | Generic key‑value messaging/trigger | `register_callback`, `trigger_message` |
97
+
98
+ ## Design philosophy
99
+
100
+ UC2 REST splits interaction into three JSON endpoints per device:
101
+
102
+ ```
103
+ /*_act → perform an action (e.g. move)
104
+ /*_set → configure a device (e.g. speed)
105
+ /*_get → query state (e.g. position)
106
+ ```
107
+
108
+ The Python client wraps those endpoints so you rarely deal with raw JSON.
109
+
110
+
111
+ ## Running in a browser (PyScript)
112
+
113
+ ```html
114
+ <py-config>
115
+ packages = ["uc2rest"]
116
+ </py-config>
117
+ <py-script>
118
+ from uc2rest import UC2Client
119
+ esp = UC2Client(SerialManager=pyserial_manager) # see docs
120
+ esp.led.setAll(True)
121
+ </py-script>
122
+ ```
123
+
124
+ ## Documentation & examples
125
+
126
+ * Jupyter notebook tutorial: `PYTHON/UC2_REST_Tutorial_v0.ipynb`
127
+ * Example scripts: `examples/` directory (motor scan, laser modulation, timelapse)
128
+ * Firmware sources and hardware guides: <https://github.com/openUC2>
129
+
130
+ ## Troubleshooting
131
+
132
+ | Symptom | Fix |
133
+ |------------------------------|-----|
134
+ | `serial.serialutil.SerialException` | Check port name and permissions (`sudo adduser $USER dialout`) |
135
+ | No JSON response / timeout | Increase `timeout` argument; verify baud rate matches firmware |
136
+
137
+ ## Contributing
138
+
139
+ 1. Fork the repo and create a feature branch.
140
+ 2. Follow the `pre‑commit` checks (`black`, `isort`, `flake8`).
141
+ 3. Create pull requests against `develop`.
142
+
143
+ Please open issues for bugs or feature requests.
144
+
145
+ ## License
146
+
147
+ MIT — see `LICENSE` for details.
148
+
149
+ ---
150
+
151
+ Made with 💚 by the OpenUC2 community.
@@ -22,7 +22,6 @@ uc2rest/gripper.py
22
22
  uc2rest/home.py
23
23
  uc2rest/laser.py
24
24
  uc2rest/ledmatrix.py
25
- uc2rest/ledmatrix_.py
26
25
  uc2rest/logger.py
27
26
  uc2rest/message.py
28
27
  uc2rest/modules.py
@@ -6,7 +6,7 @@ __version__.py
6
6
 
7
7
  __title__ = 'UC2-REST'
8
8
  __description__ = 'This pacage will help you to drive the ESP32-driven microscopy control modules from UC2'
9
- __version__ = "v0.2.0.24"
9
+ __version__ = "v0.2.0.26"
10
10
  __author__ = 'Benedict Diederich'
11
11
  __author_email__ = 'benedictdied@gmail.com'
12
12
  __license__ = 'GPL v3'
@@ -1,4 +1,8 @@
1
- from PIL import Image
1
+ try:
2
+ from PIL import Image
3
+ IS_IMAGE = True
4
+ except ImportError:
5
+ IS_IMAGE = False
2
6
  import base64
3
7
  import io
4
8
  import numpy as np
@@ -60,10 +60,8 @@ class Serial:
60
60
  if IS_SERIAL:
61
61
  self.serialdevice= self.openDevice(port, baudrate)
62
62
  else:
63
- self.serialdevice = MockSerial(port, baudrate, timeout=timeout)
64
- self.is_connected = False
65
- self.manufacturer = "UC2Mock"
66
- self._logger.debug("You have to ensure that the serial device is connected to the computer!")
63
+ ''' this is most likely happening because we work under pyoidide '''
64
+ self._logger.debug("You have to provide the serial interface on your own")
67
65
 
68
66
  def breakCurrentCommunication(self):
69
67
  self.resetLastCommand = True