File "base/stepmotor.py", line 1, in __init__ ValueError: invalid pin
-
Hi everyone
I am trying to use an Atomic stepmotor base (SKU:A132) with an Atom lite (SKU:C008) Uiflow2.0 (v2.2.8) but it does not work.
I get this error message :
File "base/stepmotor.py", line 1, in init ValueError: invalid pin
I think pins are sets correctly :base_stepmotor = AtomicStepmotorBase(22, 23, 19, 25, 21)
I do not understand why it's throwing error and what i am doing wrong ?
-
Hello @Schnoble
you are not doing anything wrong I think. The issue is with UIFlow2 firmware for M5AtomLite. As far as I can tell the default pins are for M5AtomS3 (Lite) and there is one additional pin, which cannot be set from the init block and it is set to a GPIO (8) only available in S3. See here.
BTW: I've created a PR for the issue. So hopefully it will be fixed in a future firmware version.
Thanks
Felix -
Thanks @felmue
Let's hope -
For what it worth, I make it work by switching to micropython and replacing
from base import AtomicStepmotorBase
by a modified version of stepmotor.py before downloading the code
If you like using blockly, you need to paste modification each time though...
-
Hello @Schnoble
clever! Maybe you could put your modified version into an
Execute mpy code (eg. import)
? This block can be found underSystem
.Thanks
Felix