p5control.drivers.exampleinst
Test driver to illustrate the inner workings of p5control.
- class p5control.drivers.exampleinst.ExampleInst(name: str)
Bases:
BaseDriverRepresents an instrument which magically measures a sine wave. Both the frequency and the amplitude can be changed.
- Parameters:
name (str) – name for this instance
- open()
Just logs the call to debug.
- close()
Just logs the call to debug.
- get_status()
Returns the current amplitude and frequency.
- start_measuring()
Start the measurement. Saves the current time such that we can keep track of how much time has passed when
ExampleInst.get_data()gets called.
- get_data()
Calculates sine wave over the time passed since the last call and adds some noise to it.
- setAmplitude(value: float)
Set amplitude to
value.
- setFrequency(value: float)
Set frequency to
value.