#include <Adafruit_NeoPixel.h>
void setup() {
pinMode(5, OUTPUT);
//Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel leds0(3, 18, NEO_RGB + NEO_KHZ800);
Adafruit_NeoPixel leds1(1, 17, NEO_RGB + NEO_KHZ800);
Adafruit_NeoPixel leds2(1, 16, NEO_RGB + NEO_KHZ800);
//GRBW
leds0.begin();
leds1.begin();
leds2.begin();
leds0.show();
leds1.show();
leds2.show();
//strip.setPixelColor(n, red, green, blue, white);
leds0.setPixelColor(0, 255, 0, 0);
leds0.setPixelColor(1, 0, 255, 0);
leds0.setPixelColor(2, 0, 0, 255);
leds0.show();
leds1.setPixelColor(0, 255, 255, 255);
leds1.show();
leds2.setPixelColor(0, 255, 0, 255);
leds2.show();
//digitalWrite(2, HIGH); //LEDBULIT - nie działa
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S2!");
String text = "";
text += char(65);
text += char(100);
text += char(109);
text += char(105);
text += char(110);
Serial.print(text);
Serial.print(" ,text length: ");
Serial.println(text.length());
text = "Admin";
int a = text.length();
char tmp1[a+1];
text.toCharArray(tmp1,a+1);
for (int i=0; i<a; i++) {
String tmp = text.substring(i, i+1);
int z = tmp1[i];
Serial.print(tmp);
Serial.print(" : ");
Serial.print(tmp1[i], DEC);
Serial.print(" : ");
Serial.println(z);
}
text = "Hello";
for (int i=0; i<text.length(); i++) {
Serial.print(text.substring(i,i+1));
Serial.print(" : ");
int w = text.substring(i,i+1)[0];
Serial.println(w);
}
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(5, HIGH);
delay(500); // this speeds up the simulation
digitalWrite(5, LOW);
delay(500);
}