Commit 0cf40db8 authored by Jake Read's avatar Jake Read
Browse files

install doc to main page

parent 0967bceb
# Automatakit API
aka project 'consistent-sandbox'
**Reconfigurable Numeric Dataflow Machine Controller**
*aka project 'consistent-sandbox'*
![img software](doc/images/atkapi.png)
![img hardware](doc/images/machine-with-atkapi.jpg)
[Automatakit]( is a system architecture for robotics where machine controllers are extensible, and organized around the principle of event propagation: things happen because of other things that have happened beforehand.
This is a piece of software that is designed to help you assemble high level controllers from dataflow software elements. It serves a graphical programming interface, and is meant to live with dataflow hardware elements from [this project 'automatakit'](
It's in the early stages, so bear with us. Everything is going to be great.
# Usage
# Installing Node.js, WebSocket and SerialPort
To Run DMC, you'll need to install node.js, and then the packages serialport and ws (websocket).
## Install Node.js
Node.js is a runtime environment for javascript, so you can write and run js locally. [Download and install it here](
To check that node is installed, you can use
``node -v``
In Windows check that in *Environment Variables, System Variables, Path* there is a path for C:\Users\yourusername\npm folder. If the folder does not exist, create it and set the path.
## Install Serialport
Node comes with a package controller called 'npm' - node package manager. You can use this to install dependencies for node programs.
Serialport is a package for node that allows it to interact with a hardware serial port.
Navigate to the directory where you'll be running from (atkapi). Do
``npm install serialport``
## Install WS (WebSocket)
WebSockets are very simple web connections. We use them to chat between the 'server' / heap (node) and the 'view' (your browser).
To install ws, do
``npm install ws``
We aim to take an event graph architecture down through multiple layers of computing, routing event propagation also through a message passing network between multiple cpus each operating modular hardware endpoints.
## Run DMC (yay!)
This project serves the developement environment / api we use to write and represent programs that are event graphs. [Install and Run.](
cd to the rndmc folder and run:
``node main``
It's handy to keep a terminal window open beside a browser when running the software - it's not perfect yet - I do this:
This way I can watch for errors, and restart it when it crashes. Hopefully not a lot of this will happen.
## Open a Browser
The program is now running a tiny HTTP server, where it will deliver an interface. It's set to show up at your local address on port 8080.
In a browser open *localhost:8080* you will see the mods and this msg in the terminal *SEND PROGRAMS TO UI*
## Using the Browser Interface
![img moving](doc/images/mothermother.gif)
- those GIFs tho
- steppers gotta step
# Writing New Modules
- TODO: put example here, with comments
# Writing Hardware Modules
- TODO: same, also including links / explanation to atk
# A Note on the Architecture
- ARCH diagram, thinking, reps / vs heaps / ui interaction / the state getter-and-setters
# Development Notes
## For MW
- walk program units and change
- hardware, and consolidate ?
- add reset button to hardware
- add router for reset, test
- what program units do we want?
- good templates for hw/software ... good documentation
......@@ -113,6 +186,12 @@ To assemble a representation of these, we want to have a kind of 'netlist' that,
# The RPI
One of the desires here is to run programs headlessly on small embedded computers like the Raspberry Pi. The router has pogo-pins for this, so that when it's mounted beneath a Raspberry Pi the USB and Power lines are automatically hooked up - the 2A Buck Converter on the Router can also be used to power the RPI, so it can all run on one DC power bus. Nice!
``` need to figure out how to get the RPI serialport to talk ```
## Writing Javascript Programs
There's also something of an 'interface' to the software, and if you prefer to write a headless controller, or roll your own UI, etc, this is fair game. Please, break my software and use it in wierd ways.
The only code in ```main.js``` that we need to run headless is here:
const Reps = require('./reps.js')
const Programs = require('./programs.js')
var program ='new program')
We don't need the next lines (opening a View and starting an Http server). I.E. to add new modules and hook them up, try this:
var stepper = Programs.loadModuleFromSource(program, './modules/hardware/atkstepper.js')
var jogControl = Programs.loadModuleFromSource(program, './modules/ui/arrows.js')
\ No newline at end of file
......@@ -36,3 +36,4 @@ View.startWs()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment