tiny-ahrsim
tiny-ahrsim copied to clipboard
TinyGo attitude estimation simulation applet.
tiny-ahrsim
TinyGo attitude estimation simulation applet. Here's a youtube video of the app in action with a Raspberry Pi Pico.
Instructions
Requirements
- Go installed (golang.org)
- git installed (git-scm.com)
- TinyGo installed (tinygo.org)
- gopherjs installed: once Go installed, run
go install github.com/gopherjs/gopherjs@latestin 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.jsandgraphics.js.map. -
Run the tinygo program (under
tinygodirectory) 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.htmlwith a browser and you are set.
⚠️ Notice! ⚠️
The gopherjs bindings for three.js have been archived!
If you are starting a new project consider using the WASM bindings!