Skip to content

looking for a non-standard resistor that you can't find on the shelf? how about combining some of the resistors you have? this tool does it for you!

License

Notifications You must be signed in to change notification settings

haleemyousef/Resistor-Combinations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extract the corrosponding configuration any equivalent resistance value from a given list of available resistors.
outputs into a sorted json file with keys being resistance values and configs as an array of values.
eg:
    "1000": [
        "1.0k",
        "500--500",
        "500--(1.0k||1.0k)",
        "1.5k||(1.5k--1.5k)"
    ]
the symbol "--" means in series with ...
the symbol "||" means in parallel with ...
Note: configs are usually sorted from most efficient to least efficient

GET STARTED by opening main.py and change the resistors in "resistor_inventory" array to the resistor values available to you!
TO NAME THE FILE pass a name as an argument vector (e.g. python3 ./main.py test) this will name it "test.json"
if no argument for the name is passed in, the name will be output.json
you can just as easily run it for capacitors if you want, just swap the "--" with a "||" and vice versa when you read the json file.

Goal: an efficient C implementation that can calculate for all the E24 standard resistor values on my 8gb RAM laptop without starting a fire.

About

looking for a non-standard resistor that you can't find on the shelf? how about combining some of the resistors you have? this tool does it for you!

Topics

Resources

License

Stars

Watchers

Forks

Languages