Arduino Input and P5.JS

Screen Shot 2021-10-26 at 4.57.59 PM.png

懵逼的欣欣头 2021-10-10 17.38.39.mp4

1635281590884343.mp4

1635348805905837.mp4

Difference between mousePressed and buttonPressed

I try to keep the state of the screen when the buttonPressed. I try to transfer the state of the mousePressed to the buttonPressed but found the button can't keep the true or false state as mousePressed did.

Screen Recording 2021-10-26 at 5.44.38 PM.mov

Screen Shot 2021-10-26 at 5.49.34 PM.png

Screen Shot 2021-10-26 at 5.37.55 PM.png

1635285111226172.mp4

1635285491093757.mp4

reference

Screen Shot 2021-10-26 at 6.15.59 PM.png