Releases: JuanBindez/ohmslaw
Releases Β· JuanBindez/ohmslaw
Ohmslaw 2.1.2 Released
Release Notes
- updated docs
- updated cli.py which still had the old methods
Full Changelog: v2.1.1...v2.1.2
Ohmslaw 2.0.0 Released
Release Notes
- removed the "find_resistor" and "best_combinations" methods
- now ohmslaw only has the
volts
,current
,resistance
,watts
,series
, andparallel
methods.
Full Changelog: v1.3.1...v2.0.0
Ohmslaw 1.3.1 Released
Release Notes:
- Fixed the current calculation to properly account for the total resistance.
- Adjusted the voltage drop calculation to correctly determine the voltage across the component.
- Ensured the resulting voltage matches the desired component voltage.
- Verified functionality with example values, producing the correct resistor combination and voltage output.
Full Changelog: v1.2.0...v1.3.1
Ohmslaw 1.2.0 Released
Release Notes
With this new method you find the appropriate combination for your component
>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>>
>>> SOURCE_VOLTAGE = 48
>>> COMPONENT_VOLTAGE = 3
>>> COMPONENT_CURRENT = 0.02 # Desired current for the component (e.g., LED)
>>>
>>> resistors = [200, 44, 350, 3, 1200, 500]
>>>
>>> best_combination, resulting_voltage = o.best_combination(SOURCE_VOLTAGE, COMPONENT_VOLTAGE, COMPONENT_CURRENT, resistors)
>>>
>>> print(f"Best combination of resistors: {best_combination}")
Best combination of resistors: (3,)
>>> print(f"Resulting voltage on the component: {resulting_voltage:.2f}V")
Resulting voltage on the component: 0.94V
>>>
Full Changelog: v1.1.0...v1.2.0
Ohmslaw 1.1.0 Released
Release Notes
In this version, methods have been added, now you can calculate resistors in series and in parallel
To return resistor value in parallel, simply pass the resistors as an argument in the parallel method
>>>from ohmslaw import Ohms
>>>
>>>R1, R2, R3 = 280, 450, 100
>>>
>>>o = Ohms()
>>>
>>>parallel = o.parallel(R1, R2, R3)
>>>
>>>print("Resistor in parallel = ", parallel)
Resistors in parallel = 63.31658291457286
>>>
you can calculate the resistors in series, passing the values ββin the series() method:
>>>from ohmslaw import Ohms
>>>
>>>R1, R2, R3 = 280, 450, 100
>>>
>>>o = Ohms()
>>>
>>>series = o.series(R1, R2, R3)
>>>
>>>print("Resistors in series = ", series)
Resistors in series = 830
>>>
Full Changelog: v1.0.0...v1.1.0
Ohmslaw 1.0.0 Released
Release Notes:
Initial version with
- calculation to find the values ββof Voltage, Amperage, Resistance, and Find the Value of a resistor for an electrical circuit
example
current multiplied by resistance = voltage
>>> o = Ohms()
>>> results = o.volts(I=12, R=4)
>>>
>>> print(results)
48
>>>
Full Changelog: https://github.com/JuanBindez/ohmslaw/commits/v1.0.0