Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TinyGo

 TinyGo

Presentation about TinyGo (https://tinygo.org) using Micro:bit microcontroller for demos.

Ladislav Prskavec

September 04, 2019
Tweet

More Decks by Ladislav Prskavec

Other Decks in Technology

Transcript

  1. Micro:bit 4 Nordic nRF51822 – 16 MHz 32-bit ARM Cortex-M0

    microcontroller, 256 KB flash memory, 16 KB static ram, 2.4 GHz Bluetooth low energy wireless networking. 4 NXP/Freescale KL26Z – 48 MHz ARM Cortex-M0+ core microcontroller, that includes a full- speed USB 2.0 On-The-Go (OTG) controller, used as a communication interface between USB and main Nordic microcontroller. 4 NXP/Freescale MMA8652 – 3-axis accelerometer sensor via I²C-bus. 4 NXP/Freescale MAG3110 – 3-axis magnetometer sensor via I²C-bus (to act as a compass and metal detector). 4 MicroUSB connector, battery connector, 25-pin edge connector. 4 Display consisting of 25 LEDs in a 5×5 array.[13] 4 Three tactile pushbuttons (two for applications, one for reset). Ladislav Prskavec - Golang Prague #4, 4th Sep 2019 6
  2. TinyGo compiler architecture 4 GO SSA 4 LLVM IR Ladislav

    Prskavec - Golang Prague #4, 4th Sep 2019 11
  3. package main import ( "machine" "time" ) const led =

    machine.P1 func main() { led.Configure(machine.PinConfig{Mode: machine.PinOutput}) for { led.Low() time.Sleep(time.Second) led.High() time.Sleep(time.Second) } } Ladislav Prskavec - Golang Prague #4, 4th Sep 2019 14
  4. TinyGO and WASM 4 Johan Brandhorst - Get Going with

    WebAssembly Ladislav Prskavec - Golang Prague #4, 4th Sep 2019 15
  5. References 4 Ron Evans talks on 4 Gophercon 2019 4

    Fosdem 2019 4 Ayke van Laëthem blog Ladislav Prskavec - Golang Prague #4, 4th Sep 2019 19
  6. Q & A Or ask on twitter: @abtris Ladislav Prskavec

    - Golang Prague #4, 4th Sep 2019 21