@alexandros said:

Answer 1: The current code looks better than the one you posted above it (which is apparently something I've used, hopefully in my tutorial and not the book...),

It is from the tutorial and I believe it was fine in a stepwise educational context. (Why I posted it was because the variables inside the else if() are treated differently. Wild guess that it could be a problem.)

Thank you so much for that you took time to help me on this. However, this problem does not exist in the old tutorial code(!).

Look here

no_crash.png

I send two updates per millisecond and still no crash. The Pd console reports errors. Pd still works as normal. This is the codes (Arduino and Pd) from your tutorial.

When using the new codes (both Ardunio sketch and Pd patch) Pd crash/freeze and there is no report in the pd console.