#strandtest
Explore tagged Tumblr posts
nezdacsinosnotmilyenszexi · 2 years ago
Text
Tumblr media
Strandtest
0 notes
sawahqigong · 5 years ago
Photo
Tumblr media
Heute #Strandtest in #Gandia! Sieht gut aus...😎🤠👍 #costablanca #denia #stefanwahle #reiseführer #urlaub #reise #booksondemand #selfpublisherverband www.sw-reisebuch.de (hier: Playa de Gandía) https://www.instagram.com/p/ByhsHRgp_5B/?igshid=18512nuemdnbu
1 note · View note
frederica-10passions · 5 years ago
Photo
Tumblr media
Strand Test... I love My Mane.👩🏼‍🦱 #ME #hairtransformation #twastyles #naturalhairstyles #natural #wildhair #kinkyhair #ilovemyhair #saturdaymood #myhair #loveyourself #hair #strandtest #blackhair #blackisbeautiful #brownhair #beyoutiful #ilovemyself #mane #cutehair #wild https://www.instagram.com/p/B6EG3TLH1zM/?igshid=1lwmvtejrjni6
0 notes
indd40041020202021 · 4 years ago
Text
It is now almost 10 hours since my workday has began - what a truly frustrating day! No breaks and almost nothing to show for it. hoping to tuck into a book later and forget all about.  I tried modo again, no luck - emailed Thomas for help. 
Switched my circuit set up and realized my neopixel stick is not working fully. Going to have to replace it.  I was having a hard time again until I realized I was using an older program by accident, so after I re-installed a few things I got my motor controller running, and even got a neopixel to light up at the same time (you can see how bright the neopixels are in the photo). 
Tumblr media Tumblr media
youtube
I got this working for a tail fin back and forth, but what I want is for there to be a regular speed of swishing, and then bursts of higher-speed swishing at random times. I couldn’t figure this out, so I asked reddit for help, hopefully someone will reply.  Here’s my current code - half is from a neopixel library, the motor part I wrote myself - which is crazy because I hardly know how to use this thing! Thank you Paul McWhorter! // NeoPixel Ring simple sketch (c) 2013 Shae Erisson // Released under the GPLv3 license to match the rest of the // Adafruit NeoPixel library#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif// Which pin on the Arduino is connected to the NeoPixels? #define PIN        6 // On Trinket or Gemma, suggest changing this to 1// How many NeoPixels are attached to the Arduino? #define NUMPIXELS 8 // Popular NeoPixel ring size// When setting up 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(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels//motor starts here:int speedPin=5; int dir1=4; int dir2=3; int hSpeed=200; int lSpeed=80;void setup() {  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.  // Any other board, you can remove this part (but no harm leaving it): #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)  clock_prescale_set(clock_div_1); #endif  // END of Trinket-specific code.  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)  // MOTOR: put your setup code here, to run once: pinMode(speedPin,OUTPUT); pinMode(dir1,OUTPUT); pinMode(dir2,OUTPUT); Serial.begin(9600);}void loop() {  // light  // The first NeoPixel in a strand is #0, second is 1, all the way up  // to the count of pixels minus one.  for(int i=0; i<NUMPIXELS; i++) { // For each pixel...    // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255    // Here we're using a moderately bright green color:    pixels.setPixelColor(i, pixels.Color(0, 150, 0));    pixels.show();   // Send the updated pixel colors to the hardware.  // MOTOR: put your main code here, to run repeatedly: highFlip();delay(random(1000, 5000));lowFlip();delay(random(1000, 5000));} } void highFlip(){ digitalWrite(dir1,LOW); //clockwise digitalWrite(dir2,HIGH); analogWrite(speedPin,100); delay(25); analogWrite(speedPin,hSpeed); delay(75);digitalWrite(dir1,HIGH); //counterclockwise digitalWrite(dir2,LOW); analogWrite(speedPin,100); delay(25); analogWrite(speedPin,hSpeed); delay(75); } void lowFlip(){ digitalWrite(dir1,LOW); //clockwise digitalWrite(dir2,HIGH); analogWrite(speedPin,100); delay(25); analogWrite(speedPin,lSpeed); delay(75);digitalWrite(dir1,HIGH); //counterclockwise digitalWrite(dir2,LOW); analogWrite(speedPin,100); delay(25); analogWrite(speedPin,lSpeed); delay(75); }
0 notes
mantezygelytesf · 5 years ago
Text
Halloween hackaton day 1 / 30.10.2019
Today was the first day of our Halloween Hackathon workshop. Pepjin introduced us the goal of the workshop and then we started exploring different opportunities. For my project, I started exploring led ring. I firstly figured out how to use it on its own, for that I had to download neopixel in order for it to work. As I wanted to progress further, Pepjin gave me a switch so with it I would able to control the intensity of the light. The problem was the code. I had to combine Analog code with Simple (neopixel) code. Pepjin helped me with that. After that my idea was to have a sensor that will sense when a person approaches the light and the light immediately turns on. For that I used led ring and proximity sensor.
This is the following code I used:
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson // Released under the GPLv3 license to match the rest of the // Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif
// Which pin on the Arduino is connected to the NeoPixels? #define PIN        6 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino? #define NUMPIXELS 12 // Popular NeoPixel ring size
// When setting up 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(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
void setup() {  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.  // Any other board, you can remove this part (but no harm leaving it): #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)  clock_prescale_set(clock_div_1); #endif  // END of Trinket-specific code.
 pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) }
