PIR motion sensor, Arduino, Processing, not working

Yes, from what I see, you need to do:

  1. In Processing, remove the noLoop() reference. You want to keep looping checking for incoming values
  2. I will add a println(myString) in your serial event to check what you receive. More like sanity check while developing.
  3. In your ino code, you need to add a delay between your transitions. This will not affect then end effect of your code but it will help in debugging.

Check this previous post that seems to be related to what you are doing.

Kf

1 Like