Skip to content
Snippets Groups Projects
README.md 4.66 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Automatakit API
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    aka project consistent-sandbox 
    
    
    Jake Read's avatar
    Jake Read committed
    ## oy
    
    
    Jake Read's avatar
    Jake Read committed
    - then you have this multiline gcode / start / stop sequencing issue 
     - and with it, scrolling around your messy program 
    - want jog keys & speed commands w/ those buttons 
    
    - really want those LIGHTS 
    
    Jake Read's avatar
    Jake Read committed
    - 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 ?
    
    ## 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
    
    
    ~ for SFO, we do ~ 
     - machine eats gcode and runs it, and jogs, etc 
     - stretch to add rotary joint ... could concievably do this in the planner also
     - *so* 
      - planner emits moves, steppers pick them out, reply with their axis ids,
      - 
    
    
    - gcode -> planner -> stepper, loops back ? 
     - draft out event system architecture ... 
     - write gcode multiline inputs, would be cool to track current pos also
     - try fancy txt edit library in UI, like how do we ready for three.js hooks ? 
    
    - modular / muxable axis movements
     - i.e. 'back and forth button' UI elements
    - gcode text block / path / file read-in 
    
    Jake Read's avatar
    Jake Read committed
    
    - some styling 
     - state 'squishes' when module moved too far right 
     - state 'input' length / title length for long titles ?
    
    
    - state context menu or button - like 'fire this listener' on click, or get alt description, later edit, reload etc 
    
    Jake Read's avatar
    Jake Read committed
    
    - bridge should be able to look for devices, test devices, and do terminal stuff 
    
    - right-click on title of module, reload 
    
    - for crashes etc, how can we re-start / kick serverside from the browser? some other daemon program ?
    
    - probably shouldn't send *all* of the state every time ... ? 
     - althought it's nice and foolproof 
    
    - still want more diverse html inputs ... i.e. text input with some size to it ? gcode parser for this ... 
    
    - 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 
    
    
    Jake Read's avatar
    Jake Read committed
    - state variables good
    - final steps before writing gcode consumption program 
    
    Jake Read's avatar
    Jake Read committed
     - nomenclature all over the place is spaget
     - rewriting this is a good reintroduction to project 
      - cleaner replace ? wholistic replace ?
      - classes / pretty code ? find desires by using 
    
     - any kind of save / load 
      - still with script-type writable file ? 
    
    
    Jake Read's avatar
    Jake Read committed
     - but largely ready to write planner, serialport and packet parsing modules, do gcode stuff 
    
    
    - server modules are ground truth
    - to the client, we serve representations of these modules
    - on the client, we keep a copy of this rep , and build a UI for it, ``rep.ui``
    - to interface, we push the rep json back and forth, mostly the rep.state object 
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    ## remember
    
    you have friends
     - bro
     - sean
     - nathan 
    
    
    Jake Read's avatar
    Jake Read committed
    ## links to things 
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    http://designmodo.github.io/Flat-UI/
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    http://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage 
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    bootstrap, numeric.js ... 
    
    Jake Read's avatar
    Jake Read committed
    
    
    Jake Read's avatar
    Jake Read committed
    http://backbonejs.org/#Events
    
    Jake Read's avatar
    Jake Read committed
     - run headless with view into 
     - collaborative program editing would be cool 
     - program save / load / edit ?
    
    Saved / interfaced with: json of this - so to load from this, we need paths and ids attached to each module on load time.
    
    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. 
    
    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.
    
    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.
    
     - 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() ? 
    
    For extra points, we read in the connection also with an SVG layer - iterating through connections of the represented program.
    
    Jake Read's avatar
    Jake Read committed
    # 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)