/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   main.cpp
 * Author: yovany
 *
 * Created on June 19, 2018, 2:40 PM
 */

#include <cstdlib>
#include <stdio.h>

#include "DigitalIO.h"

using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {
    DigitalIO io(16, 0);
    uint8_t prev = io.read();
    uint8_t current;
    while(1) {
        current = io.read();
        if(current != prev) {
            printf("State change: %d\n", current);
            prev = current;
        }
    }
    return 0;
}

