////////////////////////////////////////////////////////////////////////////////
// Official name:     Hello World                                             //
// Hardware platform: Arduino Uno R3                                          //
// Pin connections:   Arduino Uno R3                                          //
// Created:           March 2016                                              //
// Created by:        HARB                                                    //
// This program flashes the onboard LED. Now you are up and running           //
////////////////////////////////////////////////////////////////////////////////

// Define precompiler variables ------------------------------------------------
#define LED 13   //Pin of onboard LED does not change during program, so #define

void setup() {
  digitalWrite(LED, HIGH);  //Atmel pins can be set before the pin is set output
  pinMode(LED, OUTPUT);              //Output pins must be initialized to output
} //End of setup

void loop() {                                //KEEP ON RUNNING THIS LOOP FOREVER
  delay(1000);                                               //Wait milliseconds
  digitalWrite(LED, LOW);                                     //Turn the LED off
  delay(1000);                                               //Wait milliseconds
  digitalWrite(LED, HIGH);                                     //Turn the LED on
} //End of void loop()                       //KEEP ON RUNNING THIS LOOP FOREVER

////////////////////////////////////////////////////////////////////////////////
// FUSES (can always be altered by using the STK500)                          //
// On-Chip Debug Enabled: off                            (OCDEN=0)            //
// JTAG Interface Enabled: off                           (JTAGEN=0)           //
// Preserve EEPROM mem through the Chip Erase cycle: On  (EESAVE = 0)         //
// Boot Flash section = 2048 words, Boot startaddr=$3800 (BOOTSZ=00)          //
// Boot Reset vector Enabled, default address=$0000      (BOOTSTR=0)          //
// CKOPT fuse (operation dependent of CKSEL fuses        (CKOPT=0)            //
// Brown-out detection level at VCC=2,7V;                (BODLEVEL=1)         //
// Ext. Cr/Res High Freq.; Start-up time: 16K CK + 64 ms (CKSEL=1111 SUT=11)  //
// LOCKBITS (are dangerous to change, since they cannot be reset)             //
// Mode 1: No memory lock features enabled                                    //
// Application Protect Mode 1: No lock on SPM and LPM in Application Section  //
// Boot Loader Protect Mode 1: No lock on SPM and LPM in Boot Loader Section  //
////////////////////////////////////////////////////////////////////////////////
// EEPROM MEMORY MAP:                                                         //
// Start End  Number Description                                              //
// 0000  0000      1 Never use this memory location to be AVR compatible      //
////////////////////////////////////////////////////////////////////////////////
// PIN ALLOCATIONS                                                            //
// Prog=List=Chip                                                             //
// A0  = 97 = PF0 ADC0             =                                      ADC //
// A1  = 96 = PF1 ADC1             =                                      ADC //
// A2  = 95 = PF2 ADC2             =                                      ADC //
// A3  = 94 = PF3 ADC3             =                                      ADC //
// A4  = 93 = PF4 ADC4/TMK         =                                      ADC //
// A14 = 83 = PK6 ADC14/PCINT22    =                                      ADC //
// A15 = 82 = PK7 ADC15/PCINT23    =                                      ADC //
// 0   =  2 = PE0 RXD0/PCINT8      = Serial monitor, also on-board LED    RX0 //
// 1   =  3 = PE1 TXD0             = Serial monitor, also on-board LED    TX0 //
// 2   =  6 = PE4 OC3B/INT4        =                                      INT //
// 3   =  7 = PE5 OC3C/INT5        =                                      INT //
// 4   =  1 = PG5 OCOB             =                                      PWM //
// 5   =  5 = PE3 OC3A/AIN1        =                                      PWM //
// 6   = 15 = PH3 OC4A             =                                      PWM //
// 7   = 16 = PH4 OC4B             =                                      PWM //
// 8   = 17 = PH5 OC4C             =                                      PWM //
// 9   = 18 = PH6 OC2B             =                                      PWM //
// 10  = 23 = PB4 OC2A/PCINT4      =                                      PWM //
// 11  = 24 = PB5 OC1A/PCINT5      =                                      PWM //
// 12  = 25 = PB6 OC1B/PCINT6      =                                      PWM //
// 13  = 26 = PB7 OCOA/OC1C/PCINT7 = On board user LED, on=high off=low   PWM //
// 18  = 46 = PD2 TXD1/INT3        =                                      TX1 //
// 19  = 45 = PD2 RXD1/INT2        =                                      RX1 //
// 20  = 44 = PD1 SDA/INT1         =                                      TWI //
// 21  = 43 = PD0 SCL/INT0         =                                      TWI //
// 44  = 40 = PL5 OC5C             =                                      PWM //
// 45  = 39 = PL4 OC5B             =                                      PWM //
// 46  = 38 = PL3 OC5A             =                                      PWM //
// 50  = 22 = PB3 MISO/PCINT3      =                                      SPI //
// 51  = 21 = PB2 MOSI/PCINT2      =                                      SPI //
// 52  = 20 = PB1 SCK/PCINT1       =                                      SPI //
// 53  = 19 = PB1 SS/PCINT0        =                                      SPI //
////////////////////////////////////////////////////////////////////////////////