tiny-ahrsim
TinyGo attitude estimation simulation applet.
Instructions
Requirements
- Go installed (golang.org)
- git installed (git-scm.com)
- TinyGo installed (tinygo.org)
- gopherjs installed: once Go installed, run
go get -u github.com/gopherjs/gopherjs
in console
Steps
-
Clone repository to local computer
git clone https://github.com/soypat/tiny-ahrsim.git
-
Change directory to this repo and generate frontend app with gopherjs
gopherjs build ./graphics/
This should create two files:
graphics.js
andgraphics.js.map
. -
Run the tinygo program (under
tinygo
directory) on your microcontroller of choice, make sure your microcontroller is accesible via USB. Take note of the port which it is available on (usually COM1, COM2, or COM3 on windows). For an Arduino UNO you'd flash the program as follows:tinygo flash -target=arduino ./tinygo/main.go
-
Run Simulation program specifying the port of the USB device
go run . -ttl=COM3 -p=":8080"
-
Open
index.html
with a browser and you are set.