Hardware Reference
In-Depth Information
Next, the IDE needs to know how the board is connected to your computer.
Using the Tools
Serial Port menu, you can select the proper connection. On a
Windows machine, the board will appear as a COM port. On a Mac, the Arduino
connection will start with “/dev/tty.usbmodem.” My development machine is a
Linux system, and in this case the Arduino is connected to /dev/ttyACM0 . On
some systems, there might be several serial ports listed. Figure 2-4 illustrates
me selecting my port.
Figure 2-4: Arduino IDE with the Arduino Mega 2560 serial port selected
That's it—as far as coni guration goes. You have to do this only once; the
Arduino IDE remembers your preferences and keeps them for the next time.
You will need to change your settings if you change boards or plug the board
into a different USB port.
Next, you may optionally verify the source code. The verii cation stage actually
compiles the source code; the compiler will warn you if anything goes wrong. If
there is a problem, the IDE shows a message at the bottom of the screen, indicat-
ing a line number and the cause of the problem. For this example, the compiler
shouldn't complain, and it will compile your application. To compile, you must
click the Verify button (the check mark) in the top left of the IDE or go into the
menu Sketch
Verify/Compile. There is also a keyboard shortcut: Ctrl+R.
Search WWH ::




Custom Search