/*******************************************************************************
    PocketScreen "Read GPIO Input" Example
    written by Florian Keller
    last changed 28 Nov 20

    Reads the value on the A0 GPIO pin and prints it to Serial Monitor.
*******************************************************************************/

void setup() {
    // open serial monitor
    // don't forget to set your serial monitor baud rate to 115200, too!
    SerialUSB.begin(115200);
    while (!SerialUSB);
    SerialUSB.println("SerialUSB open.");
}

void loop() {
    // read analog pin and print to serial
    int value = analogRead(A0);
    SerialUSB.println(value);
    
    // wait one second
    delay(1000);
}
