flowrs-engine/e2e/fixtures/appexport/pi_sensor.fdsl
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

7 lines
638 B
Text

//! title: A Linux board reads an I2C sensor and lights an LED
//! description: flowRS's Linux target (codegen::linux::demo_graph): register 0 of the sensor at I2C address 72 on bus 1 is read and printed, and GPIO 17 is driven high. Exported with --linux, the program runs on the board through flowrs-device, which the project carries in vendor/ with flowrs-hal and flowrs-transport.
let n0 = IntLiteral { value: 0 };
let n1 = embedded.i2c.read(register: n0.value) { bus: 1, address: 72, length: 2 };
let n2 = PrintLn(input: n1.data);
let n3 = BoolLiteral { value: true };
let n4 = embedded.gpio.digital_out(state: n3.value) { pin: 17 };