Program to resistive fabric network to detect ring seal on CPR mask. Uses feeback from neopixel LEDs to demonstrate secure seal. Uses NeoStrip library for NeoPixel methods and class.

Fork of NeoStrip by James Song

Revision:
2:d607600a697d
Parent:
0:9f237b11f0a8
Child:
3:343fa1d679f7
--- a/NeoStrip.cpp	Wed Mar 12 18:36:58 2014 +0000
+++ b/NeoStrip.cpp	Fri Nov 25 00:52:48 2016 +0000
@@ -1,15 +1,4 @@
-/**********************************************
- * NeoStrip.cpp
- *
- * Allen Wild
- * March 2014
- *
- * Controls a strip of Adafruit NeoPixels, addressable RGB LEDs
- * Currently, because of the global nature of the IO register and bitmask variables,
- * it is only possible to use one NeoStrip instance at a time.
- *
- * This library supports only the NXP LPC1768!
- */
+
 
 #include "mbed.h"
 #include "NeoStrip.h"
@@ -90,4 +79,23 @@
 	wait_us(50);			// wait 50us for the reset pulse
 }
 
+void NeoStrip::initialize()
+{
+	for (int i = 0; i < 4; i++)
+	{
+		setPixel(i, 255, 0, 0);
+		write();
+	}
+}
 
+void NeoStrip::progress(float time)
+{
+	for (int i = 0; i < 4; i++)
+	{
+		if(time > (i+1)*0.25)
+		{
+			setPixel(i, 0, 255, 0);
+			write();
+		}
+	}
+}