a few futile comments

This commit is contained in:
Vikturix 2023-02-14 21:54:23 +00:00
parent bdcfde4821
commit 0af25befe6

View File

@ -11,7 +11,7 @@ int gV;
int bV; int bV;
long counter; long counter;
String COLOUR = "#AAAAAA"; String COLOUR = "#0000e0";
void setup() { void setup() {
// put your setup code here, to run once: // put your setup code here, to run once:
@ -27,19 +27,23 @@ void setup() {
bH = COLOUR.charAt(5); bH = COLOUR.charAt(5);
bH.concat(COLOUR.charAt(6)); bH.concat(COLOUR.charAt(6));
//base is 16, as long as input is fine, this should work
rV = strtoul(rH.c_str(),NULL,16); rV = strtoul(rH.c_str(),NULL,16);
gV = strtoul(gH.c_str(),NULL,16); gV = strtoul(gH.c_str(),NULL,16);
bV = strtoul(bH.c_str(),NULL,16); bV = strtoul(bH.c_str(),NULL,16);
/*Serial.begin(9600); Serial.begin(9600);
Serial.println(rV); Serial.println(rV);
Serial.println(gV); Serial.println(gV);
Serial.println(bV);*/ Serial.println(bV);
} }
void loop() { void loop() {
// put your main code here, to run repeatedly: // put your main code here, to run repeatedly:
// modulus will reach 0 at counter = 256
int temp = counter % 256; int temp = counter % 256;
// any above 0 value of rV will get red led to glow
// or any value that is less than the counter
if (temp < rV) { if (temp < rV) {
digitalWrite(red,HIGH); digitalWrite(red,HIGH);
} else { } else {