/* * Program: * 5_Wire_Read_01 * Created by: * Jonathon Weeks * On date: * 2018-10-22 * * Description: * This program is a state machine that waits for a button-press * before reading a coordinate pair from a 5-wire resisitve touch * panel. The coordinate pair is then sent to the computer via * Serial. * * Function: * Delay-blink * Plan: * Set up state machine to blink an LED * Use button to blink LED * Use button to send message via Serial * Use button to read touch-panel * Send coordinates via Serial */ //~~~~~~~~ //~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } void loop() { // turn the LED on (HIGH is the voltage level) digitalWrite(LED_BUILTIN, HIGH); // wait for a second delay(1000); // turn the LED off by making the voltage LOW digitalWrite(LED_BUILTIN, LOW); // wait for a second delay(1000); }