Im trying to use the read function from the pigpio library inside of a pigpiod script. Here is how:
detect = pi.store_script('tag 1 inr p0 r4 jp 1 tag 2 r 4 jz 2 tag 3 inr p1 r 4 jp 3 jmp 1')
My problem: the jp command does not account the read on gpio 4 as a value in any way and i cant figure out how to alter a parameter or variable according to what "r 4" outputs. To make things clear: I am trying make my script increase p0 every loop while a Button connected to gpio 4 is pressed and continue with the script after the button has been released. But my script simply doesnt change its outcome if i press the button or if i dont.