Uploaded new barebones

Foundation for CSV Functionality
This commit is contained in:
krishmo118 2025-04-02 17:42:22 +00:00
parent f4fbb400d1
commit 07851fafce
1 changed files with 39 additions and 0 deletions

39
barebones1/barebones.ino Normal file
View File

@ -0,0 +1,39 @@
#include <FastLED.h>
#define NUM_LEDS 300
#define DATA_PIN 23
#define CLOCK_PIN 18
CRGB leds[NUM_LEDS];
long startTime = 0;
long endTime = 0;
long ttotaltiem = 0;
void setup() {
Serial.begin(115200);
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(100);
}
void loop() {
startTime = millis();
leds[0] = CRGB::Black;
for(int i = 0; i< NUM_LEDS; i++){
leds[i] = CRGB::White;
FastLED.show();
delayMicroseconds(1);
leds[i] = CRGB::Black;
}
endTime = millis();
ttotaltiem = endTime-startTime;
// Output in CSV format
Serial.print(testCount);
Serial.print(",");
Serial.println(totalTime);
}