Page 1 of 1

Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 15:03
by pw444
Hya,

tried the following rule with plugin P048

Code: Select all

On System#Boot do    //When the ESP boots, do
  let,1,0
  let,2,0
  logentry, "start"
endon


on OPEN#status do
   if %eventvalue%=1
      logentry,"forward"
      let,1,1
      MotorShieldCMD,DCMotor,4,Forward,100
    else
      logentry,"backward"
      let,1,0
     MotorShieldCMD,DCMotor,4,Backward,100
   endif
endon
problem: event OPEN#status NEVER reaches.

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 15:16
by Ath
How do you expect that event to be triggered? By a button, external command, other...?

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 15:18
by pw444
button, OPEN ;-)

seams that

Code: Select all

MotorShieldCMD,DCMotor,4,Forward,100
takes over and nothing else works.

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 15:22
by Ath
By default the Value for a Switch device is named State, you have used status, could that be a typo/mistake?
Edit: Aha, now I see the names on the screenshot. So no typo.

Do you have a serial log of the unit?

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 15:23
by pw444
no. see the screen print.

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 16:46
by pw444
Got it working. A bad cable caused the mess.

Thx!

Re: Adafruit Shield Motor V2 problems

Posted: 20 Mar 2021, 18:37
by Ath
pw444 wrote: 20 Mar 2021, 16:46 Got it working. A bad cable caused the mess.
That was the next question I had in mind.

Great it is fixed.