I have to use pigpiod
, pi.hardware_PWM()
as it gives me beautiful squrewave.
I've created a webserver, in which I use flask
and flask-wtf
. I fetch the number from the user with IntegerField
, which I would like to use as a PWM control number.
However I get an error message:
error: cannot convert argument to integer extents = [struct.pack("I", PWMduty)]
I tried to make the number an integer with int(variable name)
, but this gives an error message as well.
TypeError: int() argument must be a string or a number, not 'IntegerField' pi.hardware_PWM(12, 200, int(form.one_white))
What am I doing wrong?