Skip to content

Commit 332efcb

Browse files
committed
update rp2040 sdfat API
1 parent ff5fff5 commit 332efcb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Feather_RP2040_Adalogger/Arduino_RP2040_Adalogger_microSD/Arduino_RP2040_Adalogger_microSD.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define SD_CS_PIN 23
3131

3232
SdFat SD;
33-
File32 myFile;
33+
FsFile myFile;
3434
SdSpiConfig config(SD_CS_PIN, DEDICATED_SPI, SD_SCK_MHZ(16), &SPI1);
3535

3636
void setup() {

Sparkle_Motion_Mini_Examples/Arduino_Sparkle_Motion_Mini_Multi_NeoPixels/Arduino_Sparkle_Motion_Mini_Multi_NeoPixels.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Adafruit_NeoPixel STRIP_2(NUM_PIXELS, BLOCK_2, NEO_GRB + NEO_KHZ800);
1414
void setup() {
1515
STRIP_1.begin();
1616
STRIP_2.begin();
17+
STRIP_1.setBrightness(25);
18+
STRIP_2.setBrightness(50);
1719
}
1820

1921
uint16_t pixelHue_1 = 0;
@@ -22,15 +24,15 @@ uint16_t pixelHue_2 = 256;
2224
void loop() {
2325
pixelHue_1 += 256;
2426
for(int i=0; i<STRIP_1.numPixels(); i++) {
25-
int pixelHue_1 = pixelHue_1 + (i * 65536L / STRIP_1.numPixels());
26-
STRIP_1.setPixelColor(i, STRIP_1.gamma32(STRIP_1.ColorHSV(pixelHue_1)));
27+
int hue_1 = pixelHue_1 + (i * 65536L / STRIP_1.numPixels());
28+
STRIP_1.setPixelColor(i, STRIP_1.gamma32(STRIP_1.ColorHSV(hue_1)));
2729
}
2830
STRIP_1.show();
2931

3032
pixelHue_2 -= 256;
31-
for(int i=0; i<STRIP_2.numPixels(); i++) {
32-
int pixelHue_2 = pixelHue_2 + (i * 65536L / STRIP_2.numPixels());
33-
STRIP_2.setPixelColor(i, STRIP_2.gamma32(STRIP_2.ColorHSV(pixelHue_2)));
33+
for(int i=STRIP_2.numPixels(); i>-1; i--) {
34+
int hue_2 = pixelHue_2 + (i * 65536L / STRIP_2.numPixels());
35+
STRIP_2.setPixelColor(i, STRIP_2.gamma32(STRIP_2.ColorHSV(hue_2)));
3436
}
3537
STRIP_2.show();
3638

0 commit comments

Comments
 (0)