[vc_row][vc_column][vc_column_text]
First, we will do an experiment without any additional components, only one piece of Arduino and a USB download cable. We will let the Arduino say “Hello World!”.
This is an experiment that achieves the serial communication between with Arduino and PC, and it is also an simple experiment to get started, We hope that the sample experiment could lead you into the Arduino world!
[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1394758413-1-61″][vc_column_text]
- 1 x [bigcommerce link=”/arduino-usb-board-uno-r3/” target=”_blank”] Arduino[/bigcommerce]
- 1 x USB download cable
[/vc_column_text][/vc_tab][vc_tab title=”Test code” tab_id=”1394758413-2-11″][vc_column_text]
After we install the Arduino USB diver, we can launch the Arduino IDE, write the program, build the code, and download to Arduino.
When Arduino Uno receives our command ‘R”, it will display “Hello World!”
int val; int ledpin=13; void setup() { Serial.begin(9600); pinMode(ledpin,OUTPUT); } void loop() { val=Serial.read(); if(val=='R') { digitalWrite(ledpin,HIGH); delay(500); digitalWrite(ledpin,LOW); delay(500); Serial.println("Hello World!"); } }
[/vc_column_text][/vc_tab][vc_tab title=”Test result” tab_id=”1394759769295-2-3″][vc_column_text] [/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.