added arduino mode
added lua mode