But with the help of the Serial Plotter the amount of time it takes to troubleshoot the problem can be significantly reduced by analyzing the waveforms. Troubleshooting whether a wire was not connected properly or a component was malfunctioning or your coding logic was incorrect would have cost you a lot of time. You can see the Red waveform decreasing and the Yellow waveform remaining constant speed which represents the right turn. At a threshold value(minimum distance) of 10, the robot turns right hence the two motors have different value's Right=50,Left=100. As the distance between the obstacle & the robot decreases, the Blue waveform decreases. In this example the Blue waveform represents the Ultrasonic sensor and the Yellow and Red waveforms represent the left and right motors. You can also switch between raw and line mode. Additionally, it changes vital emulation that appears on the line feed or (carriage return/line feed). So, the process allows communication to your device. It is these serials that enable microcontrollers and Arduino. The Serial Plotter will also help debugging code by displaying the values various conditional statements and variables or even the states of the pins of the Arduino.Ī good example of would be troubleshooting a Obstacle Avoidance Robot. Coolterm is an efficient serial port with TTL and RS232 serials. With the help of the Serial Plotter you can check if a sensors reading is incorrect or even if the sensor is not connected properly to the Arduino. In such cases where there too many lines of code or too many wires to debug the Serial Plotter can show the exact point of error. Faulty connections or incorrect coding logic can sometimes return an undesired output. One of the best uses of the Serial Plotter is to troubleshoot the code & circuit. In this case the values of the variables 'temperature & humidity will have separate waveforms plotted on the same graph simultaneously. Inorder to plot multiple variables or waveforms simultaneously a 'space' is printed between the two print statements. When displaying multiple waveforms, every separate variable/value/parameter is displayed using a different colour like shown below. Remember to set the Baud Rate of the Serial Plotter so that it matches that of the code. In other words the plot is updated along the X-axis every time the Serial.println() is updated with a new value. The vertical Y-axis auto adjusts itself as the value of the output increases or decreases, and the X-axis is a fixed 500 point axis with each tick of the axis equal to an executed Serial.println() command. The Arduino Serial Plotter takes incoming serial data values over the USB connection and is able to graph the data along the X/Y axis, beyond just seeing numbers being spit out on to the Serial Monitor. Now that you have installed the latest version of the Arduino IDE(1.6.7 or above) its time to understand how the Serial Plotter actually works.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |