____       _          ____                        
|  _ \ ___ | |__   ___/ ___| _   _ _ __ ___   ___  
| |_) / _ \| '_ \ / _ \___ \| | | | '_ ` _ \ / _ \ 
|  _ < (_) | |_) | (_) |__) | |_| | | | | | | (_) |
|_| \_\___/|_.__/ \___/____/ \__,_|_| |_| |_|\___/ 
                                                   
  ____            _    _                 _    
 / ___|___   ___ | | _| |__   ___   ___ | | __
| |   / _ \ / _ \| |/ / '_ \ / _ \ / _ \| |/ /
| |__| (_) | (_) |   <| |_) | (_) | (_) |   < 
 \____\___/ \___/|_|\_\_.__/ \___/ \___/|_|\_\

Operators and expressions examples

//
// Operators and mathematical expressions
//

void setup()
{
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);

  Serial.begin(9600); // open serial connection to PC
}

void loop()
{
  int a, b;

  a = analogRead(0);
  b = analogRead(1);

  digitalWrite(2, a);
  digitalWrite(3, b);

  Serial.print(a);
  Serial.print(" ");
  Serial.println(b);

  delay(500);
}