For project 2, we decided to make a game console that let the user draw a picture on a p5 sketch like an Etch-a-Sketch. Here is the planning that we did for the project.

I got the slider to connect. But the output that I was getting was stopping at 255 then restarting at 0.

I realized it was an ASCII number format issue! I changed my code to reflect this.

Screen Shot 2021-10-26 at 00.26.47.png

After that, I was able to get a proper reading.

I applied my slider color code. However, the color kept on flicking: it would show the correct color but then randomly flick to red, which implied that it wasn't getting a proper reading the entire time and would get a 0 reading sometimes, therefore showing the red fill.

Pivot to a different design

We pivoted and no longer wanted to do this design.

I wanted the slider to bring back smoother values so that it didn't read the 0 value/red values in its reading.

My first attempt to solve this was to check to see if the Serial Monitor was recording 0/null values in the Arduino Serial Monitor. I didn't see evidence of this. The readings were also clearly not jumping dramatically, so there was no need for value smoothing functions.

Screen Shot 2021-11-01 at 11.29.41.png

This felt like it must have been an error on the side of p5 and Arduino handshake that needed to be resolved.

I thought that was might be most logical would be to first check in the console log on p5 what values it was reading, to see how often it was receiving a null value as I theorized it was receiving.

Here is where I saw null values being read. Interestingly, they were coming in at irregular intervals.

Screen Shot 2021-11-01 at 11.38.24.png

Based on this, I didn't think fiddling with the rate handshake was the way to go. I decided to attempt to write code that would disregard null values.