博文

目前显示的是标签为“program”的博文

How to program an Arduino?

图片
  You “program” an Arduino by writing a sketch (a C/C++ program), compiling it, and uploading it to the board over USB. Let’s walk it from zero to blinking LED. 1. What you need An Arduino board (Uno, Nano, Mega, etc.) USB cable that matches your board (Uno: USB-B, newer: USB-C/micro-USB) A computer (Windows / macOS / Linux) Arduino IDE installed If you don’t have the IDE yet, download it from the official Arduino site (Arduino IDE 2.x). Install it like any normal app. 2. Connect the Arduino Plug the USB cable into the Arduino and your computer. The power LED on the Arduino should turn on. Windows may install a driver automatically; on macOS and Linux it usually just works. 3. Open the Arduino IDE and select your board Start Arduino IDE . Go to Tools → Board and choose your board, for example: Arduino Uno Arduino Nano Arduino Mega or Mega 2560 , etc. Go to Tools → Port and pick the port that shows something like: COM3 (...