Getting Started with Arduino: Hello World Tutorial
The Arduino UNO R3 development board I ordered online has finally arrived. I can’t wait to run a Hello World test.I downloaded the development tool Arduino IDE from the official Arduino website www.arduino.cc and installed it on my laptop. To save money, I didn’t buy the original Italian version but instead purchased a so-called domesticimproved version(which should actually be calledmodified version for accuracy). The interface chipCH340 is different from the original version, so I also needed to download the USB interface driver separately. I searched for CH340 on Baidu and downloaded an installer calledCH341SER. The installation was successful, and I searched online for Arduino Hello World, and it worked.Today I want to share the testing process of this Hello World. I re-installed the development board and software on my desktop computer, but encountered several issues during testing. Solving these problems might be useful for beginners.First, after installing the USB interface driver, there was no change in the Arduino IDE, and I couldn’t select the board type. Yesterday, when I was testing on my laptop, everything seemed to go smoothly. So, I exited the program and reopened it, and found that the IDE started automatically downloading some files, with pop-up windows that I chose to install.After this process was completed, I clicked on the IDE’s Tools menu, selected the board type as Arduino Uno, and then selected Port, where there were several COM ports, and I didn’t know which one to choose. When I used the laptop yesterday, it seemed that there was only one COM port available. I checked the “Device Manager” on the computer to correctly select the port.Then I copied a hello world example from the internet.void setup(){Serial.begin(9600);//set baud rate to 9600Serial.print(“hello world”);}void loop(){}Click on the “✓” verification (verify) code in the File menu, which is similar to the “compile” code in other programming tools. At this point, the Output window reported an error. After checking, it was because the quotes in the copied code were full-width characters (Chinese input). After changing them to half-width characters (English input), the verification passed. Later, I changed the text inside the quotes from hello world to hello broken pot, and it also passed.Then click on the “✓” next to the “->” to upload the code to the development board. If the port selection is incorrect, the upload will fail.Click on the Serial Monitor under the Tools menu (I don’t know why when testing on the desktop computer, this menu didn’t respond the first time; I had to click it again to see the Serial Monitor window below), and at this point, I saw the expected output, and the test was successful!
Leave a Comment
Your email address will not be published. Required fields are marked *