Python: Nächstniedrigeren Normwiderstand finden mit UliEngineering
Du kannst leicht den nächstniedrigeren Normwiderstandswert mit der UliEngineering-Python-Bibliothek finden:
next_lower_resistor.py
from UliEngineering.Electronics.Resistors import *
from UliEngineering.EngineerIO import *
# Nächstniedrigeren E96-Widerstandswert für 1,5k finden
resistor = next_lower_resistor("1.5k")
print(f"Nächstniedriger als 1,5k: {format_value(resistor, 'Ω')}")
# Nächstniedrigeren E24-Widerstandswert für 120Ω finden
resistor = next_lower_resistor("120Ω", sequence=e24)
print(f"Nächstniedriger als 120Ω (E24): {format_value(resistor, 'Ω')}")Beispielausgabe
next_lower_resistor_output.txt
Nächstniedriger als 1,5k: 1.47 kΩ
Nächstniedriger als 120Ω (E24): 100 ΩDie Funktion next_lower_resistor() findet den nächstniedrigeren Normwiderstandswert aus der angegebenen E-Reihe (Standard ist E96).
Check out similar posts by category:
Electronics, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow