Coder Social home page Coder Social logo

soypat / tinygo-arduino-examples Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 27 KB

Compilation of LCD screen, ADC, and output examples.

License: BSD 3-Clause "New" or "Revised" License

Go 100.00%
tinygo embedded embedded-systems arduino arduino-uno arduino-uno-board arduino-uno-r3 golang go

tinygo-arduino-examples's Introduction

tinygo-arduino-examples

Compilation of LCD screen, ADC, and output examples.

It is suggested you run tinygo with Go 1.15 until #44557 is fixed

Run an example

To run any example navigate to the example directory in command line

cd lcdscreen_adc

Then flash the arduino. You must know the port it's on. On windows they typically are of the form COM1 through COM4. On Linux the port may look something like /dev/ttyACM0 or /dev/ttyUSB0.

tinygo flash -target=arduino -port=/dev/ttyUSB0 .

If everything goes OK, some progress bars should pop up and the process should end with a thankful message:

avrdude: verifying ...
avrdude: 7036 bytes of flash verified

avrdude done.  Thank you.

You now have tinygo running on your Arduino!

To create your own "sketch"

  1. Create a directory and create a .go file of any name. Say we make twister.go.
  2. Create the module. Run go mod init my_awesome_module (with any module name you find appropiate for your program)
  3. Start coding in this directory. You may create more files if you wish to distribute you functions
  4. Run go mod tidy when done programming. And flash your sketch with
tinygo flash -target=arduino -port=/dev/ttyUSB0 .

Install the serial monitor

go install github.com/soypat/tinygo-arduino-examples/monitor@latest

The executable will be installed to your GOBIN directory. To call from shell make sure GOBIN is in your PATH.

tinygo-arduino-examples's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gustavomurta

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.