Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure.
functions
For controlling the Arduino board and performing computations.
variables
Arduino data types and constants.
Constants
HIGH | LOWINPUT | OUTPUT | INPUT_PULLUP
LED_BUILTIN
true | false
Floating Point Constants
Integer Constants
structure
The elements of Arduino (C++) code.
Further Syntax
#define (define)#include (include)
/* */ (block comment)
// (single line comment)
; (semicolon)
{} (curly braces)
Arithmetic Operators
% (remainder)* (multiplication)
+ (addition)
- (subtraction)
/ (division)
= (assignment operator)
Comparison Operators
!= (not equal to)< (less than)
<= (less than or equal to)
== (equal to)
> (greater than)
>= (greater than or equal to)
Bitwise Operators
& (bitwise and)<< (bitshift left)
>> (bitshift right)
^ (bitwise xor)
| (bitwise or)
~ (bitwise not)
Compound Operators
%= (compound remainder)&= (compound bitwise and)
*= (compound multiplication)
++ (increment)
+= (compound addition)
-- (decrement)
-= (compound subtraction)
/= (compound division)
^= (compound bitwise xor)
|= (compound bitwise or)
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου
Το blog TEO O ΜΑΣΤΟΡΑΣ ουδεμία ευθύνη εκ του νόμου φέρει σχετικά σε άρθρα που αναδημοσιεύονται από διάφορα ιστολόγια. Δημοσιεύονται όλα για την δική σας ενημέρωση.