void loop() {  pixels.clear(); // Set all pixel colors to 'off'
 // The first NeoPixel in a strand is #0, second is 1, all the way up  // to the count of pixels minus one.
int val = analogRead(A0);            // reads the value of the potentiometer (value between 0 and 1023)  val = map(val, 0, 550, 0, 50);
 for(int i=0; i<NUMPIXELS; i++) { // For each pixel...
   // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255    // Here we're using a moderately bright green color:    pixels.setPixelColor(i, pixels.Color(val, val, val));
   pixels.show();   // Send the updated pixel colors to the hardware.
 }      delay(DELAYVAL); // Pause before next pass through loop }
0 notes
blitzcitydiy · 7 years ago
Video
instagram
Testing out the Circuit Playground Express in the Arduino IDE w/ NeoPixel strandtest sketch 🌈 #diy #tech #opensource #openhardware #arduino #electronics #circuit #nerdlife #make
1 note · View note
babble-fish · 6 years ago
Video
tumblr
2nd Iteration of the LED strip
Progress! Here, the LED strip is behaving as it should, with the correct number of LEDs being accessed from the code, and the animation looping repeatedly through the strip.
Below is the Code used to run the above LED strip. It is using the external library <Adafruit_DotStar.h> , which can be found on Github or installed directly from the library manager in the arduino IDE. Simply install the library and modify the included example sketch titled “strandtest”.
***Make sure to have the correct number of LEDs being accessed for your strip, as well as to set the proper Data and Clock pins that you are connecting to your arduino.
// Simple strand test for Adafruit Dot Star RGB LED strip. // This is a basic diagnostic tool, NOT a graphics demo...helps confirm // correct wiring and tests each pixel's ability to display red, green // and blue and to forward data down the line.  By limiting the number // and color of LEDs, it's reasonably safe to power a couple meters off // the Arduino's 5V pin.  DON'T try that with other code!
#include <Adafruit_DotStar.h> #include <SPI.h>  
#define NUMPIXELS 29 // Number of LEDs in strip
// Here's how to control the LEDs from any two pins: #define DATAPIN    11; #define CLOCKPIN   13;
// (Arduino Uno = pin 11 for data, 13 for clock, other boards are different). Adafruit_DotStar strip(NUMPIXELS, DOTSTAR_BRG);
void setup() {
 strip.begin(); // Initialize pins for output  strip.show();  // Turn all LEDs off ASAP }
// Runs 10 LEDs at a time along strip, cycling through red, green and blue. // This requires about 200 mA for all the 'on' pixels + 1 mA per 'off' pixel.
int      head  = 0, tail = -10; // Index of first 'on' and 'off' pixels uint32_t color = 0xFF0000;      // 'On' color (starts red)
void loop() {
 strip.setPixelColor(head, color); // 'On' pixel at head  strip.setPixelColor(tail, 0);     // 'Off' pixel at tail  strip.show();                     // Refresh strip  delay(20);                        // Pause 20 milliseconds (~50 FPS)
 if(++head >= NUMPIXELS) {         // Increment head index.  Off end of strip?    head = 0;                       //  Yes, reset head index to start    if((color >>= 8) == 0)          //  Next color (R->G->B) ... past blue now?      color = 0xFF0000;             //   Yes, reset to red  }  if(++tail >= NUMPIXELS) tail = 0; // Increment, reset tail index }
0 notes
electronics-gaetlm-blog · 6 years ago
Video
tumblr
Adafruit Neopixel (incl. five sketches from the strandtest library : Color Wipe, Theater Chase, Rainbow, Rainbow Cycle, Theater Chase Rainbow). Editing the strandtest code resulted in five different animations.  
Codes:
ColourWipe
#include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() {  // Some example procedures showing how to display to the pixels:  colorWipe(strip.Color(255, 0, 0), 50); // Red  colorWipe(strip.Color(0, 255, 0), 50); // Green  colorWipe(strip.Color(0, 0, 255), 50); // Blue //colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW  // Send a theater pixel chase in... //  theaterChase(strip.Color(127, 127, 127), 50); // White //  theaterChase(strip.Color(127, 0, 0), 50); // Red //  theaterChase(strip.Color(0, 0, 127), 50); // Blue
// rainbow(20); //  rainbowCycle(20); //  theaterChaseRainbow(50); }
// Fill the dots one after the other with a color void colorWipe(uint32_t c, uint8_t wait) {  for(uint16_t i=0; i<strip.numPixels(); i++) {    strip.setPixelColor(i, c);    strip.show();    delay(wait);  } }
//void rainbow(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256; j++) { //    for(i=0; i<strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel((i+j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //} // //// Slightly different, this makes the rainbow equally distributed throughout //void rainbowCycle(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel //    for(i=0; i< strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //}
////Theatre-style crawling lights. //void theaterChase(uint32_t c, uint8_t wait) { //  for (int j=0; j<10; j++) {  //do 10 cycles of chasing //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, c);    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //}
////Theatre-style crawling lights with rainbow effect //void theaterChaseRainbow(uint8_t wait) { //  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //}
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
Rainbow
#include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() {  // Some example procedures showing how to display to the pixels: //  colorWipe(strip.Color(255, 0, 0), 50); // Red //  colorWipe(strip.Color(0, 255, 0), 50); // Green //  colorWipe(strip.Color(0, 0, 255), 50); // Blue //colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW  // Send a theater pixel chase in... //  theaterChase(strip.Color(127, 127, 127), 50); // White //  theaterChase(strip.Color(127, 0, 0), 50); // Red //  theaterChase(strip.Color(0, 0, 127), 50); // Blue
 rainbow(20); //  rainbowCycle(20); // theaterChaseRainbow(50); }
//// Fill the dots one after the other with a color //void colorWipe(uint32_t c, uint8_t wait) { //  for(uint16_t i=0; i<strip.numPixels(); i++) { //    strip.setPixelColor(i, c); //    strip.show(); //    delay(wait); //  } //}
void rainbow(uint8_t wait) {  uint16_t i, j;
 for(j=0; j<256; j++) {    for(i=0; i<strip.numPixels(); i++) {      strip.setPixelColor(i, Wheel((i+j) & 255));    }    strip.show();    delay(wait);  } }
//// Slightly different, this makes the rainbow equally distributed throughout //void rainbowCycle(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel //    for(i=0; i< strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //}
////Theatre-style crawling lights. //void theaterChase(uint32_t c, uint8_t wait) { //  for (int j=0; j<10; j++) {  //do 10 cycles of chasing //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, c);    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //} // ////Theatre-style crawling lights with rainbow effect //void theaterChaseRainbow(uint8_t wait) { //  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //}
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
TheaterRainbow
#include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() { //  // Some example procedures showing how to display to the pixels: //  colorWipe(strip.Color(255, 0, 0), 50); // Red //  colorWipe(strip.Color(0, 255, 0), 50); // Green //  colorWipe(strip.Color(0, 0, 255), 50); // Blue ////colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW //  // Send a theater pixel chase in...  theaterChase(strip.Color(127, 127, 127), 50); // White  theaterChase(strip.Color(127, 0, 0), 50); // Red  theaterChase(strip.Color(0, 0, 127), 50); // Blue
//  rainbow(20); // rainbowCycle(20);  theaterChaseRainbow(50); }
//// Fill the dots one after the other with a color //void colorWipe(uint32_t c, uint8_t wait) { //  for(uint16_t i=0; i<strip.numPixels(); i++) { //    strip.setPixelColor(i, c); //    strip.show(); //    delay(wait); //  } //} // //void rainbow(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256; j++) { //    for(i=0; i<strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel((i+j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //}
// Slightly different, this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) {  uint16_t i, j;
 for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel    for(i=0; i< strip.numPixels(); i++) {      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));    }    strip.show();    delay(wait);  } }
