feat: refactor sgclaw around zeroclaw compat runtime
This commit is contained in:
24
third_party/zeroclaw/firmware/uno-q-bridge/sketch/sketch.ino
vendored
Normal file
24
third_party/zeroclaw/firmware/uno-q-bridge/sketch/sketch.ino
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// ZeroClaw Bridge — expose digitalWrite/digitalRead for agent GPIO control
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#include "Arduino_RouterBridge.h"
|
||||
|
||||
void gpio_write(int pin, int value) {
|
||||
pinMode(pin, OUTPUT);
|
||||
digitalWrite(pin, value ? HIGH : LOW);
|
||||
}
|
||||
|
||||
int gpio_read(int pin) {
|
||||
pinMode(pin, INPUT);
|
||||
return digitalRead(pin);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Bridge.begin();
|
||||
Bridge.provide("digitalWrite", gpio_write);
|
||||
Bridge.provide("digitalRead", gpio_read);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Bridge.update();
|
||||
}
|
||||
11
third_party/zeroclaw/firmware/uno-q-bridge/sketch/sketch.yaml
vendored
Normal file
11
third_party/zeroclaw/firmware/uno-q-bridge/sketch/sketch.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
profiles:
|
||||
default:
|
||||
fqbn: arduino:zephyr:unoq
|
||||
platforms:
|
||||
- platform: arduino:zephyr
|
||||
libraries:
|
||||
- MsgPack (0.4.2)
|
||||
- DebugLog (0.8.4)
|
||||
- ArxContainer (0.7.0)
|
||||
- ArxTypeTraits (0.3.1)
|
||||
default_profile: default
|
||||
Reference in New Issue
Block a user