2. Connect the Arduino board to your computer via a USB cable. Note that in this case the power of the Arduino board is supplied by the 5V USB cable and it is not required to connect to an external DC adapter.
3. In the Arduino IDE window, type the following code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Hello world, Arduino!");
}
void loop() {
// put your main code here, to run repeatedly:
}
3. Select Tools -> your Arduino board such as the popular Arduino Uno.
4. Select Tools -> COM port.
5. Select the upload button and save the project.
6. Select Tools -> Serial monitor.
7. You should see the result if the serial monitor is properly set.
Reference:
Hello World
Arduino: Hello World with blinking LED (StudyEECC)
Arduino: Hello World for WeMos D1 WIFI UNO(StudyEECC)
Arduino: Button Detection with LED Control (StudyEECC)
Arduino: Button Detection with LED Control (StudyEECC)
沒有留言:
張貼留言