//Theatre-style crawling lights. void theaterChase(uint32_t c, uint8_t wait) {  for (int j=0; j<10; j++) {  //do 10 cycles of chasing    for (int q=0; q < 3; q++) {      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, c);    //turn every third pixel on      }      strip.show();
     delay(wait);
     for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, 0);        //turn every third pixel off      }    }  } }
//Theatre-style crawling lights with rainbow effect void theaterChaseRainbow(uint8_t wait) {  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel    for (int q=0; q < 3; q++) {      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on      }      strip.show();
     delay(wait);
     for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, 0);        //turn every third pixel off      }    }  } }
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
RainbowCycle
#include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() { //  // Some example procedures showing how to display to the pixels: //  colorWipe(strip.Color(255, 0, 0), 50); // Red //  colorWipe(strip.Color(0, 255, 0), 50); // Green //  colorWipe(strip.Color(0, 0, 255), 50); // Blue ////colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW //  // Send a theater pixel chase in... //  theaterChase(strip.Color(127, 127, 127), 50); // White //  theaterChase(strip.Color(127, 0, 0), 50); // Red //  theaterChase(strip.Color(0, 0, 127), 50); // Blue
//  rainbow(20);  rainbowCycle(20); //  theaterChaseRainbow(50); }
//// Fill the dots one after the other with a color //void colorWipe(uint32_t c, uint8_t wait) { //  for(uint16_t i=0; i<strip.numPixels(); i++) { //    strip.setPixelColor(i, c); //    strip.show(); //    delay(wait); //  } //} // //void rainbow(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256; j++) { //    for(i=0; i<strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel((i+j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //}
// Slightly different, this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) {  uint16_t i, j;
 for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel    for(i=0; i< strip.numPixels(); i++) {      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));    }    strip.show();    delay(wait);  } }
