Updated: Jan 13, 2022
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;
(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! )
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: a. programming Arduino to read the analog input; b. using p5.js serial library and the p5.serialsever/p5.serialcontrol; c. making sure that p5.serialport.js file is inside the project folder of p5.js editor; d. adding one line to index.html file; e. getting a list of the available serial ports in the console, finding the name of my port in the list; f. writing a callback function to respond to the event (list, connected, open, close, data, error); d. 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.
1. What are 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 are the differences between them?