Introducing an Open Systems Assembly Protocol
or,
a proposal regarding how to build
OSHW's modular, networked future
© 2013 OtherMachine Co. now Bantam Tools (kickstarter.com)
© 2021 3DFabLight (3dfablight.com)
https://clank.tools
http://clank.tools http://mtm.cba.mit.edu ... distributed machine design !
the machine mess
specialization with coordinated operation
... without coordinated development
accessible fabrication -> accessible automation
pyGestalt: Nadya Peek and Ilan Moyer (2013)
mods: Neil Gershenfeld / CBA (2016 - x) ... http://modsproject.org/
software endpoints: input
// the LED 'endpoint'
EP_ONDATA_RESPONSES onLEDData(uint8_t* data, uint16_t len){
if(data[0]){
digitalWrite(OUTPUT_LED_PIN, HIGH);
} else {
digitalWrite(OUTPUT_LED_PIN, LOW);
}
return EP_ONDATA_ACCEPT;
}
Endpoint ep_led(&osap, "led", onLEDData);
software endpoints: output
// instantiate endpoint,
Endpoint ep_button(&osap, "button");
// later, if we want to publish to it:
if(!digitalRead(BTN_INPUT_PIN)){
ep_button.write(btn_down, 1);
} else {
ep_button.write(btn_up, 1);
}
static route configuration
// adding static-configured routes to endpoints,
ep_button.addRoute(
(new EndpointRoute(EP_ROUTE_ACKLESS))->pfwd(1)->sib(3)
);
instantiating virtual ports w/ Arduino Objects
// instantiating a virtual port
VPort_ArduinoSerial vpUSBSerial(&osap, "usbSerial", &Serial);
// multi-host bus over Wire
VBus_ArduinoWire vbWire(&osap, "arduinoWire", &Wire, 0x12);
instantiating virtual ports w/ custom link
// transmit one, delineated packet:
void SPILink_send(uint8_t* data, size_t len);
// check: are we clear to send? i.e. is tx buffer empty
boolean SPILink_clearToSend(void);
// if a new packet has arrived, place it in *data, returning size_t length
size_t SPILink_read(uint8_t* data);
// ports also get a loop, for runtimes
void SPILink_loop(void);
// then we instantiate via passalong callbacks;
VPort vpSPILink(&osap, "customSPILink", SPILink_loop, SPILink_send, SPILink_read, SPILink_clearToSend);
Diagram is my own, theory is Egbhal (2020) Working in Public: the Making and Maintenance of Open Source Software
the 'devboard industrial complex'
modular commons
https://xkcd.com/927/