////Theatre-style crawling lights. //void theaterChase(uint32_t c, uint8_t wait) { //  for (int j=0; j<10; j++) {  //do 10 cycles of chasing //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, c);    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //} // ////Theatre-style crawling lights with rainbow effect //void theaterChaseRainbow(uint8_t wait) { //  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel //    for (int q=0; q < 3; q++) { //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on //      } //      strip.show(); // //      delay(wait); // //      for (uint16_t i=0; i < strip.numPixels(); i=i+3) { //        strip.setPixelColor(i+q, 0);        //turn every third pixel off //      } //    } //  } //}
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
Theater 
#include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() { //  // Some example procedures showing how to display to the pixels: //  colorWipe(strip.Color(255, 0, 0), 50); // Red //  colorWipe(strip.Color(0, 255, 0), 50); // Green //  colorWipe(strip.Color(0, 0, 255), 50); // Blue ////colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW //  // Send a theater pixel chase in...  theaterChase(strip.Color(127, 127, 127), 50); // White  theaterChase(strip.Color(127, 0, 0), 50); // Red  theaterChase(strip.Color(0, 0, 127), 50); // Blue
//  rainbow(20); // rainbowCycle(20);  theaterChaseRainbow(50); }
//// Fill the dots one after the other with a color //void colorWipe(uint32_t c, uint8_t wait) { //  for(uint16_t i=0; i<strip.numPixels(); i++) { //    strip.setPixelColor(i, c); //    strip.show(); //    delay(wait); //  } //} // //void rainbow(uint8_t wait) { //  uint16_t i, j; // //  for(j=0; j<256; j++) { //    for(i=0; i<strip.numPixels(); i++) { //      strip.setPixelColor(i, Wheel((i+j) & 255)); //    } //    strip.show(); //    delay(wait); //  } //}
// Slightly different, this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) {  uint16_t i, j;
 for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel    for(i=0; i< strip.numPixels(); i++) {      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));    }    strip.show();    delay(wait);  } }
