Git Product home page Git Product logo

marklinsim's Introduction

Overview

MärklinSim is a software simulation of a Märklin train set. It accepts train set commands through a TCP port or a Unix domain socket, instead of serial I/O which the real Märklin train controller uses.

The default setup is a copy of the ones in UWaterloo MC3018 (aka the train lab).

If you are taking CS 452, this project should only be used as a reference when the track set is not available. You should always test your program on an actual hardware.

Demo

Screenshot of MärklinSim

Click the following image to watch the video.

Video demo of MärklinSim

Get started

MärklinSim is based on Electron, therefore it is cross-platform naturally.

You need to install Node.js before using MärklinSim. Node v8.x.x is recommended.

Run npm install at the root directory of this project once you have a Node environment.

Run npm run compile-main at the root directory of this project to compile TypeScript source files.

Run npm run copy-resources at the root directory of this project to copy resource files.

Run ./node_modules/.bin/electron ./dist/main.js to start the program. By default it will listen TCP port 3018.

Use MärklinSim with your train program

In CS 452 at University of Waterloo, the train program runs on a TS7200 ARM box. If your program also does so, you can either run your program on QEMU, or redirect the UART communication of your ARM box to a TCP port.

Here I will give an example of using QEMU with MärklinSim. First, run MärklinSim. Then run QEMU_AUDIO_DRV=none qemu-system-arm -M versatilepb -m 128M -nographic -nodefaults -serial tcp:127.0.0.1:3018 -serial stdio -kernel ./YOUR_PROGRAM.bin.

marklinsim's People

Contributors

martin1994 avatar alexkursell avatar tbroadley avatar

Stargazers

 avatar Daniel Liu avatar Yi Zhao avatar mayu326 avatar Able avatar YI REN avatar Q.Levin avatar  avatar Simon Suo avatar Christoph Ulshoefer avatar Julian Maingot avatar  avatar Raymond Wan avatar

Watchers

James Cloos avatar  avatar

marklinsim's Issues

Install instructions don't work

Amazing project!! 🎉 Thanks for doing this
But

on a clean node.js installation, performing npm install --only=dev does not work (bezier-js is missing in devDependencies)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.