PIR motion sensor, Arduino, Processing, not working

Hello,

This is not correct:

import [processing.video](https://processing.video/).*;

noLoop() reference states :

Stops Processing from continuously executing the code within **draw()

I commented this out.

A serial connection may reboot Arduino (depends on the Arduino; watch for this) and I always add a:
delay(1000);
at the end of setup.

I moved:
//println(myString);
to the serialEvent() so it only updated when there was a serial event.

You should format code before posting:
https://discourse.processing.org/faq#format-your-code

  • The double spacing made this difficult to read.
  • Processing and Arduino IDE have an Auto Format that can be used.

It worked here with my video after I made changes above.

:slight_smile:

1 Like