import * as log from './log'
import * as config from './config'
import * as gpio from 'onoff'

const LED1 = new gpio.Gpio(16, 'out')
const LED2 = new gpio.Gpio(26, 'out')


log.info("PiAlive starting")
LED1.writeSync(0)
LED2.writeSync(0)


let heartbeatTimer = setInterval(() => {
  LED1.writeSync(1)
  setTimeout(() => {
    LED1.writeSync(0)
  }, 100)
}, config.dict.heartbeatInterval)






log.info("PiAlive running")
