Beruflich Dokumente
Kultur Dokumente
Chuleta Pinguino
Chuleta Pinguino
G e t F i r s t
DS18B20 . G e t N e x t
DS18B20 . MatchRom
DS18B20 . Read
DS18B20 . ReadRom
LCD
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
lcd
Chuleta de Pingino
USB
USB .
USB .
USB .
USB .
available
read
send
sendint
Nelo R. Tovar
Protoboard
. autoscroll
. begin
. blink
. clear
. command
. cursor
. display
. home
. init
. leftToRight
. noAutoscroll
. noBlink
. noCursor
. noDisplay
. print
. printFloat
. printNumber
. rightToLeft
. scrollDisplayLeft
. scrollDisplayRight
. send
. setCursor
. write
http://www.pinguino.org.ve
@pinguinove en Identi.ca y Twitter
Directivas #
# define constante valor
# d e f i n e macro f u n c i o n ( )
# i n c l u d e < l i b r e r i a . h>
PWM
PWM. s e t d u t y c y c l e
PWM. s e t f r e q u e n c y
PWM. s e t p e r c e n t d u t y c y c l e
/ / p r e c o m p i l a c i o n
# ifndef inicio condicional
# endif fin condicional
Sound
Sound
Play
Calificadores
Serial
Serial
Serial
Serial
Serial
Serial
Serial
Serial
Serial
.
.
.
.
.
.
.
.
available
begin
flush
getkey
init
print
printf
read
Servo
servo
servo
servo
servo
servo
servo
. attach
. detach
. read
. setMaximumPulse
. setMinimumPulse
. write
const
static
extern
volatile
// solo lectura
/ / p e r s i s t e entre llamadas
/ / declaracion externa
/ / u s a l a RAM
Estructura de Control
if (a < b) {
} else {
}
if (a < b) {
} else if ( a > b) {
}
switch ( variable ) {
case 1 :
break ;
case 2 :
break ;
default :
}
f o r ( i = 0 ; i <= a ; i + + ) {
b = b + i;
}
s h o r t ( 32 ,768 a 3 2 , 7 6 7 )
unsigned short (0 a 65 ,535)
TRUE ( 1 ) FALSE ( 0 )
HIGH ( 1 ) LOW ( 0 )
INPUT OUTPUT
i n t ( 32 ,768 a 3 2 , 7 6 7 )
unsigned i n t (0 a 65 ,535)
0 x01101100L / / binario
0 x3F / / h e x a d e c i m a l
f l o a t , d o u b l e , b y t e , word
Estructura Bsicas
void setup {
Acceso a Punteros
while ( a < b ) {
}
do {
} while ( a < b ) ;
continue break
aplicable a :
do / f o r / w h i l e
Tipo Compuestos
struct registro {
t i p o campo1 ;
t i p o campoN ;
} variable ;
union d a t o s {
tipo1 dato1 ;
tipo2 dato2 ;
} variable ;
t y p e d e f t i p o nuevoTipo ;
Arreglos (Vectores)
i n t Datos [ 5 ] ;
i n t Datos [ ] = { 5 , 6 , 7 } ;
int datos [3] = {8 , 9 , 1 0 } ;
}
void loop {
}
Wiring (Base)
abs
analogRead
analogWrite
cos
delay
delayMicroseconds
digitalRead
digitalWrite
millis
pinMode
pow
randomSeed
sin
sqrt
tan
Cadena de Caracteres
char
char
char
char
char
Cad [ 6 ] ;
Cad [ ] = c a d e n a ;
Cad [ 4 ] = u s b ;
Cad [ 1 0 ] = c a d e n a ;
Cad [ 2 ] = { u , \ n } ;
.
.
.
.
.
readbit
readbyte
reset
writebit
writebyte
Interrupt
UserInterrup
CDC
Tipos Enumerados
enum enumerado {
dato1 ,
dato2 ,
datoN
} variable ;
Constantes
CDC . p r i n t
CDC . r e a d
DS18B20 (I2C)
DS18B20 . C o n f i g u r e
DS18B20 . c r c
DS18B20 . F i n d