0.1.1 • Published 11 months ago

@cobular/resist-o-calc v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Resist-O-Matic

A simple, helpful WASM library to calculate one thing: what pair of normal e-series resistors gets you closest to the desired resistance you want for some resistor divider?

A component of https://resist.cobular.com, inspired by https://damien.douxchamps.net/elec/resdiv/, but re-implemented because who has time to hit a button and have a page load!?

Docs

type TsResistorSets = "E3" | "E6" | "E12" | "E24";

interface ResistorPair {
  top_val: number,
  bottom_val: number,
}
type ResistorPairs = ResistorPair[];

export function find_by_voltage(v1: number, v2: number, resistor_set: TsResistorSets): ResistorPairs;

find_by_voltage returns the

0.1.1

11 months ago

0.1.0

11 months ago