 			defer.resolve( new PSerial(serial))
 		)
 
-	send: =>
-		@connection.then (pserial) =>
-			pserial.write(resetPosition)
+	send: (rgbList) =>
+		@connection.then (pserial) =>			
+
+		 	console.log('made it')
+		 	b = rgbToBuffer(rgbList)
+
+		 	pserial.write(b)
+		 		.then(pserial.write(resetPosition))
 				.then(pserial.drain)
-				.then( =>
-				 	console.log('made it')
-				 	b = new Buffer(30)
-				 	for i in [0..29]
-				 		b[i] = i % 2 * 200
-
-				 	pserial.write(b)
-			 	)
-			 	.then(pserial.drain)
-			 	.catch((error) =>
-			 		console.error('ERROR', error)
-		 		)
+				.catch((error) => console.error('ERROR', error))
 
 
-b = new BlinkyTape();
-b.send()
 
 class PSerial
 	constructor: (@serial) ->


ledCount = 60
resetPosition = new Buffer([0x0, 0x0, 0xFF])

class BlinkyTape


				reject(error) if error
				resolve()
			)
		)


red = { red: 254, green: 0, blue: 0}
green = { red: 0, green: 254, blue: 0}
blue = { red: 0, green: 0, blue: 254}

b = new BlinkyTape();

b.send([red, green, red, blue, blue])
	.delay(100)
	.then( => b.send([blue, blue, blue, blue]))
	.delay(100)
	.then( => b.send([red, red, red, red, red]))
