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

Jake Read's avatar
Jake Read committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
aka project 'consistent-sandbox' 


## Programming 
  - need test of planner sequence
   - next: close loop, bigger gcode terminal, test program 
  - once we can plan gcode sequence, work towards more
   - better hardware abstraction, i.e.
   stepper.port = bridge.port('0,1')
   stepper.port.onPacket = function(){ ... } 
   callbacks ? 
   - UI elements, i.e. demonstrating slider for individual axis movements, or just an arrow / keypad capture on mouseover thing 
   - c improvements / dma etc, would be very cool, good for ruben, erik to send 
    - dma not possible / not enough channels / not portable enough ... 
    - still want to measure, though, and look through static / etc  ? 
    - and *really* what we want / need is error correction / buffer overrun errors and port slowdowns on swside
    - i.e. acks-in-between ? acks-per-packet ?
    - is timing still important ? depends on network speed ! 
    - go back to 0.5mbaud and test finally ? 

   - bldc running, commutating, encoder 1st or do adc ? scope it out 
Jake Read's avatar
Jake Read committed
24

Jake Read's avatar
Jake Read committed
25
26
## oy

Jake Read's avatar
Jake Read committed
27
28
29
30
31
32
33
34
35
 - pull out hand-written gcode for testing
 - rebase to commit prior to teardown, unless planner changed at all? 

 - documentation ... video ... fabclass, kerala (missing email?), oakland - should build a machine
 - controllers should work tho 
 - should very much remind them to find *people* to do the education

 - bridge has bug w/ two addresses only one is sent 

Jake Read's avatar
Jake Read committed
36
 - cooler demo 
Jake Read's avatar
Jake Read committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  - better gcode 
 - jog option ! 

 - should be able to loop easily 
 - want to show niche machines - this 'long tail mfg / automation' is a good pitch
  - heating elements, flow control, material handling etc 
  - closed cycle cardboard for cardboard machine 'high performance laser cutter feedstock' 
  - coffee roaster
  - etc 
  - flow control is solenoids on breadboardboard 
  - breadboardboard header solder on 'the rest' of circuitry solder on headers 

 - esperonto - / asicdesigner.net

 - go to pitch size for optical bench 

 - city / state budget flow assumes flow out, re-route flow into city thru education projects 
  - economic benifit + economic benefit 
  - fab academy - 'too long and expensive and inecessible to most users' 
  - realistically what do people make in fab labs - what can we show ... what would bring people in? 
Jake Read's avatar
Jake Read committed
57

58
59
60
61
 - port flushing ? 
 - want a test / reset set 
  - really, should be built into bridge (or hardware default objs)

Jake Read's avatar
Jake Read committed
62
63
 - read file ? default lines ? run it 

Jake Read's avatar
Jake Read committed
64
65
- 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
66
 - and this change ui / return double bounce ? 
Jake Read's avatar
Jake Read committed
67
- want jog keys & speed commands w/ those buttons 
68
- really want those LIGHTS 
Jake Read's avatar
Jake Read committed
69
70
71
72
73
74
75
76
77
78
79
80
- 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
81
82
83
## UI bugs /
 - reverse event lines ? .isLinked etc. .. 

Jake Read's avatar
Jake Read committed
84
85
86
87
88
89
90
91
## 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
92
93
94
95
96
97
  - 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
98

Jake Read's avatar
Jake Read committed
99
100
101
102
103
104
105
## remember

you have friends
 - bro
 - sean
 - nathan 

Jake Read's avatar
Jake Read committed
106
## links to things 
Jake Read's avatar
Jake Read committed
107

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

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

Jake Read's avatar
Jake Read committed
112
bootstrap, numeric.js ... 
Jake Read's avatar
Jake Read committed
113

Jake Read's avatar
Jake Read committed
114
http://backbonejs.org/#Events
115

116
117
## Desires
 - load / keep state 
Jake Read's avatar
Jake Read committed
118
119
120
 - run headless with view into 
 - collaborative program editing would be cool 
 - program save / load / edit ?
121

122
## Model Consistency
123

124
In Memory: array of modules
125

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

128
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. 
129

130
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.
131

132
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.
133

134
135
136
137
 - 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() ? 
138

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

Jake Read's avatar
Jake Read committed
141
142
143
144
145
146
147
148
149
150
# 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)