Initial commit

moved from private version control
This commit is contained in:
2025-10-19 21:12:41 +11:00
parent 5e84773bbe
commit e64f3e881e
187 changed files with 25372 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import { createNodeModule } from "../../nodeTypes.js";
/**
* Reads a value from a GPIO pin using gpio().
*/
export const gpioReadNode = createNodeModule(
{
id: "gpio_read",
title: "GPIO Read",
category: "IO",
description: "Fetch the current value of a GPIO pin.",
searchTags: ["gpio", "hardware", "input"],
inputs: [
{
id: "index",
name: "Pin",
direction: "input",
kind: "number",
defaultValue: 0,
},
],
outputs: [
{ id: "value", name: "Value", direction: "output", kind: "number" },
],
properties: [],
},
{
evaluateValue: ({ resolveValueInput }) => {
const pin = resolveValueInput("index", "0");
return `gpio(${pin})`;
},
}
);