FastLED 3.9.15
Loading...
Searching...
No Matches
Loopback.ino File Reference

Detailed Description

HTTP Server Loopback Test for FastLED @filter: (platform is native)

Tests HTTP server by making client requests from the same process. Demonstrates server and client interaction within a single .ino file.

TEST SEQUENCE:

  1. Start HTTP server on port 8080
  2. Make client request to GET /
  3. Make client request to GET /ping
  4. Make client request to GET /test
  5. Verify all responses are correct
  6. Display pass/fail status on LEDs

LED STATUS: Blue (pulse) - Server starting Yellow (flash) - Tests running Green (solid) - All tests passed Red (solid) - Test failed

USAGE: bash test Loopback –examples

ARCHITECTURE:

Definition in file Loopback.ino.

#include <FastLED.h>
#include "fl/stl/asio/http/server.h"
#include "LoopbackTestRunner.h"
+ Include dependency graph for Loopback.ino:

Go to the source code of this file.

Macros

#define DATA_PIN   2
 
#define NUM_LEDS   10
 

Enumerations

enum  AppState {
  SERVER_STARTING , WAITING_FOR_TESTS , TESTS_RUNNING , ALL_PASSED ,
  FAILED
}
 

Functions

void loop ()
 
void setup ()
 
void updateLEDs ()
 

Variables

fl::CRGB leds [NUM_LEDS]
 
fl::HttpServer server
 
uint32_t startup_time = 0
 
AppState state = SERVER_STARTING
 
LoopbackTestRunner testRunner