Skip to main content
100%

Gist 19159b5e61cfd091dd6f92f5c66f4bb5

✓ Published0🌍 Public
UUtopiah
Last edited Oct 24, 2020
Created on Oct 24, 2020

A Raspberry Pi–controlled LED blinks on a 250ms interval through an Express web server, toggling via HTTP requests to `/start`, `/stop`, and `/shutdown` endpoints. The animation is driven by the `onoff` Gpio library, which reads and writes pin 21’s state using synchronous calls (`readSync`, `writeSync`). The server listens on port 8888, and the root route confirms the service is running. The example demonstrates how a simple hardware state machine can be exposed as a web-controllable, time-based visual output.

AI-generated description

Similar vizzes