Barmaja-PyArduino 2.0.0__py3-none-any.whl

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 (87) hide show
  1. Barmaja_PyArduino/BARMAJA_PyArduino.ico +0 -0
  2. Barmaja_PyArduino/__init__.py +528 -0
  3. Barmaja_PyArduino/__init__.pyi +331 -0
  4. Barmaja_PyArduino/__main__.py +2 -0
  5. Barmaja_PyArduino/adapters/__init__.py +35 -0
  6. Barmaja_PyArduino/api_registry.py +459 -0
  7. Barmaja_PyArduino/backend/__init__.py +3 -0
  8. Barmaja_PyArduino/backend/uno_cpp.py +1680 -0
  9. Barmaja_PyArduino/board.py +80 -0
  10. Barmaja_PyArduino/cli.py +223 -0
  11. Barmaja_PyArduino/compiler.py +1721 -0
  12. Barmaja_PyArduino/console.py +217 -0
  13. Barmaja_PyArduino/device_packs.py +367 -0
  14. Barmaja_PyArduino/device_packs_builtin/Button/arduino/Barmaja_Button/library.properties +9 -0
  15. Barmaja_PyArduino/device_packs_builtin/Button/arduino/Barmaja_Button/src/Barmaja_Button.h +18 -0
  16. Barmaja_PyArduino/device_packs_builtin/Button/example.py +10 -0
  17. Barmaja_PyArduino/device_packs_builtin/Button/pack.json +40 -0
  18. Barmaja_PyArduino/device_packs_builtin/ClockDS3231/arduino/Barmaja_ClockDS3231/library.properties +9 -0
  19. Barmaja_PyArduino/device_packs_builtin/ClockDS3231/arduino/Barmaja_ClockDS3231/src/Barmaja_ClockDS3231.h +20 -0
  20. Barmaja_PyArduino/device_packs_builtin/ClockDS3231/example.py +8 -0
  21. Barmaja_PyArduino/device_packs_builtin/ClockDS3231/pack.json +136 -0
  22. Barmaja_PyArduino/device_packs_builtin/DistanceVL53L0X/arduino/Barmaja_DistanceVL53L0X/library.properties +9 -0
  23. Barmaja_PyArduino/device_packs_builtin/DistanceVL53L0X/arduino/Barmaja_DistanceVL53L0X/src/Barmaja_DistanceVL53L0X.h +12 -0
  24. Barmaja_PyArduino/device_packs_builtin/DistanceVL53L0X/example.py +8 -0
  25. Barmaja_PyArduino/device_packs_builtin/DistanceVL53L0X/pack.json +48 -0
  26. Barmaja_PyArduino/device_packs_builtin/LCDParallel/arduino/Barmaja_LCDParallel/library.properties +9 -0
  27. Barmaja_PyArduino/device_packs_builtin/LCDParallel/arduino/Barmaja_LCDParallel/src/Barmaja_LCDParallel.h +17 -0
  28. Barmaja_PyArduino/device_packs_builtin/LCDParallel/example.py +10 -0
  29. Barmaja_PyArduino/device_packs_builtin/LCDParallel/pack.json +137 -0
  30. Barmaja_PyArduino/device_packs_builtin/LoadCellHX711/arduino/Barmaja_LoadCellHX711/library.properties +9 -0
  31. Barmaja_PyArduino/device_packs_builtin/LoadCellHX711/arduino/Barmaja_LoadCellHX711/src/Barmaja_LoadCellHX711.h +16 -0
  32. Barmaja_PyArduino/device_packs_builtin/LoadCellHX711/example.py +11 -0
  33. Barmaja_PyArduino/device_packs_builtin/LoadCellHX711/pack.json +74 -0
  34. Barmaja_PyArduino/device_packs_builtin/NeoPixelStrip/arduino/Barmaja_NeoPixelStrip/library.properties +9 -0
  35. Barmaja_PyArduino/device_packs_builtin/NeoPixelStrip/arduino/Barmaja_NeoPixelStrip/src/Barmaja_NeoPixelStrip.h +15 -0
  36. Barmaja_PyArduino/device_packs_builtin/NeoPixelStrip/example.py +13 -0
  37. Barmaja_PyArduino/device_packs_builtin/NeoPixelStrip/pack.json +114 -0
  38. Barmaja_PyArduino/device_packs_builtin/OLEDText/arduino/Barmaja_OLEDText/library.properties +9 -0
  39. Barmaja_PyArduino/device_packs_builtin/OLEDText/arduino/Barmaja_OLEDText/src/Barmaja_OLEDText.h +21 -0
  40. Barmaja_PyArduino/device_packs_builtin/OLEDText/example.py +9 -0
  41. Barmaja_PyArduino/device_packs_builtin/OLEDText/pack.json +103 -0
  42. Barmaja_PyArduino/device_packs_builtin/PressureBMP280/arduino/Barmaja_PressureBMP280/library.properties +9 -0
  43. Barmaja_PyArduino/device_packs_builtin/PressureBMP280/arduino/Barmaja_PressureBMP280/src/Barmaja_PressureBMP280.h +16 -0
  44. Barmaja_PyArduino/device_packs_builtin/PressureBMP280/example.py +8 -0
  45. Barmaja_PyArduino/device_packs_builtin/PressureBMP280/pack.json +92 -0
  46. Barmaja_PyArduino/device_packs_builtin/RotaryEncoder/arduino/Barmaja_RotaryEncoder/library.properties +9 -0
  47. Barmaja_PyArduino/device_packs_builtin/RotaryEncoder/arduino/Barmaja_RotaryEncoder/src/Barmaja_RotaryEncoder.h +18 -0
  48. Barmaja_PyArduino/device_packs_builtin/RotaryEncoder/example.py +10 -0
  49. Barmaja_PyArduino/device_packs_builtin/RotaryEncoder/pack.json +44 -0
  50. Barmaja_PyArduino/device_packs_builtin/ServoDriverPCA9685/arduino/Barmaja_ServoDriverPCA9685/library.properties +9 -0
  51. Barmaja_PyArduino/device_packs_builtin/ServoDriverPCA9685/arduino/Barmaja_ServoDriverPCA9685/src/Barmaja_ServoDriverPCA9685.h +15 -0
  52. Barmaja_PyArduino/device_packs_builtin/ServoDriverPCA9685/example.py +10 -0
  53. Barmaja_PyArduino/device_packs_builtin/ServoDriverPCA9685/pack.json +117 -0
  54. Barmaja_PyArduino/device_packs_builtin/ShiftRegister595/arduino/Barmaja_ShiftRegister595/library.properties +9 -0
  55. Barmaja_PyArduino/device_packs_builtin/ShiftRegister595/arduino/Barmaja_ShiftRegister595/src/Barmaja_ShiftRegister595.h +14 -0
  56. Barmaja_PyArduino/device_packs_builtin/ShiftRegister595/example.py +9 -0
  57. Barmaja_PyArduino/device_packs_builtin/ShiftRegister595/pack.json +83 -0
  58. Barmaja_PyArduino/device_packs_builtin/TemperatureDS18B20/arduino/Barmaja_TemperatureDS18B20/library.properties +9 -0
  59. Barmaja_PyArduino/device_packs_builtin/TemperatureDS18B20/arduino/Barmaja_TemperatureDS18B20/src/Barmaja_TemperatureDS18B20.h +16 -0
  60. Barmaja_PyArduino/device_packs_builtin/TemperatureDS18B20/example.py +8 -0
  61. Barmaja_PyArduino/device_packs_builtin/TemperatureDS18B20/pack.json +63 -0
  62. Barmaja_PyArduino/doctor.py +406 -0
  63. Barmaja_PyArduino/environment.py +595 -0
  64. Barmaja_PyArduino/errors.py +166 -0
  65. Barmaja_PyArduino/flow.py +754 -0
  66. Barmaja_PyArduino/frontend.py +611 -0
  67. Barmaja_PyArduino/installer.py +151 -0
  68. Barmaja_PyArduino/ir.py +660 -0
  69. Barmaja_PyArduino/library_adder.py +440 -0
  70. Barmaja_PyArduino/live.py +859 -0
  71. Barmaja_PyArduino/lowering.py +596 -0
  72. Barmaja_PyArduino/numeric.py +748 -0
  73. Barmaja_PyArduino/pack_builder.py +544 -0
  74. Barmaja_PyArduino/py.typed +0 -0
  75. Barmaja_PyArduino/serial_monitor.py +172 -0
  76. Barmaja_PyArduino/source.py +184 -0
  77. Barmaja_PyArduino/stubgen.py +148 -0
  78. Barmaja_PyArduino/symbols.py +646 -0
  79. Barmaja_PyArduino/target.py +1631 -0
  80. Barmaja_PyArduino/toolchain.py +506 -0
  81. Barmaja_PyArduino/typesys.py +917 -0
  82. Barmaja_PyArduino/workflow.py +213 -0
  83. barmaja_pyarduino-2.0.0.dist-info/METADATA +39 -0
  84. barmaja_pyarduino-2.0.0.dist-info/RECORD +87 -0
  85. barmaja_pyarduino-2.0.0.dist-info/WHEEL +5 -0
  86. barmaja_pyarduino-2.0.0.dist-info/licenses/LICENSE.txt +7 -0
  87. barmaja_pyarduino-2.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,331 @@