//Theatre-style crawling lights. void theaterChase(uint32_t c, uint8_t wait) {  for (int j=0; j<10; j++) {  //do 10 cycles of chasing    for (int q=0; q < 3; q++) {      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, c);    //turn every third pixel on      }      strip.show();
     delay(wait);
     for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, 0);        //turn every third pixel off      }    }  } }
//Theatre-style crawling lights with rainbow effect void theaterChaseRainbow(uint8_t wait) {  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel    for (int q=0; q < 3; q++) {      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on      }      strip.show();
     delay(wait);
     for (uint16_t i=0; i < strip.numPixels(); i=i+3) {        strip.setPixelColor(i+q, 0);        //turn every third pixel off      }    }  } }
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
0 notes
webebarq-blog · 7 years ago
Text
Visual Statements®️ Berufswunsch: Strandtester. Sprüche / Zitate / Quotes / ...
Visual Statements®️ Berufswunsch: Strandtester. Sprüche / Zitate / Quotes / …
Tumblr media
Visual Statements®️ Berufswunsch: Strandtester. Sprüche / Zitate / Quotes / Meerweh / Wanderlust / travel / reisen / Meer / Sonne / Inspiration
Source
View On WordPress
0 notes
asaaki · 6 years ago
Video
🛸 Quick and dirty Neopixel shield for an Arduino Uno board. Running the strandtest example. 🌈✨ #arduino #avr #atmega #neopixel #led #ws2812b #lights #microcontroller #hardware #electronic #fun #project #colorful #tinkering #hobby #embedded #example (hier: Berlin, Germany) https://www.instagram.com/p/BtNhUB4HeXj/?utm_source=ig_tumblr_share&igshid=17a8qap9kk3f8
0 notes
xiaoyaoma · 6 years ago
Video
tumblr
Les04 Assignment02 Neopixel
Trigger a color sequence with a sensor
We pick a sequence from the example ‘strandtest’ in the NeoPixel library and trigger it with the LDR sensor.
SCHEMATICS
Tumblr media
CODE
/* * Xiaoyao Ma * November 26,2018 * Pick a sequence from the example 'strandtest' in the NeoPixel library * trigger the sequence with the ldr sensor * reference: based on example from 'strandtest' - AdaFruit Neopixel library */ #include <Adafruit_NeoPixel.h> #ifdef __AVR__  #include <avr/power.h> #endif
#define PIN 6
int ldr_pin = A1;//define the pin of the LDR
int ldr_value = 0;//variable to save the ldr values
// Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first.
void setup() {
   pinMode(ldr_pin, INPUT); //initiate ldr_pin as inout  // 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
 strip.begin();  strip.show(); // Initialize all pixels to 'off' }
void loop() {
  ldr_value = analogRead(ldr_pin); // read the ldr
  //if ldr_value < 800, when it's dark, turn light on   if(ldr_value < 800) {      rainbow(50);   } }
void rainbow(uint8_t wait) {  uint16_t i, j;
 for(j=0; j<256; j++) {    for(i=0; i<strip.numPixels(); i++) {      strip.setPixelColor(i, Wheel((i+j) & 255));    }    strip.show();    delay(wait);  } }
// Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {  WheelPos = 255 - WheelPos;  if(WheelPos < 85) {    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);  }  if(WheelPos < 170) {    WheelPos -= 85;    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);  }  WheelPos -= 170;  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
PROBLEMS
We are able to turn the light on but we don’t know how to turn the NeoPixel light off when it’s not dark anymore.
0 notes
wofi54nyc · 6 years ago
Photo
Tumblr media Tumblr media Tumblr media Tumblr media
Strandtag! Nicht nur zu Hause ist es heiß, hier auch. Bei 80% Luftfeuchtigkeit sind auch 32° manchmal zu viel. Nachts kühlt es nur wenig ab. Heute sind wir Strandtester in Queens. Hier gibt es eine vorgelagerte langgestreckte Insel, den Rockaway Beach. Man erreicht ihn mit der neuen Schnellfähre (oben) von Manhattan aus in 55 Minuten für nur $2.75. Oder mit der Subway Linie A zum selben Preis. Der Ort sieht aus wie ein nettes kleines Dorf am Meer, wenn nicht die Wohnblocks im Plattenbaustil wären. Der Strand ist lang und breit und sauber, was man vom Strand am Vergnügungspark Coney Island leider nicht sagen kann. Der ist in unserer Wertung gestern durchgefallen, daher gibt es auch keine Bilder. 7. August 2018
0 notes
Text
As I’ve shared in a previous post, I recently signed up for an online workshop hosted by Digital Harbor Foundation.  In this series of workshops, you learn how to build 10 different DIY projects.  The course helps you with step-by-step instructions on how to complete the build.  Along with the printed step-by-step instructions, you also get the live walkthrough of the build.  Each project comes complete with a list of materials you will need for each build, along with support when you bump into troubles along the way.  In this first build, using an Arduino, I learned how to program a Neo-Pixel LED light, which can be used as part of a maker space sign.  Now, for anyone who knows truly knows me, knows that I love big bright lights, especially colorful lights, and this project appealed to my peculiar sensory needs.
While I am unable to outline the directions for the build here, you’ll have to sign up for the workshop for that!  I will share my experience during the process, with a few snaps here and there… First of all, I will have you know that she (me) had no clue as to what she was doing, but that’s okay, both @jonathanprozzi and @shawngrimes were there to field my questions…
Arduino uno
The NeoPixel Light was “LIT!” haha!
Close up of Arduino
Micrograbbers connected to wire jumpers
NeoPixel
During the build, I learned to install a program from the Arduino Library, which caused the lights to “light up”.  You’ll notice below in the strandtest below that you have the ability to customize the pattern and timing of the lights, which is pretty neat.  I am thinking of using the lights to make a Neopixel basketball hoop.  It’s gonna be LIT!!! Like, literally… Haha!  During the build, of course she ran into a little snafu (just learned how to spell that word) during the build when I attempted to connect the Arduino via USB.  I received the error message below and of course, called in @jonathanprozzi for damage control. Of course, he directed me to unplug everything, reboot and reinstall the program to my computer and, yes it worked!  See pics above.
Hurrah!
Til next time,
Peace!
      Make Your Makerspace As I've shared in a previous post, I recently signed up for an online workshop hosted by Digital Harbor Foundation.  
0 notes
mantezygelytesf · 5 years ago
Text
Halloween hackaton day 2 / 31.10.2019
Updated the code, so the light would not increase gradually but would blink immediately when the movement will be sensed.
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson // Released under the GPLv3 license to match the rest of the // Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif
// Which pin on the Arduino is connected to the NeoPixels? #define PIN        6 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino? #define NUMPIXELS 12 // Popular NeoPixel ring size
// When setting up 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(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
void setup() {  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.  // Any other board, you can remove this part (but no harm leaving it): #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)  clock_prescale_set(clock_div_1); #endif  // END of Trinket-specific code.  Serial.begin(9600);  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) }
void loop() {  pixels.clear(); // Set all pixel colors to 'off' // //  // The first NeoPixel in a strand is #0, second is 1, all the way up //  // to the count of pixels minus one. //  int val = analogRead(A0);            // reads the value of the potentiometer (value between 0 and 1023)  val = map(val, 0, 550, 0, 50);  Serial.println(val);
 if(val>10){  for(int i=0; i<NUMPIXELS; i++) { // For each pixel...    // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255    // Here we're using a moderately bright green color:    pixels.setPixelColor(i, pixels.Color(200, 200, 200));
   pixels.show();   // Send the updated pixel colors to the hardware.  }  }  else{    pixels.clear();    pixels.show();    Serial.println("off");  }    delay(250); // Pause before next pass through loop }
0 notes
pancaketrampoline · 8 years ago
Photo
Tumblr media
My hair is seaweed. #hair #greenhair #strandtest #seawitch
0 notes
stephiedoodles · 12 years ago
Photo
Tumblr media
Ready to kill my hair. Let's do this #strandtest! Looking forward to being a #readhead again! <3
1 note · View note