README.md 3.26 KB
Newer Older
1
# Automatakit API
Jake Read's avatar
Jake Read committed
2

Jake Read's avatar
Jake Read committed
3
4
aka project consistent-sandbox 

Jake Read's avatar
Jake Read committed
5
6
## oy

Jake Read's avatar
Jake Read committed
7
8
9
 - cooler demo 
 - jog option 

10
11
12
13
 - port flushing ? 
 - want a test / reset set 
  - really, should be built into bridge (or hardware default objs)

Jake Read's avatar
Jake Read committed
14
15
 - read file ? default lines ? run it 

Jake Read's avatar
Jake Read committed
16
17
- then you have this multiline gcode / start / stop sequencing issue 
 - and with it, scrolling around your messy program 
Jake Read's avatar
Jake Read committed
18
 - and this change ui / return double bounce ? 
Jake Read's avatar
Jake Read committed
19
- want jog keys & speed commands w/ those buttons 
20
- really want those LIGHTS 
Jake Read's avatar
Jake Read committed
21
22
23
24
25
26
27
28
29
30
31
32
- really want to watch accelerometer
- want to measure network speed
- want to show motor torques coming back, set motor torques 

## Majors to Address 
 - states / uis / etc - one off / one-at-a-time for updates 
  - i.e. all f'n update calls are to single module-global state update
  - ! 
 - states / getters / setters not applicable to sub-elements in an object within state
  - i.e. array access 
 - consistent dereferencing ?

Jake Read's avatar
Jake Read committed
33
34
35
## UI bugs /
 - reverse event lines ? .isLinked etc. .. 

Jake Read's avatar
Jake Read committed
36
37
38
39
40
41
42
43
## Features we Want
 - UI classes
  - buttons, w/ colors & reasonable std. events 
  - multiline input w/ current-line highlighting, terminal-write-in ? 
  - 3js 
 - prettier hw/sw representation
 - callbacks / duplex links ? handing over an object, basically 
 - reload-in-place
Jake Read's avatar
Jake Read committed
44
45
46
47
48
49
  - title context menu 
 - w/ proper event classes, context clicks for inputs / outputs / state elements ?
 - for crashes etc, how can we re-start / kick serverside from the browser? some other daemon program ?
 - write in logger functions
  - i.e. module.log('whatever') is wrapped at load into console.log() and sends serverside log message as well, with ID and name 
  - this means writing module class that is extended 
Jake Read's avatar
Jake Read committed
50

Jake Read's avatar
Jake Read committed
51
52
53
54
55
56
57
## remember

you have friends
 - bro
 - sean
 - nathan 

Jake Read's avatar
Jake Read committed
58
## links to things 
Jake Read's avatar
Jake Read committed
59

Jake Read's avatar
Jake Read committed
60
http://designmodo.github.io/Flat-UI/
Jake Read's avatar
Jake Read committed
61

Jake Read's avatar
Jake Read committed
62
http://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage 
Jake Read's avatar
Jake Read committed
63

Jake Read's avatar
Jake Read committed
64
bootstrap, numeric.js ... 
Jake Read's avatar
Jake Read committed
65

Jake Read's avatar
Jake Read committed
66
http://backbonejs.org/#Events
67

68
69
## Desires
 - load / keep state 
Jake Read's avatar
Jake Read committed
70
71
72
 - run headless with view into 
 - collaborative program editing would be cool 
 - program save / load / edit ?
73

74
## Model Consistency
75

76
In Memory: array of modules
77

78
Saved / interfaced with: json of this - so to load from this, we need paths and ids attached to each module on load time.
79

80
To wrap / add heirarchy: this json object can be loaded the same as a program, given top level inputs and outputs, and made into another require()d module. 
81

82
Modules are tiny programs, specifics (inputs, outputs, state) are read by system and wrapped into UI. UI has access to write into state, and connect events together.
83

84
To wrap, we write a representation in api-type rep, with one connection. We output the 'text line' of a Terminal into the 'text input' input of a gcode parser, and see the output / state bubble through the UI.
85

86
87
88
89
 - to test, cleanup and write gcode obj
 - confirm state change comes down to server
 - confirm event bubbles through in server 
 - push event back to server ui ? dat.updatedisplay() ? 
90

91
For extra points, we read in the connection also with an SVG layer - iterating through connections of the represented program.
92

Jake Read's avatar
Jake Read committed
93
94
95
96
97
98
99
100
101
102
# The RPI

 - sudo apt-get update
 - sudo apt-get upgrade
 - install nvm
  -  
 - install git 

- https://cnc.js.org/ 
- https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-Install-Node.js-via-Node-Version-Manager-(NVM)