intro.to physical computing(week6)

Class

Assignments

The new knowledge of this week is a little difficult for me. I have a strong feeling that the labs that we did this week are very different from what we did before. In this week, building circuits is no longer the tricky part, what made me overwhelmed is that lots of new concepts need to be understood and practiced, so this week’s blog might be more like a reading note rather than a blog.

Lab: Intro to Asynchronous Serial Communications

New knowledge for me:

 

1.Arduino Serial Monitor;

2.Terminal;

(Make sure your Arduino is running a sketch with at least one Serial.print() or Serial.println() statement in your code.)

(The notation of “only one program can control a serial port at a time. ” is SO important! )

3.Coolterm;

4.ASCII & binary;

Lab: Serial Input to P5.js

New knowledge for me:

 

1.p5.serial library, p5.serialserver, p5.serialcontrol app

 

2.The sequence of connecting Arduino to p5: 

 

    1⃣️programing Arduino to read the analog input;

 

    2⃣️using p5.js serial library and the p5.serialsever/p5.serialcontrol;

 

    3⃣️making sure that p5.serialport.js file is inside the project folder of p5.js editor;

 

    4⃣️adding one line to index.html file;

 

    5⃣️getting a list of the available serial ports in the console, finding the name of my port in the list;

 

    6⃣️writing a callback function to respond to event (list, connected, open, close, data, error);

 

    7⃣️setting the rate;

Lab: Serial output from P5.js

After spending a lot of time understanding serial input, it’s less difficult to understand the knowledge about output. The process of doing this lab is quite fluent.

Question:

1.What’s the differences between asynchronous communications and synchronous communications and serial, how do they work?

2.I’m a little bit confused when using the terminal to connect Arduino, especially about the part of Cat/ less/ screen.

 

3.(not related to this week’s labs )What’s the function of capacitor and inductor? What’s the differences between them?