By Mohamed Ihsan

October 20, 2021

Lab 1: Intro to Asynchronous Serial Communications

Question: Why don't I put a resistor for the potentiometer here?

Question: why does the push-button use 10k ohm resistor?

Untitled

Untitled

For this lab, I have already learned terminal commands, and ASCII and Byte value concepts before (as well as the relationship between the two, and how to convert between different kind of data values such as these), so I read most of this lab rather than doing everything step by step. However, I did decide, for the sake of refreshing my syntax skills, to try and see if I could successfully print the values that they asked us to print. It seemed that, as shown above, my first attempt did not print everything on one line.

Untitled

I then went back and realize that it's because I put "println" instead of "print". Only the last one should have the newline! A good exercise to get the syntax correctly.

Lab 2: Serial Input to P5.js

Things I'm learning along the way:

For some reason, the serial port value is remaining at a sensor value of 10, even when I turn the potentiometer dial.

For some reason, the serial port value is remaining at a sensor value of 10, even when I turn the potentiometer dial.

I have managed to get the lab up to the point where p5 is supposed to be communicating with the Serial port. However, it seems that I am unable to get the monitor to output what I want (the potentiometer value is not changing!)

Fix: I simply had to restart my Arduino. It was still running my previous lab's code!

Problem 2: Adding a menu!

—For some reason, when I try doing this, it gives me the drop-down menu, but the pot value remains undefined!

Untitled