diff --git a/app/data/cfg.json b/app/data/cfg.json index 0bbadb6..4df2057 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.163", + "version": "1.8.164", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/package-lock.json b/app/package-lock.json index f0580b1..2ba925e 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.163", + "version": "1.8.164", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 096db1b..ab64d0a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.163", + "version": "1.8.164", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index 0bbadb6..4df2057 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.163", + "version": "1.8.164", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino b/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino index 496bafc..ce12d7f 100644 --- a/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino +++ b/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino @@ -7,19 +7,57 @@ Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRBW + NEO_KHZ800); + +String strR = "000"; +String strG = "000"; +String strB = "000"; +String strW = "000"; //w = brightness + +volatile int r = 0; +volatile int g = 0; +volatile int b = 0; +volatile int w = 0; + float brightness = 0.2; -int b = floor(brightness * 255.0f); void setup() { + w = floor(brightness * 255.0f); Serial.begin(56700); pixels.begin(); - pixels.setBrightness(b); + pixels.setBrightness(w); pixels.fill( 0xFFFFFF); pixels.show(); Serial.print("brightness: "); - Serial.println(b); + Serial.println(w); +} + +void setColor (int r, int g, int b, int w) { + pixels.setBrightness(w); + pixels.fill(pixels.Color(r, g, b)); + pixels.show(); } void loop () { pixels.show(); + //delay(1000); + r = 255; + g = 161; + b = 72; +/* int i = random(0, 3); + uint16_t total = 230 * 3; + if (i == 0) { + r = random(205, 256); + g = random(205, 256); + b = total - r - g; +; } else if (i == 1) { + r = random(205, 256); + b = random(205, 256); + g = total - r - b; + } else if (i == 2) { + b = random(205, 256); + g = random(205, 256); + r = total - g - b; + }*/ + setColor(r, g, b, w); + //delay(1000); } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 028cb90..e018146 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.8.163", + "version": "1.8.164", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.8.163", + "version": "1.8.164", "license": "MIT", "dependencies": { "alert": "file:app/lib/alert", diff --git a/package.json b/package.json index 3a731ac..bb246ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.8.163", + "version": "1.8.164", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index 0bbadb6..4df2057 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.163", + "version": "1.8.164", "ext_port": 1111, "profiles": { "mcopy": {