Compilation of LCD screen, ADC, and output examples.
It is suggested you run tinygo with Go 1.15 until #44557 is fixed
To run any example navigate to the example directory in command line
cd lcdscreen_adcThen 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!
- Create a directory and create a
.gofile of any name. Say we maketwister.go. - Create the module. Run
go mod init my_awesome_module(with any module name you find appropiate for your program) - Start coding in this directory. You may create more files if you wish to distribute you functions
- To enable intellisense on VSCode follow the instructions on IDE integration on tinygo.org. You basically have to create the same
.vscode/settings.jsonfile this repo has but with you ownGOROOTPath (this may differ between installations)
- To enable intellisense on VSCode follow the instructions on IDE integration on tinygo.org. You basically have to create the same
- Run
go mod tidywhen done programming. And flash your sketch with
tinygo flash -target=arduino -port=/dev/ttyUSB0 .