 			callback = args[0]
 			writeCmd = 'writeByte'
 
+		callback ?= ->
+
 		writeArgs.push (error) ->
 			callback()
 			debug.log "Send", data, 'to port', port

		ranger: 7
		temperature: 40


	constructor: (@address, @id) ->
		wire = new i2c @address, device: "/dev/i2c-1" 
		@wire = wire  if debug.mode



	send = ( cmd, port, args... ) ->
		writeArgs = [cmd]
		if args[1]
			data = args[0]



	receive = ( port, args... ) ->
		@mode port, MODES.input
		readArgs = []
		if args[1]
			length = args[0]
