Arduino-data types

Data Types

  • Byte 0 - 255

  • Int -32,767 - 32,768

  • Long -2.1billion - 2.1 billion

  • Float(decimal number) 
Array
Format examples *

int my Array [] = {2,14,145,......}

int myArray2 [5];
       x =  myArray2 [3]
*zero is always your first value when counting numbers in code

COnstants
Some values are constants
  • TRUE/FALS
  • HIGH/LOW
  • INPUT/OUTPUT
IF
if {(something ?? value){
     do something();}
 ex

if ( x < = 200) {
digitalWrite(ledPin, HIGH);
}
esle { digital Write (ledPin, LOW);}
Noise
Ideal circuit will give you a pure (whole number) value

Pull Up/ Pull Down resistor- clarifies signals sent by device












Comments

Popular Posts