YunTemp.helpers package

Submodules

YunTemp.helpers.yuntemp module

Simulate the YunTemp.

This is an extremely simple server that might be used for testing the arduino webserver interface. It is based on flask. So before running it, you should run a

pip install flask, flask_basicauth

If you want to run it you can just start it through:

python yuntemp.py

This will open a test server on 127.0.0.1:5001. You can then adress it with the requests package.

> r = requests.get('http://127.0.0.1:5001/arduino/read/all/')
> r.text
'setpoint, input, error, output, G, tauI, tauD <br />0,719,0,0,0,0,0'
YunTemp.helpers.yuntemp.get_temp()[source]

Read out all properties from the arduino.

Calculates back some random value and gives back whatever was set.

Returns

a text string.

YunTemp.helpers.yuntemp.set_differential(n_val)[source]

Set the D of the temp control.

Parameters

n_val – The D value that is chosen.

Returns

a text string.

YunTemp.helpers.yuntemp.set_gain(n_val)[source]

Set the proportional of the temp control.

Parameters

n_val – The P value that is chosen.

Returns

a text string.

YunTemp.helpers.yuntemp.set_integral(n_val)[source]

Set the integrator of the temp control.

Parameters

n_val – The integral value that is chosen.

Returns

a text string.

YunTemp.helpers.yuntemp.set_setpoint(n_val)[source]

Set the setpoint of the temp control.

Parameters

n_val – The setpoint that is chosen.

Returns

a text string.

Module contents

Helper files to set up and test the YunTemp.