Serial w/ P5JS

I had a lot of trouble with this.

kept getting weird error messages


but I was able to get some cool effects playing with the pots as controllers and putting the background in different parts of the code to wipe the canvas clean.

the eye

I tried to change the output to something other than the LED brightness being set to where on the screen was clicked, but was not able to get anything else to actually work, so I left that code in place and it works fine.

So my final is not nearly as interesting as I had hoped, but it’s sorta fun to play with.

click anywhere in the canvas to reset the background to a random color.

one end of the random color lines is set by the mouseX and mouseY position and the other end is controlled on the X axis by one of the pots and on the Y axis by the other.

this allows you to draw interesting shapes.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s