All Projects → Michael-F-Bryan → adventures-in-motion-control

Michael-F-Bryan / adventures-in-motion-control

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
A realistic simulator for a 3D printer motion controller

Programming Languages

rust
11053 projects
Vue
7211 projects
typescript
32286 projects

Projects that are alternatives of or similar to adventures-in-motion-control

Pycnc
Python CNC machine controller for Raspberry Pi and other ARM Linux boards
Stars: ✭ 390 (+1158.06%)
Mutual labels:  cnc, 3d-printing
step-daemon
stepd - External planner and stepper for 3d printing
Stars: ✭ 85 (+174.19%)
Mutual labels:  cnc, 3d-printing
G2
g2core - The Next Generation
Stars: ✭ 437 (+1309.68%)
Mutual labels:  cnc, 3d-printing
rapcores
Robotic Application Processor
Stars: ✭ 14 (-54.84%)
Mutual labels:  cnc, 3d-printing
Qtquickvcp
A Virtual Control Panel for Machinekit written in Qt/C++/QML
Stars: ✭ 104 (+235.48%)
Mutual labels:  cnc, 3d-printing
Awesome Embedded Rust
Curated list of resources for Embedded and Low-level development in the Rust programming language
Stars: ✭ 2,805 (+8948.39%)
Mutual labels:  embedded-systems
Gnu Eprog
Embedded Programming with the GNU Toolchain
Stars: ✭ 230 (+641.94%)
Mutual labels:  embedded-systems
Lwgps
Lightweight GPS NMEA parser for embedded systems
Stars: ✭ 172 (+454.84%)
Mutual labels:  embedded-systems
Emlearn
Machine Learning inference engine for Microcontrollers and Embedded devices
Stars: ✭ 154 (+396.77%)
Mutual labels:  embedded-systems
G-Code-Arduino-Library
Allows any machines and robots to be controlled by G-Code
Stars: ✭ 44 (+41.94%)
Mutual labels:  cnc
nrf52840-experiments
802.15.4 experiments with nRF52840
Stars: ✭ 23 (-25.81%)
Mutual labels:  embedded-systems
Libonnx
A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.
Stars: ✭ 217 (+600%)
Mutual labels:  embedded-systems
Xfrp
xfrps&frp client for openwrt&LEDE
Stars: ✭ 205 (+561.29%)
Mutual labels:  embedded-systems
Open Electronics
📚 💻 Great Resources for Electronics Enthusiasts
Stars: ✭ 242 (+680.65%)
Mutual labels:  embedded-systems
Defmt
Efficient, deferred formatting for logging on embedded systems
Stars: ✭ 172 (+454.84%)
Mutual labels:  embedded-systems
keyboard-diy
DIY 60% split keyboard, 3D-printed and hand-wired
Stars: ✭ 55 (+77.42%)
Mutual labels:  3d-printing
Piscope
Turn your Raspberry Pi into an Oscilloscope/XY Plotter with Python
Stars: ✭ 155 (+400%)
Mutual labels:  embedded-systems
Sierra Wireless Modems
EM7565/EM7455/MC7455 - Modem Configuration
Stars: ✭ 217 (+600%)
Mutual labels:  embedded-systems
Libhydrogen
A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
Stars: ✭ 247 (+696.77%)
Mutual labels:  embedded-systems
Libuavcan
Portable reference implementation of the UAVCAN protocol stack in C++ for embedded systems and Linux.
Stars: ✭ 213 (+587.1%)
Mutual labels:  embedded-systems

Adventures in Motion Control

Build Status

(API Documentation/Blog Series)

A realistic simulator for a 3D printer motion controller.

Think of this as a worked example of how embedded systems are made. The project is a lot more than just a gcode interpreter, it gives you a full-blown motion controller which behaves like a real 3D printer complete with automation sequences and diagnostics.

To follow along with the making of this project, check out the Adventures in Motion Controller blog series.

Getting Started

This project has components from two different languages, which makes building things a little... complex.

First you'll need to generate the WASM bundle for the sim crate using wasm-pack.

$ wasm-pack build --release sim
$ ls sim/pkg
  aimc_sim.d.ts aimc_sim.js aimc_sim_bg.d.ts aimc_sim_bg.wasm package.json
  README.md sim.d.ts sim.js sim_bg.d.ts sim_bg.wasm

The generated WASM also needs to be linked into our JavaScript. In order to do this first go to sim/pkg

$ cd sim/pkg
$ yarn link

This will globally register aimc_sim package. Next go to frontend

$ cd frontend
$ yarn link aimc_sim

Next, you'll need to compile the frontend JavaScript code. During development, you'll probably want to use the dev server:

$ yarn install
$ yarn serve

Or to generate a production build:

$ yarn run build
$ ls dist
  0.bootstrap.js 1.bootstrap.js bootstrap.js ea9e01c84ad93861b0ad.module.wasm
  index.html

If you want the code to be automatically recompiled whenever there are any changes, you can usewatchexec. Open new terminal and execute.

TL;DR:

watchexec \
    --clear \
    --restart \
    --ignore 'sim/pkg/*' \
    --ignore 'frontend/package.json' \
    --ignore 'frontend/yarn.lock' \
    --ignore 'frontend/node_modules/*' \
    'wasm-pack build --release sim'

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].