1
+ # AUTO-GENERATED by Barmaja_PyArduino.stubgen from api_registry.py.
2
+ # Do not edit manually; change the registry and regenerate.
3
+ from typing import Final, TypeAlias, overload
4
+
5
+ TimeU32: TypeAlias = int
6
+ IntOrBool: TypeAlias = int | bool
7
+ NumericOrBool: TypeAlias = int | float | bool
8
+ Scalar: TypeAlias = int | float | bool | str
9
+ UltrasonicUnit: TypeAlias = int
10
+ DHTType: TypeAlias = int
11
+
12
+ HIGH: Final[int]
13
+ LOW: Final[int]
14
+ INPUT: Final[int]
15
+ OUTPUT: Final[int]
16
+ INPUT_PULLUP: Final[int]
17
+ A0: Final[int]
18
+ A1: Final[int]
19
+ A2: Final[int]
20
+ A3: Final[int]
21
+ A4: Final[int]
22
+ A5: Final[int]
23
+ DHT11: Final[int]
24
+ DHT22: Final[int]
25
+ CM: Final[int]
26
+ INC: Final[int]
27
+
28
+ def pinMode(pin: int, mode: int) -> None: ...
29
+ def digitalWrite(pin: int, value: IntOrBool) -> None: ...
30
+ def digitalRead(pin: int) -> int: ...
31
+ def analogRead(pin: int) -> int: ...
32
+ def analogWrite(pin: int, value: int) -> None: ...
33
+ def delay(milliseconds: int) -> None: ...
34
+ def millis() -> TimeU32: ...
35
+ @overload
36
+ def tone(pin: int, frequency: int) -> None: ...
37
+ @overload
38
+ def tone(pin: int, frequency: int, duration: int) -> None: ...
39
+ def noTone(pin: int) -> None: ...
40
+ def micros() -> TimeU32: ...
41
+ def delayMicroseconds(microseconds: int) -> None: ...
42
+ def map(value: int, in_min: int, in_max: int, out_min: int, out_max: int) -> int: ...
43
+ def constrain(value: int, lower: int, upper: int) -> int: ...
44
+
45
+ class BluetoothSerial:
46
+ def __init__(self, rx_pin: int, tx_pin: int) -> None: ...
47
+ def begin(self, baud: int) -> None: ...
48
+ def listen(self) -> bool: ...
49
+ def available(self) -> int: ...
50
+ def read(self) -> int: ...
51
+ def write(self, value: int) -> int: ...
52
+
53
+ class MPU6050Sensor:
54
+ def begin(self) -> bool: ...
55
+ def update(self) -> None: ...
56
+ def angleX(self) -> float: ...
57
+ def angleY(self) -> float: ...
58
+ def angleZ(self) -> float: ...
59
+ def accelX(self) -> float: ...
60
+ def accelY(self) -> float: ...
61
+ def accelZ(self) -> float: ...
62
+ def gyroX(self) -> float: ...
63
+ def gyroY(self) -> float: ...
64
+ def gyroZ(self) -> float: ...
65
+
66
+ class GPSModule:
67
+ def __init__(self, rx_pin: int, tx_pin: int) -> None: ...
68
+ def begin(self, baud: int) -> None: ...
69
+ def update(self) -> bool: ...
70
+ def hasFix(self) -> bool: ...
71
+ def latitude(self) -> float: ...
72
+ def longitude(self) -> float: ...
73
+ def satellites(self) -> int: ...
74
+
75
+ class EthernetW5500:
76
+ def __init__(self, cs_pin: int, mac0: int, mac1: int, mac2: int, mac3: int, mac4: int, mac5: int) -> None: ...
77
+ def beginIP(self,a: int,b: int,c: int,d: int) -> None: ...
78
+ def connect(self,a: int,b: int,c: int,d: int,port: int) -> bool: ...
79
+ def connected(self) -> bool: ...
80
+ def write(self, value: int) -> int: ...
81
+ def available(self) -> int: ...
82
+ def read(self) -> int: ...
83
+ def stop(self) -> None: ...
84
+
85
+ class WiFiESPAT:
86
+ def __init__(self, rx_pin: int, tx_pin: int) -> None: ...
87
+ def begin(self, baud: int) -> None: ...
88
+ def connect(self, ssid: str, password: str) -> bool: ...
89
+ def connected(self) -> bool: ...
90
+ def tcpConnect(self,a: int,b: int,c: int,d: int,port: int) -> bool: ...
91
+ def write(self, value: int) -> int: ...
92
+ def available(self) -> int: ...
93
+ def read(self) -> int: ...
94
+ def stop(self) -> None: ...
95
+
96
+ class RFID:
97
+ def __init__(self, ss_pin: int, reset_pin: int) -> None: ...
98
+ def begin(self) -> None: ...
99
+ def readUID(self) -> str: ...
100
+
101
+ class IRRemote:
102
+ def __init__(self, receive_pin: int) -> None: ...
103
+ def begin(self) -> None: ...
104
+ def readCommand(self) -> int: ...
105
+
106
+ class Keypad4x4:
107
+ def __init__(self, r1: int,r2: int,r3: int,r4: int,c1: int,c2: int,c3: int,c4: int) -> None: ...
108
+ def getKey(self) -> str: ...
109
+
110
+ class StepperMotor:
111
+ def __init__(self, p1:int,p2:int,p3:int,p4:int) -> None: ...
112
+ def setMaxSpeed(self, speed: float) -> None: ...
113
+ def setAcceleration(self, acceleration: float) -> None: ...
114
+ def moveTo(self, target: int) -> None: ...
115
+ def move(self, relative: int) -> None: ...
116
+ def run(self) -> bool: ...
117
+ def distanceToGo(self) -> int: ...
118
+ def currentPosition(self) -> int: ...
119
+ def setCurrentPosition(self, value: int) -> None: ...
120
+
121
+ class OneWireBus:
122
+ def __init__(self, pin: int) -> None: ...
123
+ def reset(self) -> int: ...
124
+ def write(self, value: int) -> None: ...
125
+ def read(self) -> int: ...
126
+
127
+ class LEDMatrixMAX7219:
128
+ def __init__(self, data_pin: int, clk_pin: int, cs_pin: int) -> None: ...
129
+ def begin(self) -> None: ...
130
+ def clear(self) -> None: ...
131
+ def setPixel(self, row: int, column: int, on: bool) -> None: ...
132
+ def setRow(self, row: int, value: int) -> None: ...
133
+ def setBrightness(self, level: int) -> None: ...
134
+
135
+ class FourDigitTM1637:
136
+ def __init__(self, clk_pin: int, dio_pin: int) -> None: ...
137
+ def setBrightness(self, level: int) -> None: ...
138
+ def showNumber(self, value: int) -> None: ...
139
+ def clear(self) -> None: ...
140
+
141
+ class Servo:
142
+ def __init__(self) -> None: ...
143
+ @overload
144
+ def attach(self, pin: int) -> int: ...
145
+ @overload
146
+ def attach(self, pin: int, min_us: int, max_us: int) -> int: ...
147
+ def write(self, angle: int) -> None: ...
148
+ def writeMicroseconds(self, microseconds: int) -> None: ...
149
+ def read(self) -> int: ...
150
+ def detach(self) -> None: ...
151
+ def attached(self) -> bool: ...
152
+
153
+ class Ultrasonic:
154
+ def __init__(self, trigger_pin: int, echo_pin: int) -> None: ...
155
+ @overload
156
+ def read(self) -> int: ...
157
+ @overload
158
+ def read(self, unit: UltrasonicUnit) -> int: ...
159
+ def setTimeout(self, timeout: int) -> None: ...
160
+
161
+ class DHT:
162
+ def __init__(self, pin: int, sensor_type: DHTType) -> None: ...
163
+ def begin(self) -> None: ...
164
+ def readTemperature(self) -> float: ...
165
+ def readHumidity(self) -> float: ...
166
+
167
+ class LiquidCrystal_I2C:
168
+ def __init__(self, address: int, columns: int, rows: int) -> None: ...
169
+ def init(self) -> None: ...
170
+ @overload
171
+ def begin(self, columns: int, rows: int) -> None: ...
172
+ @overload
173
+ def begin(self, columns: int, rows: int, charsize: int) -> None: ...
174
+ def clear(self) -> None: ...
175
+ def home(self) -> None: ...
176
+ def setCursor(self, column: int, row: int) -> None: ...
177
+ def print(self, value: Scalar) -> None: ...
178
+ def backlight(self) -> None: ...
179
+ def noBacklight(self) -> None: ...
180
+ def display(self) -> None: ...
181
+ def noDisplay(self) -> None: ...
182
+
183
+ class _EEPROMAPI:
184
+ def read(self, address: int) -> int: ...
185
+ def write(self, address: int, value: int) -> None: ...
186
+ def update(self, address: int, value: int) -> None: ...
187
+ def length(self) -> int: ...
188
+ EEPROM: Final[_EEPROMAPI]
189
+
190
+ class _SPIAPI:
191
+ def begin(self) -> None: ...
192
+ def transfer(self, value: int) -> int: ...
193
+ def end(self) -> None: ...
194
+ SPI: Final[_SPIAPI]
195
+
196
+ class _SerialAPI:
197
+ def begin(self, baud: int) -> None: ...
198
+ @overload
199
+ def print(self, value: Scalar) -> None: ...
200
+ @overload
201
+ def print(self, value: NumericOrBool, format: int) -> None: ...
202
+ @overload
203
+ def println(self) -> None: ...
204
+ @overload
205
+ def println(self, value: Scalar) -> None: ...
206
+ @overload
207
+ def println(self, value: NumericOrBool, format: int) -> None: ...
208
+ def available(self) -> int: ...
209
+ def read(self) -> int: ...
210
+ Serial: Final[_SerialAPI]
211
+
212
+ class _WireAPI:
213
+ def begin(self) -> None: ...
214
+ def beginTransmission(self, address: int) -> None: ...
215
+ def write(self, value: int) -> int: ...
216
+ def endTransmission(self) -> int: ...
217
+ def requestFrom(self, address: int, count: int) -> int: ...
218
+ def available(self) -> int: ...
219
+ def read(self) -> int: ...
220
+ Wire: Final[_WireAPI]
221
+
222
+ def upload(path: str | None = None, *, port: str | None = None, monitor: bool | None = None) -> None: ...
223
+ def verify(path: str | None = None) -> None: ...
224
+ def show_code(path: str | None = None) -> None: ...
225
+ def LiveRun(port: str | None = None, *, auto_firmware: bool = True, debug: bool = False): ...
226
+ def LiveStop() -> None: ...
227
+
228
+ def doctor_pictoblox(*, details: bool = False) -> str: ...
229
+
230
+ # ---- device packs (generated by device_packs.render_stubs) ----
231
+ class Button:
232
+ """Push button with built-in pull-up and debounce (no resistor needed) [device pack, compile-verified]"""
233
+ def __init__(self, pin: int) -> None: ...
234
+ def isPressed(self) -> bool: ...
235
+ def wasPressed(self) -> bool: ...
236
+
237
+ class ClockDS3231:
238
+ """DS3231 real-time clock module (I2C) [device pack, compile-verified]"""
239
+ def __init__(self) -> None: ...
240
+ def begin(self) -> bool: ...
241
+ def setTime(self, year: int, month: int, day: int, hour: int, minute: int, second: int) -> None: ...
242
+ def year(self) -> int: ...
243
+ def month(self) -> int: ...
244
+ def day(self) -> int: ...
245
+ def hour(self) -> int: ...
246
+ def minute(self) -> int: ...
247
+ def second(self) -> int: ...
248
+ def temperature(self) -> float: ...
249
+ def lostPower(self) -> bool: ...
250
+
251
+ class DistanceVL53L0X:
252
+ """VL53L0X laser time-of-flight distance sensor (I2C, up to ~1.2 m) [device pack, compile-verified]"""
253
+ def __init__(self) -> None: ...
254
+ def begin(self) -> bool: ...
255
+ def readMillimeters(self) -> int: ...
256
+ def timedOut(self) -> bool: ...
257
+
258
+ class LCDParallel:
259
+ """16x2 / 20x4 character LCD wired in 4-bit parallel mode (no I2C backpack) [device pack, compile-verified]"""
260
+ def __init__(self, rs: int, en: int, d4: int, d5: int, d6: int, d7: int) -> None: ...
261
+ def begin(self, columns: int = 16, rows: int = 2) -> None: ...
262
+ def clear(self) -> None: ...
263
+ def home(self) -> None: ...
264
+ def setCursor(self, column: int, row: int) -> None: ...
265
+ def print(self, value: int | float | bool | str) -> None: ...
266
+ def println(self, value: int | float | bool | str = 0) -> None: ...
267
+
268
+ class LoadCellHX711:
269
+ """HX711 load-cell amplifier (kitchen-scale sensor) [device pack, compile-verified]"""
270
+ def __init__(self, dout_pin: int, sck_pin: int) -> None: ...
271
+ def begin(self) -> None: ...
272
+ def tare(self) -> None: ...
273
+ def setScale(self, factor: float | int) -> None: ...
274
+ def readUnits(self) -> float: ...
275
+ def isReady(self) -> bool: ...
276
+
277
+ class NeoPixelStrip:
278
+ """WS2812 / NeoPixel RGB LED strip or ring [device pack, compile-verified]"""
279
+ def __init__(self, pin: int, count: int) -> None: ...
280
+ def begin(self) -> None: ...
281
+ def setPixel(self, index: int, red: int, green: int, blue: int) -> None: ...
282
+ def setBrightness(self, level: int) -> None: ...
283
+ def clear(self) -> None: ...
284
+ def show(self) -> None: ...
285
+
286
+ class OLEDText:
287
+ """SSD1306 128x64 I2C OLED display, text mode (low memory) [device pack, compile-verified]"""
288
+ def __init__(self, address: int = 60) -> None: ...
289
+ def begin(self) -> None: ...
290
+ def clear(self) -> None: ...
291
+ def setCursor(self, column: int, row: int) -> None: ...
292
+ def setLarge(self, on: bool) -> None: ...
293
+ def print(self, value: int | float | bool | str) -> None: ...
294
+ def println(self, value: int | float | bool | str = 0) -> None: ...
295
+
296
+ class PressureBMP280:
297
+ """BMP280 temperature + air-pressure + altitude sensor (I2C) [device pack, compile-verified]"""
298
+ def __init__(self, address: int = 118) -> None: ...
299
+ def begin(self) -> bool: ...
300
+ def readTemperature(self) -> float: ...
301
+ def readPressure(self) -> float: ...
302
+ def readAltitude(self, sea_level_hpa: float | int = 1013.25) -> float: ...
303
+
304
+ class RotaryEncoder:
305
+ """Rotary encoder knob (KY-040 style) read by polling [device pack, prototype]"""
306
+ def __init__(self, clk_pin: int, dt_pin: int) -> None: ...
307
+ def position(self) -> int: ...
308
+ def reset(self) -> None: ...
309
+
310
+ class ServoDriverPCA9685:
311
+ """PCA9685 16-channel servo driver board (I2C) [device pack, compile-verified]"""
312
+ def __init__(self, address: int = 64) -> None: ...
313
+ def begin(self) -> None: ...
314
+ def setAngle(self, channel: int, angle: int) -> None: ...
315
+ def setPulse(self, channel: int, microseconds: int) -> None: ...
316
+ def off(self, channel: int) -> None: ...
317
+
318
+ class ShiftRegister595:
319
+ """74HC595 shift register (8 extra outputs from 3 pins) [device pack, compile-verified]"""
320
+ def __init__(self, data_pin: int, clock_pin: int, latch_pin: int) -> None: ...
321
+ def write(self, value: int) -> None: ...
322
+ def setPin(self, output: int, on: bool) -> None: ...
323
+ def clear(self) -> None: ...
324
+
325
+ class TemperatureDS18B20:
326
+ """DS18B20 digital temperature sensor (one-wire) [device pack, compile-verified]"""
327
+ def __init__(self, pin: int) -> None: ...
328
+ def begin(self) -> None: ...
329
+ def readCelsius(self) -> float: ...
330
+ def readFahrenheit(self) -> float: ...
331
+
@@ -0,0 +1,2 @@
1
+ from .cli import main
2
+ raise SystemExit(main())
@@ -0,0 +1,35 @@
1
+ """Library adapter metadata helpers for the Step-12 API registry."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..api_registry import HARDWARE_CLASSES, SINGLETONS
6
+
7
+
8
+ def includes_for_usage(hardware_classes: set[str], singletons: set[str]) -> tuple[str, ...]:
9
+ """Return stable, de-duplicated C++ includes for actually used adapters."""
10
+
11
+ out: list[str] = []
12
+ for class_name in sorted(hardware_classes):
13
+ spec = HARDWARE_CLASSES[class_name]
14
+ for header in spec.includes:
15
+ if header not in out:
16
+ out.append(header)
17
+ for singleton in sorted(singletons):
18
+ spec = SINGLETONS[singleton]
19
+ for header in spec.includes:
20
+ if header not in out:
21
+ out.append(header)
22
+ return tuple(out)
23
+
24
+
25
+ def dependency_ids_for_usage(hardware_classes: set[str], singletons: set[str]) -> tuple[str, ...]:
26
+ out: list[str] = []
27
+ for class_name in sorted(hardware_classes):
28
+ for dependency_id in HARDWARE_CLASSES[class_name].dependency_ids:
29
+ if dependency_id not in out:
30
+ out.append(dependency_id)
31
+ for singleton in sorted(singletons):
32
+ for dependency_id in SINGLETONS[singleton].dependency_ids:
33
+ if dependency_id not in out:
34
+ out.append(dependency_id)
35
+ return tuple(out)