Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why is my Arduino and P5.js serial connection an equation?

I found out that whatever I get in the p5.js sketch as a serial read is one value (52) in the picture minus the second value (48) in the picture and then multiplied by 10. This would equal 4o which is the serial output set on the Arduino. I am using the p5.serialcontrol application to build a connection from the browser to the serial port.

Screenshot of the code

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

48 is the ASCII value for character '0' and 52 is the ASCII value for character '4'. The Arduino is sending the string "40" in a loop and the other side is receiving the numeric ASCII values 48 and 52 in a loop.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading