#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 8

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 2

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
SoftwareSerial mySerial(0, 1); // RX, TX from point of view of chip

int delayval = 25; // delay for half a second

int R = 0;
int G = 0;
int B = 0;

int fadeAmount = 1;

void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code

pixels.begin(); // This initializes the NeoPixel library

}

void loop() {

for (int i = 0; i < NUMPIXELS; i++) {

//brightness += fadeAmount;
R += fadeAmount;
//G += fadeAmount;
//B += fadeAmount;
G = 255;
B = 255;

// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(R, G, B)); //

pixels.show(); // This sends the updated pixel color to the hardware.

if (R == 100 || R == 0 && G == 255 || G == 0 && B == 255 || B ==0) {

fadeAmount = -fadeAmount;

}

delay(delayval); // Delay for a period of time (in milliseconds).
}

}