 express = require 'express'
 gpio = require 'gpio'
-app = express()
+beatsInterval = null
 
 io = {
   18: gpio.export 18

app.get '/on/18', (req, res) ->
  io[18].set()
  res.send('on')


app.get '/off/18', (req, res) ->
  io[18].reset()

  , 1000
  res.send('beats started')

app.get '/toggle/18', (req, res) ->
  if io[18].state == 0
    io[18].set()
