From 674dc9591ee4abccc395e882723a37c39ee2415f Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Thu, 28 Dec 2017 20:54:19 -0500 Subject: [PATCH] Switch pixie to neopixel code in mcopy_projector_tests --- .../mcopy_projector_tests.ino | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/ino/components/mcopy_projector_tests/mcopy_projector_tests.ino b/ino/components/mcopy_projector_tests/mcopy_projector_tests.ino index 725551b..765c36c 100644 --- a/ino/components/mcopy_projector_tests/mcopy_projector_tests.ino +++ b/ino/components/mcopy_projector_tests/mcopy_projector_tests.ino @@ -1,15 +1,25 @@ //Test lighting with NeoPixels instead of Pixies to prevent eye damage. +//NeoPixel wiring, put 1000uF cap across 5V and GND and 470ohm resistor +//in series with the data connection to the Arduino pin +// +// ARDUINO NEOPIXEL +// 5VDC --|--| 1000uF 5V +// GND --|--| 1000uF GND +// PIN 3 --==-- 470ohm Din //LIGHT HEADERS -#include "SoftwareSerial.h" -#include "Adafruit_Pixie.h" -//#include +//#include "SoftwareSerial.h" +//#include "Adafruit_Pixie.h" +#include + #define NUMPIXELS 1 // Number of Pixies in the strip -#define PIXIEPIN 6 // Pin number for SoftwareSerial output -//#define PIXELPIN 3 // Pin number for SoftwareSerial output -SoftwareSerial pixieSerial(-1, PIXIEPIN); -Adafruit_Pixie light = Adafruit_Pixie(NUMPIXELS, &pixieSerial); -//Adafruit_NeoPixel light = Adafruit_NeoPixel(1, PIXELPIN, NEO_GRB + NEO_KHZ800); +//#define PIXIEPIN 6 // Pin number for SoftwareSerial output +#define PIXELPIN 3 // Pin number for SoftwareSerial output + +//SoftwareSerial pixieSerial(-1, PIXIEPIN); +//Adafruit_Pixie light = Adafruit_Pixie(NUMPIXELS, &pixieSerial); + +Adafruit_NeoPixel light = Adafruit_NeoPixel(1, PIXELPIN, NEO_GRB + NEO_KHZ800); /* ---------------------------------------------------- @@ -72,8 +82,8 @@ void setup() { Serial.flush(); Serial.setTimeout(serialDelay); - pixieSerial.begin(115200); // Pixie REQUIRES this baud rate - //light.begin(); //neopixel only + //pixieSerial.begin(115200); // Pixie REQUIRES this baud rate + light.begin(); //neopixel only light.setPixelColor(0, 0, 0, 0); light.show();