Hide minor edits - Show changes to markup
(nivel alto) | (nivel bajo)
(entrada) | (salida)
(verdad) | (mentira)
(nivel alto) | (nivel bajo)
(entrada) | (salida)
(verdad) | (mentira)
(:title Reference:)
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions. The Arduino language is based on C/C++.
(:title Referencia:)
Visita la referencia extendida para características más avanzadas del Lenguaje Arduino y la página de librerías para estudiar cómo conectar con distintos tipos de hardware.
Los programas hechos con Arduino se dividen en tres partes principales: estructura, valores (variables y constantes), y funciones. El Lenguaje de programación Arduino se basa en C/C++.
Digital I/O
E/S Digitales
Analog I/O
E/S Analógicas
Advanced I/O
E/S Avanzadas
Time
Tiempo
Math
Trigonometry
Random Numbers
Matemáticas
Trigonometría
Números Aleatorios
Communication
Communicación
Didn't find something? Check the extended reference or the libraries. Or see the list of community-contributed code.
Echás algo en falta? Visita la referencia extendida o la página de librerías. También puedes visitar la página de código propuesto por la comunidad.
(:cell width=50%:)
(:cell width=33%:)
(:cell width=33%:)
Variables are expressions that you can use in programs to store values, such as a sensor reading from an analog pin.
Constants are particular values with specific meanings.
Variables can have various types, which are described below.
(:cell width=33%:)
Here's a style guide that helps with writing examples for beginners.
Serial Communication
Used for communication between the Arduino board and a computer or other devices. This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, you cannot also use pins 0 and 1 for digital i/o.
Communication
Here's a style guide that helps with writing examples for beginners.
Didn't find something? Check the extended reference or the libraries.
Didn't find something? Check the extended reference or the libraries. Or see the list of community-contributed code.
''See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations page.
''See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the 'Learning / Foundations page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the 'Learning / Foundations page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. Further programming concepts may be found on the Learning / Foundations? page.
An Arduino program run in two parts:
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinModes, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
''See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The foundations page has extended descriptions of some hardware and software features.
''See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
(:table width=90% border=0 cellpadding=5 cellspacing=0:)
(:table width=100% border=0 cellpadding=5 cellspacing=0:)
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The Foundations page has extended descriptions of some hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The foundations page has extended descriptions of some hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The Foundations page has extended descriptions of hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The Foundations page has extended descriptions of some hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The [[Tutorial/Foundations|Foundations page has extended descriptions of hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The Foundations page has extended descriptions of hardware and software features.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware. The [[Tutorial/Foundations|Foundations page has extended descriptions of hardware and software features.
See the extended reference for more advanced features of the Arduino languages.
See the extended reference for more advanced features of the Arduino languages and the libraries page for interfacing with particular types of hardware.
Didn't find something? Check the extended reference.
Didn't find something? Check the extended reference or the libraries.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions. The Arduino language is based on C/C++.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions. The Arduino language is based on C/C++.
See the extended reference for more advanced features of the Arduino languages.
See the extended reference for more advanced features of the Arduino languages.
See the extended reference for more advanced features of the Arduino languages.
See the extended reference for more advanced features of the Arduino languages.
The extended reference covers more advanced features of the Arduino language.
See the extended reference for more advanced features of the Arduino languages.
Didn't find something? Check the extended reference.
External Interrupts
These functions allow you to trigger a function when the input to a pin changes value.
The extended reference covers more advanced features of the Arduino language.
The extended reference covers more advanced features of the Arduino language.
The extended reference covers more advanced features of the Arduino language.
The extended reference covers more advanced features of the Arduino language.
The extended reference covers more advanced features of the Arduino language.
The extended reference covers more advanced features of the Arduino language.
For more advanced features of the Arduino language, see the extended reference.
The extended reference covers more advanced features of the Arduino language.
For more advanced features of the Arduino language, see the extended reference.
Constants are labels for certain values which are preset in the Arduino compiler. You do not need to define or initialize constants. Arduino includes the following pre-defined constants.
Constants are particular values with specific meanings.
Variables are expressions that you can use in programs to store values, such as a sensor reading from an analog pin. They can have various types, which are described below.
Variables are expressions that you can use in programs to store values, such as a sensor reading from an analog pin.
Constants are labels for certain values which are preset in the Arduino compiler. You do not need to define or initialize constants. Arduino includes the following pre-defined constants.
Variables can have various types, which are described below.
Constants are labels for certain values which are preset in the Arduino compiler. You do not need to define or initialize constants. Arduino includes the following pre-defined constants.
In Arduino, the standard program entry point (main) is defined in the core and calls into two functions in a sketch. setup() is called once, then loop() is called repeatedly (until you reset your board).
An Arduino program run in two parts:
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinModes, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
An Arduino program run in two parts:
In Arduino, the standard program entry point (main) is defined in the core and calls into two functions in a sketch. setup() is called once, then loop() is called repeatedly (until you reset your board).
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinModes, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinMode, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinModes, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below.
Variables are expressions that you can use in programs to store values, such as a sensor reading from an analog pin. They can have various types, which are described below.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions. The Arduino language is based on C/C++.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you woiuld set pinMode, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set pinMode, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
Arduino provides a library of functions on top of the standard AVR C/C++ routines. The main file of your sketch is compiled as C++, but you can add straight C files as well.
Arduino programs can be divided in three main parts: program structure, values (variables and constants), and functions.
Arduino programs can be divided in three main parts: structure, values (variables and constants), and functions.
Handling Time
Random number generation
New in Arduino 0005.
External Interrupts
These functions allow you to trigger a function when the input to a pin changes value.
Old serial library (deprecated).
Expert/Internal Functions
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below. Floating point variables and operations are not currently supported.
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below.
If you're used to Processing or Java, please check out the Arduino/Processing language comparison.
These are the "official" libraries that are included in the Arduino distribution. They are compatible with the Wiring versions, and the links below point to the (excellent) Wiring documentation.
These are not (yet) included with the Arduino distribution and may change.
These are the "official" libraries that are included in the Arduino distribution. They are compatible with the Wiring versions, and the links below point to the (excellent) Wiring documentation.
These are not (yet) included with the Arduino distribution and may change.
These are the basics about the Arduino language, which implemented in C. If you're used to Processing or Java, please check out the Arduino/Processing language comparison.
Arduino provides a library of functions on top of the standard AVR C/C++ routines. The main file of your sketch is compiled as C++, but you can add straight C files as well.
If you're used to Processing or Java, please check out the Arduino/Processing language comparison.
Handling Time
Random number generation
New in Arduino 0005.
Handling Time
(:title API Reference:)
(:title Reference:)
(:title Arduino API Reference:) !!Arduino Reference
(:title API Reference:)
(:title Arduino API Reference:) !!Arduino Reference
Expert/Internal Functions
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below. Warning: floating point variables and operations are not currently supported.
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below. Floating point variables and operations are not currently supported.
Used for communication between the Arduino board and a computer or other devices. This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, you cannot also use pins 0 and 1 for digital i/o.
Used for communication between the Arduino board and a computer or other devices. This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, you cannot also use pins 0 and 1 for digital i/o.
Used for communication between the Arduino board and the computer, via the USB or serial connection. This communication happens on digital pins 0 (RX) and 1 (TX). This means that these functions can be used to communicate with a serial device on those pins, but also that any digital i/o on pins 0 and 1 will interfere with this communication.
Used for communication between the Arduino board and a computer or other devices. This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, you cannot also use pins 0 and 1 for digital i/o.
Used for communication between the Arduino board and the computer, via the USB or serial connection. Or used for serial communication on digital pins 0 (RX) and 1 (TX). Note: if you are using these functions, you cannot also use pins 0 and 1 for digital i/o.
Used for communication between the Arduino board and the computer, via the USB or serial connection. This communication happens on digital pins 0 (RX) and 1 (TX). This means that these functions can be used to communicate with a serial device on those pins, but also that any digital i/o on pins 0 and 1 will interfere with this communication.
Used for communication between the Arduino board and the computer, via the USB or serial connection (both appear as serial ports to software on the computer). Or used for serial communication on digital pins 0 (RX) and 1 (TX).
Used for communication between the Arduino board and the computer, via the USB or serial connection. Or used for serial communication on digital pins 0 (RX) and 1 (TX). Note: if you are using these functions, you cannot also use pins 0 and 1 for digital i/o.
Old serial library (deprecated).
Serial Library as of version 0004
Used for communication between the Arduino board and the computer, via the USB or serial connection (both appear as serial ports to software on the computer). Or used for serial communication on digital pins 0 (RX) and 1 (TX).
Arduino programs can be divided in three main parts: program structure, values (variables and constants), and functions.
Arduino programs can be divided in three main parts: program structure, values (variables and constants), and functions.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you initialize variables?, set pinMode, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you woiuld set pinMode, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
An Arduino program run in two parts:
setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you initialize variables?, set pinMode, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
Arduino programs can be divided in three main parts:
Arduino programs can be divided in three main parts: program structure, values (variables and constants), and functions.
Digital Pins
Digital I/O
Analog Pins
Analog I/O
Another form of variables are constants, which are preset variables that you do not need to define or initialize.
Constants are labels for certain values which are preset in the Arduino compiler. You do not need to define or initialize constants. Arduino includes the following pre-defined constants.
Finally, defines are a useful C component that allow you to specify something before it is compiled.
You can define numbers in arduino that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
#define constantName value
Note that the # is necessary. For example:
#define ledPin 3
The compiler will replace any mentions of ledPin with the value 3 at compile time.
Serial Library as of version 0004
(:table border=0 cellpadding=5 cellspacing=0:) (:cell:)
(:table width=90% border=0 cellpadding=5 cellspacing=0:) (:cell width=50%:)
(:cell:)
(:cell width=50%:)
(:table border=0 cellpadding=5 cellspacing=0:) (:cell:)
(:cell:)
(:tableend:)
You can define constants in arduino, that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
You can define numbers in arduino that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
Finally, defines are a useful C component that allow you to specify something before it is compiled.
You can define constants in arduino, that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
#define constantName value
Note that the # is necessary. For example:
#define ledPin 3
The compiler will replace any mentions of ledPin with the value 3 at compile time.
You can define constants in arduino, that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
#define constantName value
Note that the # is necessary. For example:
#define ledPin 3
The compiler will replace any mentions of ledPin with the value 3 at compile time.
Another form of variables are constants, which are preset variables that you do not need to define or initialize.
Arduino programs can be divided in three main parts:
Arduino programs can be divided in three main parts:
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below.
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin. They can have various types, which are described below. Warning: floating point variables and operations are not currently supported.
These are the basics about the arduino language.
These are the basics about the Arduino language, which implemented in C. If you're used to Processing or Java, please check out the Arduino/Processing language comparison.
Comments are parts in the program that are used to inform about the way the program works. They are not going to be compiled, nor will be exported to the processor. They are useful for you to understand what a certain program you downloaded is doing or to inform to your colleagues about what one of its lines is. There are two different ways of marking a line as a comment:
Tip When experimenting with code the ability of commenting parts of your program becomes very useful for you to "park" part of the code for a while.
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin.
You can define constants in arduino, that don't take up any program memory space on the chip. Arduino defines have the same syntax as C defines:
#define constantName value
Note that the # is necessary. For example:
#define ledPin 3
The compiler will replace any mentions of ledPin with the value 3 at compile time.
These are the functions available in the arduino language
These are the basics about the arduino language.
Digital Pins
Analog Pins
Serial Communication
Handling Time
Variables are expressions that you can use in programs to store values, like e.g. sensor reading from an analog pin.
Arduino programs can be divided in three main parts:
Comments are parts in the program that are used to inform about the way the program works. They are not going to be compiled, nor will be exported to the processor. They are useful for you to understand what a certain program you downloaded is doing or to inform to your colleagues about what one of its lines is. There are two different ways of marking a line as a comment:
Tip When experimenting with code the ability of commenting parts of your program becomes very useful for you to "park" part of the code for a while.
These are the functions available in the arduino language