Switch pixie to neopixel code in mcopy_projector_tests
This commit is contained in:
parent
5a842f89c9
commit
674dc9591e
|
@ -1,15 +1,25 @@
|
||||||
//Test lighting with NeoPixels instead of Pixies to prevent eye damage.
|
//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
|
//LIGHT HEADERS
|
||||||
#include "SoftwareSerial.h"
|
//#include "SoftwareSerial.h"
|
||||||
#include "Adafruit_Pixie.h"
|
//#include "Adafruit_Pixie.h"
|
||||||
//#include <Adafruit_NeoPixel.h>
|
#include <Adafruit_NeoPixel.h>
|
||||||
|
|
||||||
#define NUMPIXELS 1 // Number of Pixies in the strip
|
#define NUMPIXELS 1 // Number of Pixies in the strip
|
||||||
#define PIXIEPIN 6 // Pin number for SoftwareSerial output
|
//#define PIXIEPIN 6 // Pin number for SoftwareSerial output
|
||||||
//#define PIXELPIN 3 // Pin number for SoftwareSerial output
|
#define PIXELPIN 3 // Pin number for SoftwareSerial output
|
||||||
SoftwareSerial pixieSerial(-1, PIXIEPIN);
|
|
||||||
Adafruit_Pixie light = Adafruit_Pixie(NUMPIXELS, &pixieSerial);
|
//SoftwareSerial pixieSerial(-1, PIXIEPIN);
|
||||||
//Adafruit_NeoPixel light = Adafruit_NeoPixel(1, PIXELPIN, NEO_GRB + NEO_KHZ800);
|
//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.flush();
|
||||||
Serial.setTimeout(serialDelay);
|
Serial.setTimeout(serialDelay);
|
||||||
|
|
||||||
pixieSerial.begin(115200); // Pixie REQUIRES this baud rate
|
//pixieSerial.begin(115200); // Pixie REQUIRES this baud rate
|
||||||
//light.begin(); //neopixel only
|
light.begin(); //neopixel only
|
||||||
light.setPixelColor(0, 0, 0, 0);
|
light.setPixelColor(0, 0, 0, 0);
|
||||||
light.show();
|
light.show();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue