      * call the user handler function.
      */ 
     slave.poll();
-}
-
-/**
- * Handel Read Coils (FC=01)
- * write back the values from digital in pins (input status).
- *
- * handler functions must return void and take:
- *      uint8_t  fc - function code
- *      uint16_t address - first register/coil address
- *      uint16_t length/status - length of data / coil status
- */
-void readCoils(uint16_t address, uint16_t length) {
-    // read coils state
-    for (int i = 0; i < length; i++) {
-        // write one boolean (1 bit) to the response buffer
-        slave.writeCoilToBuffer(i, digitalRead(address + i));
-    }
 }
 
 /**

}

/**
 * Handel Read Holding Registers (FC=03)
 * write back the values from analog in pins (input registers).
 *
 * handler functions must return void and take:
 *      uint8_t  fc - function code
 *      uint16_t address - first register/coil address
 *      uint16_t length/status - length of data / coil status
 */
void readMemory(uint16_t address, uint16_t length) {
    uint16_t value;
    
    // read program memory
    for (int i = 0; i < length; i++) {

 * set digital output pins (coils) on and off
 */
void writeDigitlOut(uint8_t fc, uint16_t address, uint16_t status) {
    // set digital pin state
    digitalWrite(address, status);
}

/**
 * Handel Write Holding Registers (FC=16)
 * write data into program.
 */
void writeMemory(uint8_t fc, uint16_t address, uint16_t length) {
    uint16_t value;
