The main work I am doing this week is the second subsection of the Interaction Part, which is the connection between Arduino and Max. By communicating with Leo and searching for relevant information on the Internet, I compiled a main patch for sending data from Arduino to Max (see Figure 1).
Figure 1: A Screenshot of Max Patch that Runs the Operation of Sending Data from Arduino to Max.
After the port in the serial object corresponds to the connected USB, it means that the serial object has received the data sent from Arduino, so the “print raw” object will cause the value to be printed out in the console according to the delay time interval set in Arduino, and the corresponding data groups will also be displayed in the following three message objects.
I tried to send the Arduino data of the ultrasonic sensor directly to the Max patch in the visual part made by Ruojing to change some parameters (see Video 1).
Video 1: A Video Showing the Ultrasonic Sensor Arduino Project Sending Data to the Visual Max Patch.
It ran successfully, but at the beginning I found that when the delay value was too small, that is, when the time interval between the two data generation was too short, Max could not work properly, and there was a very large lag. However, after increasing the delay value, although it can run normally, the data changes too slowly and is not suitable for the actual operation of our final installation. So the bigger problem I am currently encountering is how to balance and coordinate the actual operating rate of the equipment and the required operating rate of the installation. This is also what I will mainly need to work on over the next few weeks.