This Class implements the Resistor, having the following parameters: ‘+’ : Resistor end at positive potential ‘-‘ : Resistor end at negative potential ‘r’ : Resistance value ‘i’ : Current flowing through the resistor
>>> from BinPy import *
>>> params = {'r':5}
>>> r = Resistor(params)
>>> r.getParams()
{'i': 0, '+': 0, 'r': 5, '-': 0}
>>> r.setVoltage(Connector(5), Connector(0))
{'i': 1.0, '+': 5, 'r': 5, '-': 0}
>>> r.setCurrent(10)
{'i': 10, '+': 50, 'r': 5, '-': 0}
>>> r.setResistance(10)
{'i': 5.0, '+': 50, 'r': 10, '-': 0}
Bases: BinPy.Analog.source.Source