ArduinoA
Arduino3y ago
9 replies
capie

void setup repeating

my setup is reapiting it sefl
#include <Arduino.h> #include <Adafruit_NeoPixel.h> #include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif #define PIN 6 int numpixels; int input; int klaar; void setup_neopixel(){ Serial.println("how many led's"); input = 2; klaar = 0; while (klaar != 1) { input = Serial.parseInt() ; delay(500); Serial.println(input); numpixels = input; Serial.println(numpixels); if (input != 0){ klaar = 1; Adafruit_NeoPixel pixels(numpixels, PIN, NEO_GRB + NEO_KHZ800); } } } void setup() { Serial.begin(9600); setup_neopixel(); Serial.println("test"); } void loop() { delay(20); }
Was this page helpful?