chapter_6.md
1 # Chapter 6 (Serial Monitor Output Viewing) 2 3 The Serial Monitor Feature was released in V1.0.4 4 5 There are 2 main ways to use the Serial Monitor feature in `arduino-cli`: 6 1. `arduino-cli monitor` (Default) 7 2. SSH clients like puTTY 8 9 For now , `aci` uses the `monitor` keyword to open a Serial communication between the board and the computer. 10 11 ## The Serial Monitor 12 13 The Serial Monitor in Arduino uses Serial communication (UART protocol) to establish a communication between the board 14 and the programming computer or any other device like sensors. 15 16 To use the Serial Monitor feature in `aci`, make sure you have done the following : 17 1. [Selecting a Board](./chapter_2.md#select-a-board) 18 2. [Creating a New Sketch](./chapter_2.md#create-a-new-sketch) 19 3. [Editing the Sketch](./chapter_2.md#edit-a-sketch) 20 4. [Compiled the Sketch](./chapter_3.md#compile-code) 21 5. [Uploaded the Code](./chapter_3.md#upload-code) 22 23 The sketch used for the **Hello World** program is given below : 24 25 ```c 26 void setup(){ 27 Serial.begin(9600); 28 } 29 30 void loop() { 31 Serial.println(9600); 32 delay(1000); 33 } 34 ``` 35 36 Once these are done, in the homepage , navigate to the **Serial Monitor** Option using the arrow keys and 37 press **Enter**. 38 39 Now an Input dialog box appears that prompts you to enter the Baud Rate you used in your program (9600, 40 15200 etc.). Enter the correct baud rate you used and press **Enter**. 41 42 The Serial Monitor is now open for business. To exit the serial monitor, press *CTRL + C* 2 times. 43 The second time, you will be prompted for confimation to return to the homepage. Choose what you want 44 and press **Enter**. 45 46 Check out the below recording to see the Serial Monitor in action. 47 48 