Skip to content

Commit 0e0cda4

Browse files
committed
[SD] Parsing and dispatch working on Metro ESP32S3 hardware
1 parent c9c904c commit 0e0cda4

File tree

6 files changed

+345
-185
lines changed

6 files changed

+345
-185
lines changed

src/Wippersnapper_V2.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,6 @@ void printDeviceInfoV2() {
11671167
*/
11681168
/**************************************************************************/
11691169
void Wippersnapper_V2::connectV2() {
1170-
setStatusLEDColor(BLUE);
11711170
WS_DEBUG_PRINTLN("Adafruit.io WipperSnapper");
11721171
// Dump device info to the serial monitor
11731172
printDeviceInfoV2();
File renamed without changes.

src/Wippersnapper_demo.ino.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 1 "/var/folders/ff/dmzflvf52tq9kzvt6g8jglxw0000gn/T/tmpuwpc59cm"
2+
#include <Arduino.h>
3+
# 1 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
4+
# 16 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
5+
#include "ws_manager.h"
6+
7+
8+
Wippersnapper_Manager manager;
9+
10+
11+
#define WS_DEBUG
12+
13+
14+
#define API_PIN 0
15+
void setup();
16+
void loop();
17+
#line 27 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
18+
void setup() {
19+
20+
manager.checkAPIVersion(API_PIN);
21+
manager.provision();
22+
23+
Serial.begin(115200);
24+
while (!Serial) delay(10);
25+
26+
Serial.println("Adafruit Wippersnapper API Manager Demo");
27+
Serial.print("Running Wippersnapper API Version: ");
28+
Serial.println(manager.getAPIVersion());
29+
manager.connect();
30+
}
31+
32+
void loop() {
33+
manager.run();
34+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Adafruit IO WipperSnapper Beta, Wokwi Test Sketch
2+
//
3+
// ***NOTICE***
4+
// This sketch is not intended to be uploaded to a physical device
5+
// This sketch is for testing Wokwi-CLI and Wokwi-VSCode
6+
//
7+
// Brent Rubell for Adafruit Industries, 2024
8+
//
9+
// All text above must be included in any redistribution.
10+
11+
/************************ Adafruit IO Config *******************************/
12+
// Visit io.adafruit.com if you need to create an account,
13+
// or if you need your Adafruit IO key.
14+
#define IO_USERNAME "brubell"
15+
#define IO_KEY "YOUR_AIO_KEY"
16+
/**************************** WiFi Config ***********************************/
17+
#define WIFI_SSID "Wokwi-GUEST"
18+
#define WIFI_PASS ""
19+
// Enable debug output for beta builds
20+
#define WS_DEBUG
21+
// Pin to check for API version
22+
#define API_PIN 0
23+
#include "ws_manager.h"
24+
//#include "Wippersnapper_Networking.h"
25+
//Wippersnapper_WiFi wipper;
26+
Wippersnapper_Manager manager;
27+
Wippersnapper_WiFiV2 wipper(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, "io.adafruit.com", 8883);
28+
29+
30+
void setup() {
31+
// NOTE: Provisioning must occur prior to serial init.
32+
manager.checkAPIVersion(API_PIN);
33+
manager.provision();
34+
35+
Serial.begin(115200);
36+
// while (!Serial) delay(10);
37+
Serial.println("Adafruit Wippersnapper API Manager Demo");
38+
Serial.print("Running Wippersnapper API Version: ");
39+
Serial.println(manager.getAPIVersion());
40+
manager.connect();
41+
}
42+
43+
void loop() {
44+
manager.run();
45+
}

src/components/statusLED/Wippersnapper_StatusLED.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ void releaseStatusLED() {
127127
*/
128128
/****************************************************************************/
129129
void setStatusLEDBrightness(float brightness) {
130+
// Clamp brightness between 0.0-1.0 (0% to 100%)
131+
if (brightness > 1.0)
132+
brightness = 1.0;
133+
if (brightness < 0.0)
134+
brightness = 0.0;
130135
WS.status_pixel_brightness = brightness;
131136
}
132137

0 commit comments

Comments
 (0)