<p>Later, I found that the data I output in the serial port has English letters, which cannot be used for picture drawing. So I got rid of the code"So I got rid of the code",But it didn't work. So i serach in the interner. I found that i cannot write the code" Serial.print(cm);". I need to write the code "Serial.println(cm)". Then it worked.</p>
<p>Interfacing serial port with MATLAB is also quite simple: If your device is connected to port COM3, this is the code that reads the port into 256byte buffer and selects the maximum value. Then the script starts to update the plot figure by adding a new value every time new value is ready. This is a way to collect longer period of history data from a sensor.</p>
<p>I visit <ahref="https://processing.org/download/support.html">the processing.org website</a> download and installed it. I read and watched different tutorials for understanding how to do my assignment. I got a lot of information at www.processing.org website. </p>
<divclass="section-title center">
<h4><strong>Hello.light.45</strong></h4>
</div>
</div>
<p>I started doing my weekly assignment, I took hall sensor board from week_09, hello.light.45 board. The resulting code looks like this.</p>