TinyGo Home on TinyGo https://tinygo.org/ Recent content in TinyGo Home on TinyGo Hugo en Adding runtime support for new processors https://tinygo.org/docs/guides/contributing/boards/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/contributing/boards/ In order for a processor to support time.Sleep() and other things you normally expect, there are some functions that need to be implemented in the runtime for that processor. runtime timers/sleep Functions that need to be implemented: // timeUnit defines the type of the unit of time used for that processor per tick. // can be measured in nanoseconds, microseconds, or milliseconds. // the important part is that it be consistent for any particular processor. Basic command examples https://tinygo.org/docs/reference/usage/basic/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/usage/basic/ Building “Hello, World” program for WebAssembly To build the WASM example, run the following command: tinygo build -o wasm.wasm -target=wasm examples/wasm/export See the WebAssembly page for more information on executing the compiled WebAssembly. Building/flashing a “blink” program for micro:bit To build and then flash a basic blink program for a micro:bit board: Plug your micro:bit into your computer’s USB port. The micro:bit board will appear to your computer like a USB drive. Blinking LED https://tinygo.org/docs/tutorials/blinky/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/tutorials/blinky/ After you’ve installed TinyGo, you can now start using it! We’re going to blink an LED. A blinking LED is like the hello world of hardware: it is the smallest piece of code that shows the hardware is working. For this tutorial, previous experience with Go is not required but recommended. You will need a board with an onboard LED. Most education and development boards will work, with the notable exception of the BBC micro:bit. Blinking LED https://tinygo.org/tour/blink/onboard/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/blink/onboard/ This is the classic “blinking LED” demo you will find in many places. You can find it for the Arduino IDE for example. Here is the equivalent in Go. If you have one of the supported boards (see the dropdown below the code), you can run this code on your own hardware! If you don’t, you can just use the simulator that’s already running. Going through the code we can see the following: Get started with I2C https://tinygo.org/tour/imu/connected/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/imu/connected/ The LIS3DH sensor can measure acceleration and changes in temperature. But to get this data from the sensor, we need a way to establish communication. We’ll be using the I2C protocol, which is the most common way to communicate with low-speed external devices. i2c := machine.I2C0 err := i2c.Configure(machine.I2CConfig{ SCL: machine.GP17, SDA: machine.GP16, }) To start using I2C, we need to configure I2C on the microcontroller. This code (for the Raspberry Pi Pico) configures GP17 and GP16 as the pins to be used. GPIO https://tinygo.org/docs/concepts/peripherals/gpio/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/peripherals/gpio/ For API documentation, see the machine API. GPIO is the most basic form of interacting with the outside world on a microcontroller. It makes it possible to set a pin to low (connected to ground) or high (connected to VCC, usually 3.3V or 5V). GPIO also allows reading whether a pin is low or high. Controlling GPIO output You might have seen the classic blinking LED example before, but here it is again: Introduction https://tinygo.org/tour/ws2812/intro/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/ws2812/intro/ You’ve probably seen or used these LEDs before. They’re extremely common in the maker scene, for a good reason! They’re cheap, widely available, and easy to use. You can control them from basically any microcontroller with just a single pin and a good power supply. On the right you can see how to control them. Some boards include WS2812 boards, so you can use those without fiddling with wires. ledPin.Configure(machine.PinConfig{Mode: machine. LED: blink https://tinygo.org/tour/pwm/blink/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/blink/ PWM, or pulse-width modulation, is a method of turning a GPIO pin high and low at a fixed frequency but changing the percent of time it is turned on. This has numerous applications, such as dimming LEDs. We’ll see various applications of PWM throughout this tour. To start off with, we’re going to do something slightly unusual with PWM: we’re going to blink an LED. Remember that PWM is a way of quickly turning an output high and low, if we do that slow enough we can see the LED blink. Microcontroller Targets https://tinygo.org/docs/concepts/compiler-internals/microcontrollers/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/microcontrollers/ TinyGo was designed to run on microcontrollers, but the Go language wasn’t. This means there are a few challenges to writing Go code for microcontrollers. Microcontrollers have very little RAM and execute code directly from flash. Also, constant globals are generally put in flash whenever possible. The Go language itself heavily relies on garbage collection so care must be taken to avoid dynamic memory allocation. ARM ARM Cortex-M processors are well supported. Package organization https://tinygo.org/docs/guides/contributing/organization/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/contributing/organization/ There are many packages in the TinyGo repository. Here is an overview, and a brief description what they’re for. Packages can be split in two kinds: compiler packages and GOROOT packages. Compiler packages are the ones that are part of the TinyGo compiler itself: they will generate the object files and call a linker to link them together. The GOROOT packages are the packages you can import from a program, such as the TinyGo "machine" package. Reading button input https://tinygo.org/tour/button/onboard/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/button/onboard/ Having some output using a LED is nice, but what’s even better is if the electronics respond to you! In this example, we’ll use one of the supported boards that have a button on them. If you don’t have one of these boards, you can just read the code here and try the next step in the tour where you can connect an external button (or just use a wire). Animating LEDs https://tinygo.org/tour/ws2812/animating/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/ws2812/animating/ Manually setting the color of each LED is nice, but of course it’s much more interesting to animate them! Of course that’s possible with a bit more code, see the code and demo on the right. There are many ways to code an animation, but one that works well in many cases is by using a main loop that updates the in-memory color values, sends them out to the LED strip, and sleeps for a bit. Configuring the accelerometer https://tinygo.org/tour/imu/configure/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/imu/configure/ The accelerometer that we are using, LIS3DH, starts in a low power mode. That’s not the case for all such sensors, many start up in an already enabled state that uses more power. Starting up to a low power mode means that we can ignore the accelerometer when we don’t use it and it won’t use more power than necessary, but it does mean we need to configure it before we can use it. External button https://tinygo.org/tour/button/external/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/button/external/ This time we’ll be blinking an LED, but only when the button is pressed. If you try it out, you’ll see that the LED is initially off (or on), but when you press the button it’ll quickly blink. When you release the button, the blinking will stop and it will keep the last state (either on or off). If you have one of these boards but do not have a pushbutton, you can also use a small wire to connect the given pin (D2/A2/GP2 depending on the board) and then touch a ground point, such as the outside of the USB connector. External LED https://tinygo.org/tour/blink/external/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/blink/external/ Instead of using an on-board LED, you can also connect a LED to an external pin. Just like you see in the example on the right. It connects an external LED (a red one in this case) to the pin A1 on the board. The code is almost identical to the previous example. The only difference is this line: led := machine.A1 We’ve replaced the led variable: instead of the on-board LED we’re now using the external pin A1. I2C https://tinygo.org/docs/concepts/peripherals/i2c/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/peripherals/i2c/ For API documentation, see the machine API. I2C is a widely used protocol for communication between chips because it requires only two digital pins on a microcontroller to communicate with multiple external devices on a single bus. It is not very fast however so it is primarily used for small sensors. An alternative name that is sometimes used is two-wire interface (or TWI), as it requires only two signal wires. Interrupts https://tinygo.org/docs/concepts/compiler-internals/interrupts/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/interrupts/ Interrupts are crucial if you want to do anything high-performance on microcontrollers. Unfortunately, the only close substitute in the Go language (os/signal.Notify) is rather heavyweight. Therefore TinyGo uses a simpler way to work with interrupts. Note: in most cases, you shouldn’t need to work directly with interrupts. The machine package tries to abstract it away to provide a simple interface to work with. However, this page is here if you want to work on the machine package or need to override an interrupt. LED: fade https://tinygo.org/tour/pwm/fade/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/fade/ Next up, we’re going to do what PWM was actually designed for! Namely, quickly controlling an output so that the average output can be controlled precisely. Most of it is similar to blinking an LED using the PWM peripheral, but fading needs a little bit more work: // Fade the LED in. for percentOn := 0; percentOn <= 100; percentOn++ { pwm.Set(ch, pwm.Top()*uint32(percentOn)/100) time.Sleep(time.Second / 100) } Here we fade the LED in. Subcommands https://tinygo.org/docs/reference/usage/subcommands/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/usage/subcommands/ TinyGo tries to be similar to the main go command in usage. It consists of the following main subcommands: build Build compiles the package named by the import path, along with its dependencies, but it does not install the result. The generated file type depends on the extension: .o Create a relocatable object file. You can use this option if you don’t want to use the TinyGo build system or want to do other custom things. Using PWM https://tinygo.org/docs/tutorials/pwm/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/tutorials/pwm/ If you’ve gone through the blinky example and want to take it to the next level with PWM, or Pulse-Width Modulation, this is the tutorial for you. PWM allows for control of most servos and LED intensity. We’ll be trying out the latter here. Requirements Go tool. Get it at golang.org TinyGo tool. Here’s the quick install guide A microcontroller with an on-board LED and PWM peripheral such as the Raspberry Pi Pico (MSRP $4 USD) Let’s create a directory anywhere on your computer and navigate to it with the terminal. Watchdog https://tinygo.org/docs/concepts/peripherals/watchdog/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/peripherals/watchdog/ For API documentation, see the machine API Many microcontrollers include some form of watchdog peripheral. Watchdog peripherals are used to restart the microprocessor in the event of a fault condition (typically a software bug). Watchdogs are typically based around a fixed-frequency hardware timer that counts down from a configured value to zero. On reaching zero a reset is triggered. To prevent a reset the software must periodically update the watchdog, causing the counter to return to it’s initial value. What is TinyGo exactly? https://tinygo.org/docs/concepts/faq/what-is-tinygo/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/faq/what-is-tinygo/ A new compiler and a new runtime implementation. Specifically: A new compiler using (mostly) the standard library to parse Go programs and using LLVM to optimize the code and generate machine code for the target architecture. A new runtime library that implements some compiler intrinsics, like a memory allocator, a scheduler, and operations on strings. Also, some packages that are strongly connected to the runtime like the sync package and the reflect package have been or will be re-implemented for use with this new compiler. Adafruit Circuit Playground Bluefruit https://tinygo.org/docs/reference/microcontrollers/circuitplay-bluefruit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/circuitplay-bluefruit/ The Adafruit Circuit Playground Bluefruit is small ARM development board based on the Nordic Semiconductor nrf52840 processor. It has several built-in devices such as WS2812 “NeoPixel” LEDs, buttons, an accelerometer, and some other sensors. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_30 A6, UART_RX_PIN D1 P0_14 A7, UART_TX_PIN D2 P0_05 A5, SDA_PIN D3 P0_04 A4, SCL_PIN D4 P1_02 BUTTONA, BUTTON D5 P1_15 BUTTONB, BUTTON1 D6 P0_02 A1 D7 P1_06 SLIDER D8 P0_13 NEOPIXELS, WS2812 D9 P0_29 A2 D10 P0_03 A3 D11 P1_04 D12 P0_26 D13 P1_14 LED A8 P0_28 LIGHTSENSOR A9 P0_31 TEMPSENSOR SDA1_PIN P1_10 SCL1_PIN P1_12 SPI0_SCK_PIN P0_19 SPI0_SDO_PIN P0_21 SPI0_SDI_PIN P0_23 PDM_CLK_PIN P0_17 PDM_DIN_PIN P0_16 Machine Package Docs Documentation for the machine package for the Circuit Playground Bluefruit Adafruit Circuit Playground Express https://tinygo.org/docs/reference/microcontrollers/circuitplay-express/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/circuitplay-express/ The Adafruit Circuit Playground Express is small ARM development board based on the Atmel SAMD21 family of processors. It has several built-in devices such as WS2812 “NeoPixel” LEDs, buttons, an accelerometer, and some other sensors. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PB09 A6, UART_RX_PIN D1 PB08 A7, UART_TX_PIN D2 PB02 A5, SDA_PIN I2C0 (SDA) D3 PB03 A4, SCL_PIN I2C0 (SCL) D4 PA28 BUTTONA, BUTTON D5 PA14 BUTTONB, BUTTON1 TCC0 (channel 0) D6 PA05 A1 TCC0 (channel 1) D7 PA15 SLIDER TCC0 (channel 1) D8 PB23 NEOPIXELS, WS2812 D9 PA06 A2 TCC1 (channel 0) D10 PA07 A3 TCC1 (channel 1) D12 PA02 A0 D13 PA17 LED I2C1 (SCL) TCC2 (channel 1), TCC0 (channel 3) A8 PA11 LIGHTSENSOR TCC1 (channel 1), TCC0 (channel 3) A9 PA09 TEMPSENSOR TCC0 (channel 1), TCC1 (channel 3) A10 PA04 PROXIMITY TCC0 (channel 0) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) SDA1_PIN PA00 I2C1 (SDA) TCC2 (channel 0) SCL1_PIN PA01 I2C1 (SCL) TCC2 (channel 1) SPI0_SCK_PIN PA21 TCC0 (channel 3) SPI0_SDO_PIN PA20 TCC0 (channel 2) SPI0_SDI_PIN PA16 I2C1 (SDA) TCC2 (channel 0), TCC0 (channel 2) I2S_SCK_PIN PA10 TCC1 (channel 0), TCC0 (channel 2) I2S_SDO_PIN PA08 TCC0 (channel 0), TCC1 (channel 2) Machine Package Docs Documentation for the machine package for the Circuit Playground Express Adafruit CLUE https://tinygo.org/docs/reference/microcontrollers/clue/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/clue/ The Adafruit CLUE is small ARM development board based on the Nordic Semiconductor nrf52840 processor. It has several built-in devices such as WS2812 “NeoPixel” LEDs, buttons, an accelerometer, and some other sensors. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_04 A2, UART_RX_PIN D1 P0_05 A3, UART_TX_PIN D2 P0_03 A4 D3 P0_28 A5 D4 P0_02 A6 D5 P1_02 BUTTON_LEFT D6 P1_09 D7 P0_07 D8 P1_07 D9 P0_27 D10 P0_30 A7 D11 P1_10 BUTTON_RIGHT D12 P0_31 A0 D13 P0_08 SPI0_SCK_PIN D14 P0_06 SPI0_SDI_PIN D15 P0_26 SPI0_SDO_PIN D16 P0_29 A1 D17 P1_01 LED, LED1 D18 P0_16 NEOPIXEL, WS2812 D19 P0_25 SCL_PIN D20 P0_24 SDA_PIN D29 P0_14 TFT_SCK D30 P0_15 TFT_SDO D31 P0_12 TFT_CS D32 P0_13 TFT_DC D33 P1_03 TFT_RESET D34 P1_05 TFT_LITE D35 P0_00 PDM_DAT D36 P0_01 PDM_CLK D37 P0_19 QSPI_SCK D38 P0_20 QSPI_CS D39 P0_17 QSPI_DATA0 D40 P0_22 QSPI_DATA1 D41 P0_23 QSPI_DATA2 D42 P0_21 QSPI_DATA3 D43 P0_10 LED2 D44 P0_09 D45 P1_06 D46 P1_00 SPEAKER Machine Package Docs Documentation for the machine package for the Adafruit CLUE Adafruit Feather M0 https://tinygo.org/docs/reference/microcontrollers/feather-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-m0/ The Adafruit Feather M0 is a tiny ARM development board based on the Atmel ATSAMD21G18 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA11 TCC1 (channel 1), TCC0 (channel 3) D1 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D3 PA09 TCC0 (channel 1), TCC1 (channel 3) D4 PA08 I2S_SDO_PIN TCC0 (channel 0), TCC1 (channel 2) D5 PA15 TCC0 (channel 1) D6 PA20 TCC0 (channel 2) D8 PA06 TCC1 (channel 0) D9 PA07 TCC1 (channel 1) D10 PA18 UART_TX_PIN TCC0 (channel 2) D11 PA16 UART_RX_PIN I2C0 (SDA) TCC2 (channel 0), TCC0 (channel 2) D12 PA19 TCC0 (channel 3) D13 PA17 LED I2C0 (SCL) TCC2 (channel 1), TCC0 (channel 3) A0 PA02 A1 PB08 A2 PB09 A3 PA04 TCC0 (channel 0) A4 PA05 TCC0 (channel 1) A5 PB02 USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) SDA_PIN PA22 I2C0 (SDA) TCC0 (channel 0) SCL_PIN PA23 I2C0 (SCL) TCC0 (channel 1) SPI0_SCK_PIN PB11 TCC0 (channel 1) SPI0_SDO_PIN PB10 TCC0 (channel 0) SPI0_SDI_PIN PA12 TCC2 (channel 0), TCC0 (channel 2) Machine Package Docs Documentation for the machine package for the Adafruit Feather M0 Adafruit Feather M4 https://tinygo.org/docs/reference/microcontrollers/feather-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-m4/ The Adafruit Feather M4 is a tiny ARM development board based on the Atmel ATSAMD51J19 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PB17 UART_RX_PIN TCC3 (channel 1), TCC0 (channel 5) D1 PB16 UART_TX_PIN TCC3 (channel 0), TCC0 (channel 4) D4 PA14 TCC2 (channel 0), TCC1 (channel 2) D5 PA16 TCC1 (channel 0), TCC0 (channel 4) D6 PA18 TCC1 (channel 2), TCC0 (channel 6) D8 PB03 WS2812 TCC2 (channel 3) D9 PA19 TCC1 (channel 3), TCC0 (channel 7) D10 PA20 TCC1 (channel 4), TCC0 (channel 0) D11 PA21 TCC1 (channel 5), TCC0 (channel 1) D12 PA22 TCC1 (channel 6), TCC0 (channel 2) D13 PA23 LED TCC1 (channel 7), TCC0 (channel 3) D21 PA13 SCL_PIN I2C0 (SCL) TCC0 (channel 7), TCC1 (channel 3) D22 PA12 SDA_PIN I2C0 (SDA) TCC0 (channel 6), TCC1 (channel 2) D23 PB22 SPI0_SDI_PIN D24 PB23 SPI0_SDO_PIN D25 PA17 SPI0_SCK_PIN TCC1 (channel 1), TCC0 (channel 5) A0 PA02 A1 PA05 A2 PB08 A3 PB09 A4 PA04 UART2_TX_PIN A5 PA06 UART2_RX_PIN USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) QSPI_SCK PB10 TCC0 (channel 4), TCC1 (channel 0) QSPI_CS PB11 TCC0 (channel 5), TCC1 (channel 1) QSPI_DATA0 PA08 I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 4) QSPI_DATA1 PA09 I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 5) QSPI_DATA2 PA10 TCC0 (channel 2), TCC1 (channel 6) QSPI_DATA3 PA11 TCC0 (channel 3), TCC1 (channel 7) Machine Package Docs Documentation for the machine package for the Adafruit Feather M4 Adafruit Feather M4 CAN https://tinygo.org/docs/reference/microcontrollers/feather-m4-can/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-m4-can/ The Adafruit Feather M4 CAN is a tiny ARM development board based on the Atmel ATSAME51J19 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PB17 UART_RX_PIN TCC3 (channel 1), TCC0 (channel 5) D1 PB16 UART_TX_PIN TCC3 (channel 0), TCC0 (channel 4) D4 PA14 TCC2 (channel 0), TCC1 (channel 2) D5 PA16 TCC1 (channel 0), TCC0 (channel 4) D6 PA18 TCC1 (channel 2), TCC0 (channel 6) D7 PB03 TCC2 (channel 3) D8 PB02 NEOPIXELS, WS2812 TCC2 (channel 2) D9 PA19 TCC1 (channel 3), TCC0 (channel 7) D10 PA20 TCC1 (channel 4), TCC0 (channel 0) D11 PA21 TCC1 (channel 5), TCC0 (channel 1) D12 PA22 CAN0_TX TCC1 (channel 6), TCC0 (channel 2) D13 PA23 LED, CAN0_RX TCC1 (channel 7), TCC0 (channel 3) D21 PA13 SCL_PIN I2C0 (SCL) TCC0 (channel 7), TCC1 (channel 3) D22 PA12 SDA_PIN I2C0 (SDA) TCC0 (channel 6), TCC1 (channel 2) D23 PB22 SPI0_SDI_PIN D24 PB23 SPI0_SDO_PIN D25 PA17 SPI0_SCK_PIN TCC1 (channel 1), TCC0 (channel 5) A0 PA02 A1 PA05 A2 PB08 A3 PB09 A4 PA04 UART2_TX_PIN A5 PA06 UART2_RX_PIN USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) CAN1_STANDBY PB12 CAN_STANDBY, CAN_S TCC3 (channel 0), TCC0 (channel 0) CAN1_TX PB14 CAN_TX TCC4 (channel 0), TCC0 (channel 2) CAN1_RX PB15 CAN_RX TCC4 (channel 1), TCC0 (channel 3) BOOST_EN PB13 TCC3 (channel 1), TCC0 (channel 1) QSPI_SCK PB10 TCC0 (channel 4), TCC1 (channel 0) QSPI_CS PB11 TCC0 (channel 5), TCC1 (channel 1) QSPI_DATA0 PA08 I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 4) QSPI_DATA1 PA09 I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 5) QSPI_DATA2 PA10 TCC0 (channel 2), TCC1 (channel 6) QSPI_DATA3 PA11 TCC0 (channel 3), TCC1 (channel 7) Machine Package Docs Documentation for the machine package for the Adafruit Feather M4 CAN Adafruit Feather nRF52840 Express https://tinygo.org/docs/reference/microcontrollers/feather-nrf52840/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-nrf52840/ The Adafruit Feather nRF52840 is a small ARM development board based on the Nordic Semiconductor nrf52840 processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_25 UART_TX_PIN D1 P0_24 UART_RX_PIN D2 P0_10 D3 P1_15 LED, LED1 D4 P1_10 LED2 D5 P1_08 D6 P0_07 D7 P1_02 BUTTON D8 P0_16 NEOPIXEL, WS2812 D9 P0_26 D10 P0_27 D11 P0_06 D12 P0_08 D13 P1_09 D14 P0_04 A0 D15 P0_05 A1 D16 P0_30 A2 D17 P0_28 A3 D18 P0_02 A4 D19 P0_03 A5 D20 P0_29 A6 D21 P0_31 A7 D22 P0_12 SDA_PIN D23 P0_11 SCL_PIN D24 P0_15 SPI0_SDI_PIN D25 P0_13 SPI0_SDO_PIN D26 P0_14 SPI0_SCK_PIN D27 P0_19 QSPI_SCK D28 P0_20 QSPI_CS D29 P0_17 QSPI_DATA0 D30 P0_22 QSPI_DATA1 D31 P0_23 QSPI_DATA2 D32 P0_21 QSPI_DATA3 D33 P0_09 Machine Package Docs Documentation for the machine package for the Adafruit Feather nRF52840 Adafruit Feather nRF52840 Sense https://tinygo.org/docs/reference/microcontrollers/feather-nrf52840-sense/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-nrf52840-sense/ The Adafruit Feather nRF52840 Sense is a small ARM development board based on the Nordic Semiconductor nrf52840 processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_25 UART_TX_PIN D1 P0_24 UART_RX_PIN D2 P0_10 D3 P1_11 D4 P1_10 LED2 D5 P1_08 D6 P0_07 D7 P1_02 BUTTON D8 P0_16 NEOPIXEL, WS2812 D9 P0_26 D10 P0_27 D11 P0_06 D12 P0_08 D13 P1_09 LED, LED1 D14 P0_04 A0 D15 P0_05 A1 D16 P0_30 A2 D17 P0_28 A3 D18 P0_02 A4 D19 P0_03 A5 D20 P0_29 A6 D21 P0_31 A7 D22 P0_12 SDA_PIN D23 P0_11 SCL_PIN D24 P0_15 SPI0_SDI_PIN D25 P0_13 SPI0_SDO_PIN D26 P0_14 SPI0_SCK_PIN D27 P0_19 QSPI_SCK D28 P0_20 QSPI_CS D29 P0_17 QSPI_DATA0 D30 P0_22 QSPI_DATA1 D31 P0_23 QSPI_DATA2 D32 P0_21 QSPI_DATA3 D33 P0_09 Machine Package Docs Documentation for the machine package for the Adafruit Feather nRF52840 Sense Adafruit Feather RP2040 https://tinygo.org/docs/reference/microcontrollers/feather-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-rp2040/ The Adafruit Feather RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D4 GPIO6 I2C1 (SDA) PWM3 (channel A) D5 GPIO7 I2C1 (SCL) PWM3 (channel B) D6 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) D9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) D10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) D11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) D12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) D13 GPIO13 LED I2C0 (SCL) PWM6 (channel B) D24 GPIO24 I2C0_SDA_PIN PWM4 (channel A) D25 GPIO25 I2C0_SCL_PIN PWM4 (channel B) A0 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) A1 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) A2 GPIO28 ADC2 PWM6 (channel A) A3 GPIO29 ADC3 PWM6 (channel B) I2C1_SDA_PIN GPIO2 SDA_PIN I2C1 (SDA) PWM1 (channel A) I2C1_SCL_PIN GPIO3 SCL_PIN I2C1 (SCL) PWM1 (channel B) SPI0_SCK_PIN GPIO18 I2C1 (SDA) PWM1 (channel A) SPI0_SDO_PIN GPIO19 I2C1 (SCL) PWM1 (channel B) SPI0_SDI_PIN GPIO20 I2C0 (SDA) PWM2 (channel A) UART0_TX_PIN GPIO0 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO1 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) Machine Package Docs Documentation for the machine package for the Adafruit Feather RP2040 Adafruit Feather STM32F405 Express https://tinygo.org/docs/reference/microcontrollers/feather-stm32f405/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/feather-stm32f405/ The Adafruit Feather STM32F405 is a tiny ARM development board based on the ST Micro STM32F405 family of microcontrollers. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names D0 PB11 UART1_RX_PIN, UART0_RX_PIN, UART_RX_PIN, I2C2_SDA_PIN D1 PB10 UART1_TX_PIN, UART0_TX_PIN, UART_TX_PIN, I2C2_SCL_PIN D2 PB3 SPI2_SCK_PIN D3 PB4 SPI2_SDI_PIN D4 PB5 SPI2_SDO_PIN D5 PC7 UART2_RX_PIN D6 PC6 UART2_TX_PIN D7 PA15 D8 PC0 LED_NEOPIXEL, WS2812 D9 PB8 I2C3_SDA_PIN D10 PB9 I2C3_SCL_PIN D11 PC3 D12 PC2 D13 PC1 LED_RED, LED_BUILTIN, LED D14 PB7 UART3_RX_PIN, I2C1_SDA_PIN, I2C0_SDA_PIN, I2C_SDA_PIN, SDA_PIN D15 PB6 UART3_TX_PIN, I2C1_SCL_PIN, I2C0_SCL_PIN, I2C_SCL_PIN, SCL_PIN D16 PA4 A0 D17 PA5 A1, SPI3_SCK_PIN D18 PA6 A2, SPI3_SDI_PIN D19 PA7 A3, SPI3_SDO_PIN D20 PC4 A4 D21 PC5 A5 D22 PA3 A6 D23 PB13 SPI1_SCK_PIN, SPI0_SCK_PIN, SPI_SCK_PIN D24 PB14 SPI1_SDI_PIN, SPI0_SDI_PIN, SPI_SDI_PIN D25 PB15 SPI1_SDO_PIN, SPI0_SDO_PIN, SPI_SDO_PIN D26 PC8 D27 PC9 D28 PC10 D29 PC11 D30 PC12 D31 PD2 D32 PB12 D33 PC14 D34 PC15 D35 PA11 D36 PA12 D37 PA13 D38 PA14 Machine Package Docs Documentation for the machine package for the Adafruit Feather STM32F405 Adafruit Grand Central M4 https://tinygo.org/docs/reference/microcontrollers/grandcentral-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/grandcentral-m4/ The Adafruit Grand Central M4 is a tiny ARM development board based on the Atmel ATSAMD51P20 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PB25 UART1_RX_PIN, UART_RX_PIN D1 PB24 UART1_TX_PIN, UART_TX_PIN D2 PC18 TCC0 (channel 2) D3 PC19 TCC0 (channel 3) D4 PC20 TCC0 (channel 4) D5 PC21 TCC0 (channel 5) D6 PD20 TCC1 (channel 0) D7 PD21 TCC1 (channel 1) D8 PB18 TCC1 (channel 0) D9 PB02 TCC2 (channel 2) D10 PB22 D11 PB23 D12 PB00 D13 PB01 D87, LED_PIN, LED D14 PB16 UART4_TX_PIN, I2S0_SCK_PIN, I2S_SCK_PIN TCC3 (channel 0), TCC0 (channel 4) D15 PB17 UART4_RX_PIN, I2S0_MCK_PIN TCC3 (channel 1), TCC0 (channel 5) D16 PC22 UART3_TX_PIN TCC0 (channel 6) D17 PC23 UART3_RX_PIN TCC0 (channel 7) D18 PB12 UART2_TX_PIN TCC3 (channel 0), TCC0 (channel 0) D19 PB13 UART2_RX_PIN TCC3 (channel 1), TCC0 (channel 1) D20 PB20 D62, I2C0_SDA_PIN, I2C_SDA_PIN, SDA_PIN TCC1 (channel 2) D21 PB21 D63, I2C0_SCL_PIN, I2C_SCL_PIN, SCL_PIN TCC1 (channel 3) D22 PD12 TCC0 (channel 5) D23 PA15 TCC2 (channel 1), TCC1 (channel 3) D24 PC17 I2C1_SCL_PIN TCC0 (channel 1) D25 PC16 I2C1_SDA_PIN TCC0 (channel 0) D26 PA12 TCC0 (channel 6), TCC1 (channel 2) D27 PA13 TCC0 (channel 7), TCC1 (channel 3) D28 PA14 TCC2 (channel 0), TCC1 (channel 2) D29 PB19 TCC1 (channel 1) D30 PA23 I2C0 (SCL) TCC1 (channel 7), TCC0 (channel 3) D31 PA22 I2S0_SDI_PIN I2C0 (SDA) TCC1 (channel 6), TCC0 (channel 2) D32 PA21 I2S0_SDO_PIN, I2S_SDO_PIN TCC1 (channel 5), TCC0 (channel 1) D33 PA20 I2S0_FS_PIN, I2S_WS_PIN TCC1 (channel 4), TCC0 (channel 0) D34 PA19 TCC1 (channel 3), TCC0 (channel 7) D35 PA18 TCC1 (channel 2), TCC0 (channel 6) D36 PA17 I2C0 (SCL) TCC1 (channel 1), TCC0 (channel 5) D37 PA16 I2C0 (SDA) TCC1 (channel 0), TCC0 (channel 4) D38 PB15 TCC4 (channel 1), TCC0 (channel 3) D39 PB14 TCC4 (channel 0), TCC0 (channel 2) D40 PC13 TCC0 (channel 3), TCC1 (channel 7) D41 PC12 TCC0 (channel 2), TCC1 (channel 6) D42 PC15 TCC0 (channel 5), TCC1 (channel 1) D43 PC14 TCC0 (channel 4), TCC1 (channel 0) D44 PC11 TCC0 (channel 1), TCC1 (channel 5) D45 PC10 TCC0 (channel 0), TCC1 (channel 4) D46 PC06 D47 PC07 D48 PC04 TCC0 (channel 0) D49 PC05 TCC0 (channel 1) D50 PD11 D64, SPI0_SDI_PIN, SPI_SDI_PIN TCC0 (channel 4) D51 PD08 D65, SPI0_SDO_PIN, SPI_SDO_PIN I2C1 (SDA) TCC0 (channel 1) D52 PD09 D66, SPI0_SCK_PIN, SPI_SCK_PIN I2C1 (SCL) TCC0 (channel 2) D53 PD10 SPI0_CS_PIN, SPI_CS_PIN TCC0 (channel 3) D54 PB05 A8 D55 PB06 A9 D56 PB07 A10 D57 PB08 A11 D58 PB09 A12 D59 PA04 A13 D60 PA06 A14 D61 PA07 A15 D67 PA02 D85, A0 D68 PA05 D86, A1 D69 PB03 A2 TCC2 (channel 3) D70 PC00 A3 D71 PC01 A4 D72 PC02 A5 D73 PC03 A6 D74 PB04 A7 D75 PC31 UART_RX_LED_PIN, LED_RX D76 PC30 UART_TX_LED_PIN, LED_TX D77 PA27 USBCDC_HOSTEN_PIN D78 PA24 USBCDC_DM_PIN TCC2 (channel 2) D79 PA25 USBCDC_DP_PIN TCC2 (channel 3) D80 PB29 SPI1_SDI_PIN, SD0_SDI_PIN, SDCARD_SDI_PIN TCC1 (channel 5) D81 PB27 SPI1_SCK_PIN, SD0_SCK_PIN, SDCARD_SCK_PIN TCC1 (channel 3) D82 PB26 SPI1_SDO_PIN, SD0_SDO_PIN, SDCARD_SDO_PIN TCC1 (channel 2) D83 PB28 SD0_CS_PIN, SDCARD_CS_PIN TCC1 (channel 4) D84 PA03 AREF D88 PC24 NEOPIXEL_PIN, NEOPIXEL, WS2812 D89 PB10 QSPI_SCK TCC0 (channel 4), TCC1 (channel 0) D90 PB11 QSPI_CS TCC0 (channel 5), TCC1 (channel 1) D91 PA08 QSPI_DATA0 TCC0 (channel 0), TCC1 (channel 4) D92 PA09 QSPI_DATA1 TCC0 (channel 1), TCC1 (channel 5) D93 PA10 QSPI_DATA2 TCC0 (channel 2), TCC1 (channel 6) D94 PA11 QSPI_DATA3 TCC0 (channel 3), TCC1 (channel 7) D95 PB31 SD0_DET_PIN, SDCARD_DET_PIN TCC4 (channel 1), TCC0 (channel 7) D96 PB30 TCC4 (channel 0), TCC0 (channel 6) Machine Package Docs Documentation for the machine package for the Adafruit Grand Central M4 Adafruit ItsyBitsy M0 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-m0/ The Adafruit ItsyBitsy M0 is very compact ARM development board based on the Atmel SAMD21 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA11 TCC1 (channel 1), TCC0 (channel 3) D1 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D2 PA14 TCC0 (channel 0) D3 PA09 TCC0 (channel 1), TCC1 (channel 3) D4 PA08 I2S_SDO_PIN TCC0 (channel 0), TCC1 (channel 2) D5 PA15 TCC0 (channel 1) D6 PA20 TCC0 (channel 2) D7 PA21 TCC0 (channel 3) D8 PA06 TCC1 (channel 0) D9 PA07 TCC1 (channel 1) D10 PA18 UART_TX_PIN TCC0 (channel 2) D11 PA16 UART_RX_PIN I2C0 (SDA) TCC2 (channel 0), TCC0 (channel 2) D12 PA19 TCC0 (channel 3) D13 PA17 LED I2C0 (SCL) TCC2 (channel 1), TCC0 (channel 3) A0 PA02 A1 PB08 A2 PB09 A3 PA04 TCC0 (channel 0) A4 PA05 TCC0 (channel 1) A5 PB02 USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) SDA_PIN PA22 I2C0 (SDA) TCC0 (channel 0) SCL_PIN PA23 I2C0 (SCL) TCC0 (channel 1) SPI0_SCK_PIN PB11 TCC0 (channel 1) SPI0_SDO_PIN PB10 TCC0 (channel 0) SPI0_SDI_PIN PA12 TCC2 (channel 0), TCC0 (channel 2) SPI1_CS_PIN PA27 SPI1_SCK_PIN PB23 SPI1_SDO_PIN PB22 SPI1_SDI_PIN PB03 Machine Package Docs Documentation for the machine package for the Adafruit ItsyBitsy M0 Adafruit ItsyBitsy M4 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-m4/ The Adafruit ItsyBitsy M4 is very compact ARM development board based on the Atmel SAMD51 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA16 UART_RX_PIN TCC1 (channel 0), TCC0 (channel 4) D1 PA17 UART_TX_PIN TCC1 (channel 1), TCC0 (channel 5) D2 PA07 UART2_RX_PIN D3 PB22 D4 PA14 TCC2 (channel 0), TCC1 (channel 2) D5 PA15 TCC2 (channel 1), TCC1 (channel 3) D6 PB02 TCC2 (channel 2) D7 PA18 TCC1 (channel 2), TCC0 (channel 6) D8 PB03 TCC2 (channel 3) D9 PA19 TCC1 (channel 3), TCC0 (channel 7) D10 PA20 TCC1 (channel 4), TCC0 (channel 0) D11 PA21 TCC1 (channel 5), TCC0 (channel 1) D12 PA23 TCC1 (channel 7), TCC0 (channel 3) D13 PA22 LED TCC1 (channel 6), TCC0 (channel 2) A0 PA02 A1 PA05 A2 PB08 A3 PB09 A4 PA04 UART2_TX_PIN A5 PA06 USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) SDA_PIN PA12 I2C0 (SDA) TCC0 (channel 6), TCC1 (channel 2) SCL_PIN PA13 I2C0 (SCL) TCC0 (channel 7), TCC1 (channel 3) SPI0_SCK_PIN PA01 SPI0_SDO_PIN PA00 SPI0_SDI_PIN PB23 QSPI_SCK PB10 TCC0 (channel 4), TCC1 (channel 0) QSPI_CS PB11 TCC0 (channel 5), TCC1 (channel 1) QSPI_DATA0 PA08 I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 4) QSPI_DATA1 PA09 I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 5) QSPI_DATA2 PA10 TCC0 (channel 2), TCC1 (channel 6) QSPI_DATA3 PA11 TCC0 (channel 3), TCC1 (channel 7) Machine Package Docs Documentation for the machine package for the Adafruit ItsyBitsy M4 Adafruit ItsyBitsy nRF52840 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-nrf52840/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/itsybitsy-nrf52840/ The Adafruit ItsyBitsy-nRF52840 is a small ARM development board based on the Nordic Semiconductor nrf52840 processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_25 UART_RX_PIN D1 P0_24 UART_TX_PIN D2 P1_02 D3 P0_06 LED, LED1 D4 P0_29 BUTTON D5 P0_27 D6 P1_09 D7 P1_08 D8 P0_08 D9 P0_07 D10 P0_05 D20, A6 D11 P0_26 D12 P0_11 D13 P0_12 D14 P0_04 A0 D15 P0_30 A1 D16 P0_28 A2 D17 P0_31 A3 D18 P0_02 A4 D19 P0_03 A5 D21 P0_16 SDA_PIN D22 P0_14 SCL_PIN D23 P0_20 SPI0_SDI_PIN D24 P0_15 SPI0_SDO_PIN D25 P0_13 SPI0_SCK_PIN D26 P0_19 QSPI_SCK D27 P0_23 QSPI_CS D28 P0_21 QSPI_DATA0 D29 P0_22 QSPI_DATA1 D30 P1_00 QSPI_DATA2 D31 P0_17 QSPI_DATA3 Machine Package Docs Documentation for the machine package for the ItsyBitsy-nRF52840 Adafruit MacroPad RP2040 https://tinygo.org/docs/reference/microcontrollers/macropad-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/macropad-rp2040/ The Adafruit MacroPad RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM SWITCH GPIO0 BUTTON, UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) KEY1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) KEY2 GPIO2 I2C1 (SDA) PWM1 (channel A) KEY3 GPIO3 I2C1 (SCL) PWM1 (channel B) KEY4 GPIO4 I2C0 (SDA) PWM2 (channel A) KEY5 GPIO5 I2C0 (SCL) PWM2 (channel B) KEY6 GPIO6 I2C1 (SDA) PWM3 (channel A) KEY7 GPIO7 I2C1 (SCL) PWM3 (channel B) KEY8 GPIO8 I2C0 (SDA) PWM4 (channel A) KEY9 GPIO9 I2C0 (SCL) PWM4 (channel B) KEY10 GPIO10 I2C1 (SDA) PWM5 (channel A) KEY11 GPIO11 I2C1 (SCL) PWM5 (channel B) KEY12 GPIO12 I2C0 (SDA) PWM6 (channel A) LED GPIO13 I2C0 (SCL) PWM6 (channel B) SPEAKER_ENABLE GPIO14 I2C1 (SDA) PWM7 (channel A) SPEAKER GPIO16 I2C0 (SDA) PWM0 (channel A) ROT_A GPIO18 I2C1 (SDA) PWM1 (channel A) ROT_B GPIO17 I2C0 (SCL) PWM0 (channel B) OLED_CS GPIO22 PWM3 (channel A) OLED_RST GPIO23 PWM3 (channel B) OLED_DC GPIO24 PWM4 (channel A) NEOPIXEL GPIO19 WS2812 I2C1 (SCL) PWM1 (channel B) I2C0_SDA_PIN GPIO20 I2C0 (SDA) PWM2 (channel A) I2C0_SCL_PIN GPIO21 I2C0 (SCL) PWM2 (channel B) SPI1_SCK_PIN GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) SPI1_SDO_PIN GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) SPI1_SDI_PIN GPIO28 ADC2 PWM6 (channel A) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Adafruit MacroPad RP2040 Adafruit Matrix Portal M4 https://tinygo.org/docs/reference/microcontrollers/matrixportal-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/matrixportal-m4/ The Adafruit Matrix Portal M4 is an ARM development system based on the ATSAMD51J19 Cortex M4 processor. The Adafruit Matrix Portal M4 is designed to plugin easily to any HUB-75 LED display. In addition it has a built-in ESP32 Wi-Fi coprocessor, along with a LIS3DH accelerometer. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA01 UART1_RX_PIN, UART_RX_PIN D1 PA00 UART1_TX_PIN, UART_TX_PIN D2 PB22 BUTTON_UP D3 PB23 BUTTON_DOWN D4 PA23 NEOPIXEL, WS2812 I2C0 (SCL) TCC1 (channel 7), TCC0 (channel 3) D5 PB31 I2C0_SDA_PIN, I2C_SDA_PIN, SDA_PIN TCC4 (channel 1), TCC0 (channel 7) D6 PB30 I2C0_SCL_PIN, I2C_SCL_PIN, SCL_PIN TCC4 (channel 0), TCC0 (channel 6) D7 PB00 HUB75_R1 D8 PB01 HUB75_G1 D9 PB02 HUB75_B1 TCC2 (channel 2) D10 PB03 HUB75_R2 TCC2 (channel 3) D11 PB04 HUB75_G2 D12 PB05 HUB75_B2 D13 PA14 LED TCC2 (channel 0), TCC1 (channel 2) D14 PB06 HUB75_CLK D15 PB14 HUB75_LAT TCC4 (channel 0), TCC0 (channel 2) D16 PB12 HUB75_OE TCC3 (channel 0), TCC0 (channel 0) D17 PB07 HUB75_ADDR_A D18 PB08 HUB75_ADDR_B D19 PB09 HUB75_ADDR_C D20 PB15 HUB75_ADDR_D TCC4 (channel 1), TCC0 (channel 3) D21 PB13 HUB75_ADDR_E TCC3 (channel 1), TCC0 (channel 1) D22 PA02 A0 D23 PA05 D48, A1, SPI1_SCK_PIN D24 PA04 D49, A2, SPI1_SDO_PIN D25 PA06 A3 D26 PA07 D50, A4, SPI1_SDI_PIN D27 PA12 UART2_RX_PIN, NINA_RX TCC0 (channel 6), TCC1 (channel 2) D28 PA13 UART2_TX_PIN, NINA_TX TCC0 (channel 7), TCC1 (channel 3) D29 PA20 NINA_GPIO0 TCC1 (channel 4), TCC0 (channel 0) D30 PA21 NINA_RESETN TCC1 (channel 5), TCC0 (channel 1) D31 PA22 NINA_ACK I2C0 (SDA) TCC1 (channel 6), TCC0 (channel 2) D32 PA18 NINA_RTS TCC1 (channel 2), TCC0 (channel 6) D33 PB17 NINA_CS TCC3 (channel 1), TCC0 (channel 5) D34 PA16 SPI0_SCK_PIN, SPI_SCK_PIN, NINA_SCK TCC1 (channel 0), TCC0 (channel 4) D35 PA17 SPI0_SDI_PIN, SPI_SDI_PIN, NINA_SDI TCC1 (channel 1), TCC0 (channel 5) D36 PA19 SPI0_SDO_PIN, SPI_SDO_PIN, NINA_SDO TCC1 (channel 3), TCC0 (channel 7) D38 PA24 USBCDC_DM_PIN, UART0_RX_PIN TCC2 (channel 2) D39 PA25 USBCDC_DP_PIN, UART0_TX_PIN TCC2 (channel 3) D40 PA03 D41 PB10 QSPI_SCK TCC0 (channel 4), TCC1 (channel 0) D42 PB11 QSPI_CS TCC0 (channel 5), TCC1 (channel 1) D43 PA08 QSPI_DATA0 TCC0 (channel 0), TCC1 (channel 4) D44 PA09 QSPI_DATA1 TCC0 (channel 1), TCC1 (channel 5) D45 PA10 QSPI_DATA2 TCC0 (channel 2), TCC1 (channel 6) D46 PA11 QSPI_DATA3 TCC0 (channel 3), TCC1 (channel 7) D47 PA27 Machine Package Docs Documentation for the machine package for the Adafruit Matrix Portal M4 Adafruit Metro M4 Express AirLift https://tinygo.org/docs/reference/microcontrollers/metro-m4-airlift/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/metro-m4-airlift/ The Adafruit Metro M4 Express AirLift is an ARM development board based on the Atmel ATSAMD51J19 family of SoC that has Arduino shield compatible form factor, and a built-in EspressIf ESP32 Wi-Fi Co processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA23 UART_RX_PIN I2C0 (SCL) TCC1 (channel 7), TCC0 (channel 3) D1 PA22 UART_TX_PIN I2C0 (SDA) TCC1 (channel 6), TCC0 (channel 2) D2 PB17 TCC3 (channel 1), TCC0 (channel 5) D3 PB16 TCC3 (channel 0), TCC0 (channel 4) D4 PB13 TCC3 (channel 1), TCC0 (channel 1) D5 PB14 TCC4 (channel 0), TCC0 (channel 2) D6 PB15 TCC4 (channel 1), TCC0 (channel 3) D7 PB12 TCC3 (channel 0), TCC0 (channel 0) D8 PA21 TCC1 (channel 5), TCC0 (channel 1) D9 PA20 TCC1 (channel 4), TCC0 (channel 0) D10 PA18 TCC1 (channel 2), TCC0 (channel 6) D11 PA19 SPI1_SDO_PIN TCC1 (channel 3), TCC0 (channel 7) D12 PA17 SPI1_SCK_PIN TCC1 (channel 1), TCC0 (channel 5) D13 PA16 LED, SPI1_SDI_PIN TCC1 (channel 0), TCC0 (channel 4) D40 PB22 WS2812 A0 PA02 A1 PA05 A2 PB06 A3 PB00 A4 PB08 A5 PB09 USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) UART2_TX_PIN PA04 NINA_TX UART2_RX_PIN PA07 NINA_RX NINA_CS PA15 TCC2 (channel 1), TCC1 (channel 3) NINA_ACK PB04 NINA_CTS NINA_GPIO0 PB01 NINA_RTS NINA_RESETN PB05 SDA_PIN PB02 TCC2 (channel 2) SCL_PIN PB03 TCC2 (channel 3) SPI0_SCK_PIN PA13 NINA_SCK TCC0 (channel 7), TCC1 (channel 3) SPI0_SDO_PIN PA12 NINA_SDO TCC0 (channel 6), TCC1 (channel 2) SPI0_SDI_PIN PA14 NINA_SDI TCC2 (channel 0), TCC1 (channel 2) QSPI_SCK PB10 TCC0 (channel 4), TCC1 (channel 0) QSPI_CS PB11 TCC0 (channel 5), TCC1 (channel 1) QSPI_DATA0 PA08 TCC0 (channel 0), TCC1 (channel 4) QSPI_DATA1 PA09 TCC0 (channel 1), TCC1 (channel 5) QSPI_DATA2 PA10 TCC0 (channel 2), TCC1 (channel 6) QSPI_DATA3 PA11 TCC0 (channel 3), TCC1 (channel 7) Machine Package Docs Documentation for the machine package for the Adafruit Metro M4 Airlift Adafruit PyBadge https://tinygo.org/docs/reference/microcontrollers/pybadge/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pybadge/ The Adafruit PyBadge is a ARM development board based on the Atmel ATSAMD51J19A family of SoC. It has many built-in devices, such as a 1.8" 160x128 Color TFT Display, 8 x buttons, 5 x NeoPixels, a triple-axis accelerometer, a light sensor, and a speaker. The PyBadge uses the ST7735 display, so you may use the tinygo-org st7735 driver. The accelerometer is the LIS3DH so you may use the tinygo lis3dh driver Adafruit PyGamer https://tinygo.org/docs/reference/microcontrollers/pygamer/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pygamer/ The Adafruit PyGamer is a ARM development board based on the Atmel ATSAMD51J19A family of SoC. It has many built-in devices, such as a 1.8" 160x128 Color TFT Display, a dual-potentiometer analog stick, 4 x square-top buttons, 5 x NeoPixel LED, a triple-axis accelerometer, a light sensor, and a speaker. The PyGamer uses the ST7735 display, so you may use the tinygo-org st7735 driver. The accelerometer is the LIS3DH so you may use the tinygo lis3dh driver. Adafruit PyPortal https://tinygo.org/docs/reference/microcontrollers/pyportal/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pyportal/ The Adafruit PyPortal is a ARM board based on the Microchip ATSAMD51J20A family of SoC. The PyPortal also has an Espressif ESP32 Wi-Fi coprocessor with TLS/SSL support built-in. PyPortal has a 3.2″ 320 x 240 color TFT with resistive touch screen. PyPortal includes: speaker, light sensor, temperature sensor, NeoPixel, microSD card slot, 8MB flash, plug-in ports for I2C and 2 analog/digital pins, Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PB13 NINA_RX, UART_RX_PIN TCC3 (channel 1), TCC0 (channel 1) D1 PB12 NINA_TX, UART_TX_PIN TCC3 (channel 0), TCC0 (channel 0) D2 PB22 NEOPIXEL, WS2812 D3 PA04 A1 D4 PA05 A3 D5 PB16 NINA_ACK, NINA_CTS TCC3 (channel 0), TCC0 (channel 4) D6 PB15 NINA_GPIO0, NINA_RTS TCC4 (channel 1), TCC0 (channel 3) D7 PB17 NINA_RESETN TCC3 (channel 1), TCC0 (channel 5) D8 PB14 NINA_CS TCC4 (channel 0), TCC0 (channel 2) D9 PB04 TFT_RD D10 PB05 TFT_DC D11 PB06 TFT_CS D12 PB07 TFT_TE D13 PB23 LED D24 PA00 TFT_RESET D25 PB31 TFT_BACKLIGHT TCC4 (channel 1), TCC0 (channel 7) D26 PB09 TFT_WR D27 PB02 SDA_PIN TCC2 (channel 2) D28 PB03 SCL_PIN TCC2 (channel 3) D29 PA12 SPI0_SDO_PIN, NINA_SDO TCC0 (channel 6), TCC1 (channel 2) D30 PA13 SPI0_SCK_PIN, NINA_SCK TCC0 (channel 7), TCC1 (channel 3) D31 PA14 SPI0_SDI_PIN, NINA_SDI TCC2 (channel 0), TCC1 (channel 2) D32 PB30 TCC4 (channel 0), TCC0 (channel 6) D33 PA01 D34 PA16 LCD_DATA0 TCC1 (channel 0), TCC0 (channel 4) D35 PA17 TCC1 (channel 1), TCC0 (channel 5) D36 PA18 TCC1 (channel 2), TCC0 (channel 6) D37 PA19 TCC1 (channel 3), TCC0 (channel 7) D38 PA20 TCC1 (channel 4), TCC0 (channel 0) D39 PA21 TCC1 (channel 5), TCC0 (channel 1) D40 PA22 I2C0 (SDA) TCC1 (channel 6), TCC0 (channel 2) D41 PA23 I2C0 (SCL) TCC1 (channel 7), TCC0 (channel 3) D42 PB10 QSPI_SCK TCC0 (channel 4), TCC1 (channel 0) D43 PB11 QSPI_CS TCC0 (channel 5), TCC1 (channel 1) D44 PA08 QSPI_DATA0 TCC0 (channel 0), TCC1 (channel 4) D45 PA09 QSPI_DATA1 TCC0 (channel 1), TCC1 (channel 5) D46 PA10 QSPI_DATA2 TCC0 (channel 2), TCC1 (channel 6) D47 PA11 QSPI_DATA3 TCC0 (channel 3), TCC1 (channel 7) D50 PA02 SPK_SD, A0, AUDIO_OUT D51 PA15 TCC2 (channel 1), TCC1 (channel 3) A2 PA07 LIGHT A4 PB00 TOUCH_YD A5 PB01 TOUCH_XL A6 PA06 TOUCH_YU A7 PB08 TOUCH_XR USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) Machine Package Docs Documentation for the machine package for the Adafruit PyPortal Adafruit Qt Py https://tinygo.org/docs/reference/microcontrollers/qtpy/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/qtpy/ The Adafruit QtPy is a tiny ARM development board based on the Atmel ATSAMD21E18 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA02 A0 D1 PA03 A1 D2 PA04 A2 TCC0 (channel 0) D3 PA05 A3 TCC0 (channel 1) D4 PA16 A4, SDA_PIN I2C0 (SDA) TCC2 (channel 0), TCC0 (channel 2) D5 PA17 SCL_PIN I2C0 (SCL) TCC2 (channel 1), TCC0 (channel 3) D6 PA06 UART_TX_PIN TCC1 (channel 0) D7 PA07 UART_RX_PIN TCC1 (channel 1) D8 PA11 SPI0_SCK_PIN TCC1 (channel 1), TCC0 (channel 3) D9 PA09 SPI0_SDI_PIN TCC0 (channel 1), TCC1 (channel 3) D10 PA10 SPI0_SDO_PIN, I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D11 PA18 NEOPIXELS, WS2812 TCC0 (channel 2) D12 PA15 NEOPIXELS_POWER TCC0 (channel 1) D13 PA27 D14 PA23 TCC0 (channel 1) D15 PA19 TCC0 (channel 3) D16 PA22 TCC0 (channel 0) D17 PA08 I2S_SDO_PIN TCC0 (channel 0), TCC1 (channel 2) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) Machine Package Docs Documentation for the machine package for the Adafruit QtPy Adafruit QT Py RP2040 https://tinygo.org/docs/reference/microcontrollers/qtpy-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/qtpy-rp2040/ The Adafruit QT Py RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM SDA GPIO24 I2C0_SDA_PIN, SDA_PIN, SPI1_SDI_PIN PWM4 (channel A) SCL GPIO25 I2C0_SCL_PIN, SCL_PIN, SPI1_CS PWM4 (channel B) TX GPIO20 UART1_TX_PIN I2C0 (SDA) PWM2 (channel A) MO GPIO3 MOSI, SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) MI GPIO4 MISO, SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) SCK GPIO6 SPI0_SCK_PIN I2C1 (SDA) PWM3 (channel A) RX GPIO5 SPI0_CS, UART1_RX_PIN I2C0 (SCL) PWM2 (channel B) QT_SCL1 GPIO23 I2C1_QT_SCL_PIN PWM3 (channel B) QT_SDA1 GPIO22 I2C1_QT_SDA_PIN PWM3 (channel A) A0 GPIO29 UART0_RX_PIN, UART_RX_PIN, ADC3 PWM6 (channel B) A1 GPIO28 UART0_TX_PIN, UART_TX_PIN, ADC2 PWM6 (channel A) A2 GPIO27 I2C1_SCL_PIN, SPI1_SDO_PIN, ADC1 I2C1 (SCL) PWM5 (channel B) A3 GPIO26 I2C1_SDA_PIN, SPI1_SCK_PIN, ADC0 I2C1 (SDA) PWM5 (channel A) NEOPIXEL GPIO12 WS2812 I2C0 (SDA) PWM6 (channel A) NEOPIXEL_POWER GPIO11 I2C1 (SCL) PWM5 (channel B) Machine Package Docs Documentation for the machine package for the Adafruit QT Py RP2040 Adafruit Trinket M0 https://tinygo.org/docs/reference/microcontrollers/trinket-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/trinket-m0/ The Adafruit Trinket M0 is a tiny ARM development board based on the Atmel ATSAMD21E18 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA08 A2, SDA_PIN, I2S_SDO_PIN I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 2) D1 PA02 A0 D2 PA09 A1, SPI0_SDI_PIN, SCL_PIN I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 3) D3 PA07 A3, UART_RX_PIN, SPI0_SCK_PIN TCC1 (channel 1) D4 PA06 A4, UART_TX_PIN, SPI0_SDO_PIN TCC1 (channel 0) D13 PA10 LED, I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) Machine Package Docs Documentation for the machine package for the Adafruit Trinket M0 Adafruit Trinkey QT2040 https://tinygo.org/docs/reference/microcontrollers/trinkey-qt2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/trinkey-qt2040/ The Adafruit Trinkey QT2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM NEOPIXEL GPIO27 WS2812, ADC1 I2C1 (SCL) PWM5 (channel B) I2C0_SDA_PIN GPIO16 I2C0 (SDA) PWM0 (channel A) I2C0_SCL_PIN GPIO17 I2C0 (SCL) PWM0 (channel B) ADC0 GPIO26 I2C1 (SDA) PWM5 (channel A) ADC2 GPIO28 PWM6 (channel A) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Adafruit Trinkey QT2040 Arduino Mega 1280 https://tinygo.org/docs/reference/microcontrollers/arduino-mega1280/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-mega1280/ The Arduino Mega 1280 is based on the AVR ATmega1280 microcontroller. Note: the AVR backend of LLVM is still experimental so you may encounter bugs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice NO NO Pins Pin Hardware pin Alternative names I2C PWM A0 PF0 ADC0 A1 PF1 ADC1 A2 PF2 ADC2 A3 PF3 ADC3 A4 PF4 ADC4 A5 PF5 ADC5 A6 PF6 ADC6 A7 PF7 ADC7 A8 PK0 ADC8 A9 PK1 ADC9 A10 PK2 ADC10 A11 PK3 ADC11 A12 PK4 ADC12 A13 PK5 ADC13 A14 PK6 ADC14 A15 PK7 ADC15 D0 PE0 D1 PE1 D2 PE4 Timer3 (channel B) D3 PE5 Timer3 (channel C) D4 PG5 Timer0 (channel B) D5 PE3 Timer3 (channel A) D6 PH3 Timer4 (channel A) D7 PH4 Timer4 (channel B) D8 PH5 Timer4 (channel C) D9 PH6 Timer0 (channel B) D10 PB4 Timer2 (channel A) D11 PB5 Timer1 (channel A) D12 PB6 Timer1 (channel B) D13 PB7 LED Timer0 (channel A) D14 PJ1 D15 PJ0 D16 PH1 D17 PH0 D18 PD3 D19 PD2 D20 PD1 I2C0 (SDA) D21 PD0 I2C0 (SCL) D22 PA0 D23 PA1 D24 PA2 D25 PA3 D26 PA4 D27 PA5 D28 PA6 D29 PA7 D30 PC7 D31 PC6 D32 PC5 D33 PC4 D34 PC3 D35 PC2 D36 PC1 D37 PC0 D38 PD7 D39 PG2 D40 PG1 D41 PG0 D42 PL7 D43 PL6 D44 PL5 Timer5 (channel C) D45 PL4 Timer5 (channel B) D46 PL3 Timer5 (channel A) D47 PL2 D48 PL1 D49 PL0 D50 PB3 D51 PB2 D52 PB1 D53 PB0 Machine Package Docs Documentation for the machine package for the Arduino Mega 1280 Arduino Mega 2560 https://tinygo.org/docs/reference/microcontrollers/arduino-mega2560/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-mega2560/ The Arduino Mega 2560 is based on the AVR ATmega2560 microcontroller. Note: the AVR backend of LLVM is still experimental so you may encounter bugs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names A0 PF0 ADC0 A1 PF1 ADC1 A2 PF2 ADC2 A3 PF3 ADC3 A4 PF4 ADC4 A5 PF5 ADC5 A6 PF6 ADC6 A7 PF7 ADC7 A8 PK0 ADC8 A9 PK1 ADC9 A10 PK2 ADC10 A11 PK3 ADC11 A12 PK4 ADC12 A13 PK5 ADC13 A14 PK6 ADC14 A15 PK7 ADC15 D0 PE0 UART_RX_PIN, UART0_RX_PIN D1 PE1 UART_TX_PIN, UART0_TX_PIN D2 PE4 D3 PE5 D4 PG5 D5 PE3 D6 PH3 D7 PH4 D8 PH5 D9 PH6 D10 PB4 D11 PB5 D12 PB6 D13 PB7 LED D14 PJ1 UART3_TX_PIN D15 PJ0 UART3_RX_PIN D16 PH1 UART2_TX_PIN D17 PH0 UART2_RX_PIN D18 PD3 UART1_TX_PIN D19 PD2 UART1_RX_PIN D20 PD1 D21 PD0 D22 PA0 D23 PA1 D24 PA2 D25 PA3 D26 PA4 D27 PA5 D28 PA6 D29 PA7 D30 PC7 D31 PC6 D32 PC5 D33 PC4 D34 PC3 D35 PC2 D36 PC1 D37 PC0 D38 PD7 D39 PG2 D40 PG1 D41 PG0 D42 PL7 D43 PL6 D44 PL5 D45 PL4 D46 PL3 D47 PL2 D48 PL1 D49 PL0 D50 PB3 D51 PB2 D52 PB1 D53 PB0 Machine Package Docs Documentation for the machine package for the Arduino Mega 2560 Arduino MKR WiFi 1010 https://tinygo.org/docs/reference/microcontrollers/arduino-mkrwifi1010/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-mkrwifi1010/ The Arduino MKR WiFi 1010 is a very small ARM development board based on the Microchip SAMD21 family of processors. It also has a NINA-W102 chip onboard which provides an wireless communication abilities based on the popular ESP32 family of wireless chips from Espressif. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA22 NINA_TX TCC0 (channel 0) D1 PA23 NINA_RX TCC0 (channel 1) D2 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D3 PA11 TCC1 (channel 1), TCC0 (channel 3) D4 PB10 TCC0 (channel 0) D5 PB11 TCC0 (channel 1) D6 PA20 LED TCC0 (channel 2) D7 PA21 TCC0 (channel 3) D8 PA16 SPI0_SDO_PIN TCC2 (channel 0), TCC0 (channel 2) D9 PA17 SPI0_SCK_PIN TCC2 (channel 1), TCC0 (channel 3) D10 PA19 SPI0_SDI_PIN TCC0 (channel 3) D11 PA08 SDA_PIN I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 2) D12 PA09 SCL_PIN I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 3) D13 PB23 RX0, UART_RX_PIN D14 PB22 TX1, UART_TX_PIN A0 PA02 A1 PB02 A2 PB03 A3 PA04 TCC0 (channel 0) A4 PA05 TCC0 (channel 1) A5 PA06 TCC1 (channel 0) A6 PA07 I2S_SDO_PIN TCC1 (channel 1) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) NINA_SDO PA12 I2C0 (SDA) TCC2 (channel 0), TCC0 (channel 2) NINA_SDI PA13 I2C0 (SCL) TCC2 (channel 1), TCC0 (channel 3) NINA_CS PA14 TCC0 (channel 0) NINA_SCK PA15 TCC0 (channel 1) NINA_GPIO0 PA27 NINA_RESETN PB08 NINA_ACK PA28 Machine Package Docs Documentation for the machine package for the Arduino MKR WiFi 1010 Arduino MKR1000 https://tinygo.org/docs/reference/microcontrollers/arduino-mkr1000/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-mkr1000/ The Arduino MKR1000 is a very small ARM development board based on the Microchip SAMD21 family of processors. It also has a NINA-W102 chip onboard which provides an wireless communication abilities based on the popular ESP32 family of wireless chips from Espressif. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names PWM D0 PA22 TCC0 (channel 0) D1 PA23 TCC0 (channel 1) D2 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D3 PA11 TCC1 (channel 1), TCC0 (channel 3) D4 PB10 TCC0 (channel 0) D5 PB11 TCC0 (channel 1) D6 PA20 LED TCC0 (channel 2) D7 PA21 TCC0 (channel 3) D8 PA16 SPI0_SDO_PIN TCC2 (channel 0), TCC0 (channel 2) D9 PA17 SPI0_SCK_PIN TCC2 (channel 1), TCC0 (channel 3) D10 PA19 SPI0_SDI_PIN TCC0 (channel 3) D11 PA08 SDA_PIN TCC0 (channel 0), TCC1 (channel 2) D12 PA09 SCL_PIN TCC0 (channel 1), TCC1 (channel 3) D13 PB23 RX0, UART_RX_PIN D14 PB22 TX1, UART_TX_PIN A0 PA02 A1 PB02 A2 PB03 A3 PA04 TCC0 (channel 0) A4 PA05 TCC0 (channel 1) A5 PA06 TCC1 (channel 0) A6 PA07 I2S_SDO_PIN TCC1 (channel 1) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) Machine Package Docs Documentation for the machine package for the Arduino MKR1000 Arduino Nano https://tinygo.org/docs/reference/microcontrollers/arduino-nano/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-nano/ The Arduino Nano is based on the AVR ATmega328p microcontroller. Note: the AVR backend of LLVM is still experimental so you may encounter bugs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice NO NO Pins Pin Hardware pin Alternative names I2C PWM D0 PD0 UART_RX_PIN D1 PD1 UART_TX_PIN D2 PD2 D3 PD3 Timer2 (channel B) D4 PD4 D5 PD5 Timer0 (channel B) D6 PD6 Timer0 (channel A) D7 PD7 D8 PB0 D9 PB1 Timer1 (channel A) D10 PB2 Timer1 (channel B) D11 PB3 Timer2 (channel A) D12 PB4 D13 PB5 LED ADC0 PC0 ADC1 PC1 ADC2 PC2 ADC3 PC3 ADC4 PC4 I2C0 (SDA) ADC5 PC5 I2C0 (SCL) Machine Package Docs Documentation for the machine package for the Arduino Nano Arduino Nano 33 BLE https://tinygo.org/docs/reference/microcontrollers/nano-33-ble/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nano-33-ble/ The Arduino Nano33 BLE is a very small ARM development board based on the Nordic Semiconductor nrf52840 processor. There is also the Arduino Nano33 BLE Sense which is the exact same board but with additional onboard sensors. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names D2 P1_11 D3 P1_12 D4 P1_15 D5 P1_13 D6 P1_14 D7 P0_23 D8 P0_21 D9 P0_27 D10 P1_02 D11 P1_01 SPI0_SDO_PIN D12 P1_08 SPI0_SDI_PIN D13 P0_13 LED, LED_BUILTIN, SPI0_SCK_PIN A0 P0_04 A1 P0_05 A2 P0_30 A3 P0_29 A4 P0_31 SDA0_PIN A5 P0_02 SCL0_PIN A6 P0_28 A7 P0_03 LED1 P0_24 LED_RED LED2 P0_16 LED_GREEN LED3 P0_06 LED_BLUE LED_PWR P1_09 UART_RX_PIN P1_10 UART_TX_PIN P1_03 SDA_PIN P0_14 SDA1_PIN SCL_PIN P0_15 SCL1_PIN I2C_PULLUP P1_00 APDS_INT P0_19 LSM_PWR P0_22 LPS_PWR, HTS_PWR MIC_PWR P0_17 MIC_CLK P0_26 MIC_DIN P0_25 Onboard sensors 9-axis IMU: LSM9DS1 Machine Package Docs Documentation for the machine package for the Arduino Nano33 BLE Arduino Nano 33 BLE Sense https://tinygo.org/docs/reference/microcontrollers/nano-33-ble-sense/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nano-33-ble-sense/ The Arduino Nano 33 BLE Sense is a very small ARM development board based on the Nordic Semiconductor nrf52840 processor. This is the same board as Arduino Nano 33 BLE but with additional onboard sensors (see below). Flash this board exactly the same way as Arduino Nano 33 BLE (target name is the same too). Additional onboard sensors Proximity APDS9960 Pressure LPS22HB Humidity HTS221 Microphone MP34DT06JTR Arduino Nano 33 IoT https://tinygo.org/docs/reference/microcontrollers/arduino-nano33/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-nano33/ The Arduino Nano33 IoT is a very small ARM development board based on the Atmel SAMD21 family of processors. It also has a NINA-W102 chip onboard which provides an wireless communication abilities based on the popular ESP32 family of wireless chips from Espressif. Peripherals: NINA-W102 chip with wifinina firmware (wifi and bluetooth) lsm6ds3 IMU chip (acceleration, rotation and temperature) Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM RX0 PB23 TX1 PB22 D2 PB10 TCC0 (channel 0) D3 PB11 TCC0 (channel 1) D4 PA07 TCC1 (channel 1) D5 PA05 TCC0 (channel 1) D6 PA04 TCC0 (channel 0) D7 PA06 TCC1 (channel 0) D8 PA18 TCC0 (channel 2) D9 PA20 TCC0 (channel 2) D10 PA21 TCC0 (channel 3) D11 PA16 SPI0_SDO_PIN TCC2 (channel 0), TCC0 (channel 2) D12 PA19 SPI0_SDI_PIN TCC0 (channel 3) D13 PA17 LED, SPI0_SCK_PIN TCC2 (channel 1), TCC0 (channel 3) A0 PA02 A1 PB02 A2 PA11 TCC1 (channel 1), TCC0 (channel 3) A3 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) A4 PB08 SDA_PIN I2C0 (SDA) A5 PB09 SCL_PIN I2C0 (SCL) A6 PA09 TCC0 (channel 1), TCC1 (channel 3) A7 PB03 USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) UART_TX_PIN PA22 TCC0 (channel 0) UART_RX_PIN PA23 TCC0 (channel 1) NINA_SDO PA12 NINA_TX I2C0 (SDA) TCC2 (channel 0), TCC0 (channel 2) NINA_SDI PA13 NINA_RX I2C0 (SCL) TCC2 (channel 1), TCC0 (channel 3) NINA_CS PA14 NINA_RTS TCC0 (channel 0) NINA_SCK PA15 NINA_CTS TCC0 (channel 1) NINA_GPIO0 PA27 NINA_RESETN PA08 I2S_SDO_PIN TCC0 (channel 0), TCC1 (channel 2) NINA_ACK PA28 Machine Package Docs Documentation for the machine package for the Arduino Nano33 IoT Arduino Nano RP2040 Connect https://tinygo.org/docs/reference/microcontrollers/nano-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nano-rp2040/ The Nano RP2040 Connect is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Peripherals: NINA-W102 chip with wifinina firmware (wifi and bluetooth) lsm6dsox IMU chip (acceleration, rotation and temperature) microphone Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D2 GPIO25 PWM4 (channel B) D3 GPIO15 I2C1 (SCL) PWM7 (channel B) D4 GPIO16 I2C0 (SDA) PWM0 (channel A) D5 GPIO17 I2C0 (SCL) PWM0 (channel B) D6 GPIO18 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) D7 GPIO19 I2C1_SCL_PIN I2C1 (SCL) PWM1 (channel B) D8 GPIO20 I2C0 (SDA) PWM2 (channel A) D9 GPIO21 I2C0 (SCL) PWM2 (channel B) D10 GPIO5 I2C0 (SCL) PWM2 (channel B) D11 GPIO7 SPI0_SDO_PIN I2C1 (SCL) PWM3 (channel B) D12 GPIO4 SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) D13 GPIO6 LED, SPI0_SCK_PIN I2C1 (SDA) PWM3 (channel A) D14 GPIO26 A0, ADC0 I2C1 (SDA) PWM5 (channel A) D15 GPIO27 A1, ADC1 I2C1 (SCL) PWM5 (channel B) D16 GPIO28 A2, ADC2 PWM6 (channel A) D17 GPIO29 A3, ADC3 PWM6 (channel B) D18 GPIO12 I2C0_SDA_PIN I2C0 (SDA) PWM6 (channel A) D19 GPIO13 I2C0_SCL_PIN I2C0 (SCL) PWM6 (channel B) SPI1_SCK_PIN GPIO22 SPI1_SDO_PIN, SPI1_SDI_PIN PWM3 (channel A) NINA_SCK GPIO14 I2C1 (SDA) PWM7 (channel A) NINA_SDO GPIO11 NINA_RTS I2C1 (SCL) PWM5 (channel B) NINA_SDI GPIO8 NINA_TX I2C0 (SDA) PWM4 (channel A) NINA_CS GPIO9 NINA_RX I2C0 (SCL) PWM4 (channel B) NINA_ACK GPIO10 NINA_CTS I2C1 (SDA) PWM5 (channel A) NINA_GPIO0 GPIO2 I2C1 (SDA) PWM1 (channel A) NINA_RESETN GPIO3 I2C1 (SCL) PWM1 (channel B) UART0_TX_PIN GPIO0 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO1 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) Machine Package Docs Documentation for the machine package for the Nano RP2040 Arduino Uno https://tinygo.org/docs/reference/microcontrollers/arduino/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino/ The Arduino Uno is based on the AVR ATmega328p microcontroller. Note: the AVR backend of LLVM is still experimental so you may encounter bugs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice NO NO Pins Pin Hardware pin Alternative names I2C PWM D0 PD0 UART_RX_PIN D1 PD1 UART_TX_PIN D2 PD2 D3 PD3 Timer2 (channel B) D4 PD4 D5 PD5 Timer0 (channel B) D6 PD6 Timer0 (channel A) D7 PD7 D8 PB0 D9 PB1 Timer1 (channel A) D10 PB2 Timer1 (channel B) D11 PB3 Timer2 (channel A) D12 PB4 D13 PB5 LED ADC0 PC0 ADC1 PC1 ADC2 PC2 ADC3 PC3 ADC4 PC4 I2C0 (SDA) ADC5 PC5 I2C0 (SCL) Machine Package Docs Documentation for the machine package for the Arduino Uno Arduino Zero https://tinygo.org/docs/reference/microcontrollers/arduino-zero/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/arduino-zero/ The Arduino Zero is a very small ARM development board based on the Atmel SAMD21 family of processors. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names PWM D0 PA11 I2S_WS_PIN, UART_RX_PIN TCC1 (channel 1), TCC0 (channel 3) D1 PA10 I2S_SCK_PIN, UART_TX_PIN TCC1 (channel 0), TCC0 (channel 2) D2 PA14 TCC0 (channel 0) D3 PA09 TCC0 (channel 1), TCC1 (channel 3) D4 PA08 TCC0 (channel 0), TCC1 (channel 2) D5 PA15 TCC0 (channel 1) D6 PA20 TCC0 (channel 2) D7 PA21 TCC0 (channel 3) D8 PA06 TCC1 (channel 0) D9 PA07 I2S_SDO_PIN TCC1 (channel 1) D10 PA18 TCC0 (channel 2) D11 PA16 SPI0_SDO_PIN TCC2 (channel 0), TCC0 (channel 2) D12 PA19 SPI0_SDI_PIN TCC0 (channel 3) D13 PA17 LED, LED1, SPI0_SCK_PIN TCC2 (channel 1), TCC0 (channel 3) AREF PA03 ADC0 PA02 ADC1 PB08 ADC2 PB09 ADC3 PA04 TCC0 (channel 0) ADC4 PA05 TCC0 (channel 1) ADC5 PB02 LED2 PA27 LED3 PB03 SPI1_SDO_PIN PB10 TCC0 (channel 0) SPI1_SDI_PIN PA12 TCC2 (channel 0), TCC0 (channel 2) SPI1_SCK_PIN PB11 TCC0 (channel 1) SDA_PIN PA22 TCC0 (channel 0) SCL_PIN PA23 TCC0 (channel 1) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) XIN32 PA00 TCC2 (channel 0) XOUT32 PA01 TCC2 (channel 1) Machine Package Docs Documentation for the machine package for the Arduino Zero BBC micro:bit https://tinygo.org/docs/reference/microcontrollers/microbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/microbit/ The BBC micro:bit is a tiny programmable computer designed for learning. It is based on the Nordic Semiconductor nRF51822 ARM Cortex MO chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM Software support Not yet USBDevice NO NO Bluetooth YES YES Pins Pin Hardware pin Alternative names P0 P0_03 ADC0 P1 P0_02 ADC1 P2 P0_01 ADC2 P3 P0_04 LED_COL_1 P4 P0_05 LED_COL_2 P5 P0_17 BUTTONA, BUTTON P6 P0_12 LED_COL_9 P7 P0_11 LED_COL_8 P8 P0_18 P9 P0_10 LED_COL_7 P10 P0_06 LED_COL_3 P11 P0_26 BUTTONB P12 P0_20 P13 P0_23 SPI0_SCK_PIN P14 P0_22 SPI0_SDI_PIN P15 P0_21 SPI0_SDO_PIN P16 P0_16 UART_TX_PIN P0_24 UART_RX_PIN P0_25 SDA_PIN P0_30 SCL_PIN P0_00 LED_COL_4 P0_07 LED_COL_5 P0_08 LED_COL_6 P0_09 LED_ROW_1 P0_13 LED_ROW_2 P0_14 LED_ROW_3 P0_15 Machine Package Docs Documentation for the machine package for the BBC micro:bit Blues Wireless Swan https://tinygo.org/docs/reference/microcontrollers/swan/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/swan/ The Swan is an ARM development board based on the ST Micro stm32l4r5zi SoC. The Swan has a user button and an LED, LiPo charging and USB. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names LED PE2 UART_TX_PIN PA9 UART_RX_PIN PA10 I2C0_SCL_PIN PB6 I2C0_SDA_PIN PB7 SPI1_SCK_PIN PD1 SPI0_SCK_PIN SPI1_SDI_PIN PB14 SPI0_SDI_PIN SPI1_SDO_PIN PB15 SPI0_SDO_PIN Machine Package Docs Documentation for the machine package for the Swan Build with system-installed LLVM https://tinygo.org/docs/guides/build/bring-your-own-llvm/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/build/bring-your-own-llvm/ ⚠️ Halt! This is the system installed LLVM guide! Please check the following table and make sure you don’t need the manual LLVM install guide instead! You need to build LLVM manually in the following cases You would like to use it for the ESP8266 or ESP32 chips You are using Windows. Your Linux distribution (if you use Linux) does not ship the right LLVM version. System installed LLVM instructions Installing LLVM See troubleshooting if running into issues during the instructions. Digispark https://tinygo.org/docs/reference/microcontrollers/digispark/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/digispark/ The Digispark is an ATtiny85 based microcontroller development board similar to the Arduino line, only cheaper, smaller, and a bit less powerful. There is very limited support at the moment for this board. Note: the AVR backend of LLVM is still experimental so you may encounter bugs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES Not yet SPI Requires software Not yet I2C Requires software Not yet ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names P0 PB0 P1 PB1 LED P2 PB2 P3 PB3 P4 PB4 P5 PB5 Machine Package Docs Documentation for the machine package for the Digispark Dragino LoRaWAN GPS Tracker LGT-92 https://tinygo.org/docs/reference/microcontrollers/lgt92/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/lgt92/ The Dragino LGT-92 includes a low power GPS module L76-L and 9-axis accelerometer for motion and attitude detection. It is based on the ST Micro STM32L072CZT6 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names LED1 PA12 LED_RED, LED LED2 PA8 LED_BLUE LED3 PA11 LED_GREEN BUTTON PB14 GPS_STANDBY_PIN PB3 GPS_RESET_PIN PB4 GPS_POWER_PIN PB5 MEMS_ACCEL_CS PE3 MEMS_ACCEL_INT1 PE0 MEMS_ACCEL_INT2 PE1 SPI1_SCK_PIN PA5 SPI0_SCK_PIN SPI1_SDI_PIN PA6 SPI0_SDI_PIN SPI1_SDO_PIN PA7 SPI0_SDO_PIN RFM95_DIO0_PIN PC13 UART_RX_PIN PA13 UART_TX_PIN PA14 UART1_RX_PIN PB6 UART1_TX_PIN PB7 I2C0_SCL_PIN PA9 I2C0_SDA_PIN PA10 Machine Package Docs Documentation for the machine package for the Dragino LGT-92 ESP32 - Core board https://tinygo.org/docs/reference/microcontrollers/esp32-coreboard-v2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/esp32-coreboard-v2/ The esp32-coreboard-v2 is a development board based on the Espressif ESP32 a powerful chip that is used on many different board mostly because of the built-in radio that can be used for WiFi or Bluetooth wireless connections. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Bluetooth YES Not yet Pins Pin Hardware pin Alternative names CLK GPIO6 CMD GPIO11 IO0 GPIO0 PWM1_PIN IO1 GPIO1 TXD, UART_TX_PIN IO2 GPIO2 LED, PWM0_PIN IO3 GPIO3 RXD, UART_RX_PIN IO4 GPIO4 PWM2_PIN IO5 GPIO5 SPI0_CS0_PIN IO9 GPIO9 SD2, UART1_TX_PIN IO10 GPIO10 SD3, UART1_RX_PIN IO16 GPIO16 IO17 GPIO17 IO18 GPIO18 SPI0_SCK_PIN IO19 GPIO19 SPI0_SDI_PIN IO21 GPIO21 SDA_PIN IO22 GPIO22 SCL_PIN IO23 GPIO23 SPI0_SDO_PIN IO25 GPIO25 IO26 GPIO26 IO27 GPIO27 IO32 GPIO32 IO33 GPIO33 IO34 GPIO34 ADC0 IO35 GPIO35 ADC1 IO36 GPIO36 SVP, ADC2 IO39 GPIO39 SVN, ADC3 SD0 GPIO7 SD1 GPIO8 TCK GPIO13 TD0 GPIO15 TDI GPIO12 TMS GPIO14 Machine Package Docs Documentation for the machine package for the ESP32 Core board v2 ESP32 - mini32 https://tinygo.org/docs/reference/microcontrollers/esp32-mini32/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/esp32-mini32/ The mini32 is a small development board based on the popular Espressif ESP32. The ESP32 includes a built-in radio that can be used for WiFi or Bluetooth wireless connections. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Bluetooth YES Not yet Pins Pin Hardware pin Alternative names CLK GPIO6 CMD GPIO11 IO0 GPIO0 PWM1_PIN IO1 GPIO1 TXD, UART_TX_PIN IO2 GPIO2 LED, PWM0_PIN IO3 GPIO3 RXD, UART_RX_PIN IO4 GPIO4 PWM2_PIN IO5 GPIO5 SPI0_CS0_PIN IO9 GPIO9 SD2, UART1_TX_PIN IO10 GPIO10 SD3, UART1_RX_PIN IO16 GPIO16 IO17 GPIO17 IO18 GPIO18 SPI0_SCK_PIN IO19 GPIO19 SPI0_SDI_PIN IO21 GPIO21 SDA_PIN IO22 GPIO22 SCL_PIN IO23 GPIO23 SPI0_SDO_PIN IO25 GPIO25 IO26 GPIO26 IO27 GPIO27 IO32 GPIO32 IO33 GPIO33 IO34 GPIO34 ADC0 IO35 GPIO35 ADC1 IO36 GPIO36 SVP, ADC2 IO39 GPIO39 SVN, ADC3 SD0 GPIO7 SD1 GPIO8 TCK GPIO13 TD0 GPIO15 TDI GPIO12 TMS GPIO14 Machine Package Docs Documentation for the machine package for the ESP32-mini32 ESP8266 - d1mini https://tinygo.org/docs/reference/microcontrollers/d1mini/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/d1mini/ The Espressif ESP8266 d1mini is a very small yet powerful SoC that is usually used for WiFi applications thanks to its built-in radio. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES Not yet I2C NO (software only) Not yet ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Pins Pin Hardware pin Alternative names D0 GPIO16 D1 GPIO5 SCL_PIN D2 GPIO4 SDA_PIN D3 GPIO0 D4 GPIO2 LED D5 GPIO14 SPI0_SCK_PIN D6 GPIO12 SPI0_SDI_PIN D7 GPIO13 SPI0_SDO_PIN D8 GPIO15 SPI0_CS0_PIN UART_TX_PIN GPIO1 UART_RX_PIN GPIO3 Machine Package Docs Documentation for the machine package for the ESP8266 d1mini ESP8266 - NodeMCU https://tinygo.org/docs/reference/microcontrollers/nodemcu/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nodemcu/ The Espressif ESP8266 NodeMCU is a small yet powerful SoC that is usually used for WiFi applications thanks to its built-in radio. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES Not yet I2C NO (software only) Not yet ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Pins Pin Hardware pin Alternative names D0 GPIO16 D1 GPIO5 SCL_PIN D2 GPIO4 SDA_PIN D3 GPIO0 D4 GPIO2 LED D5 GPIO14 SPI0_SCK_PIN D6 GPIO12 SPI0_SDI_PIN D7 GPIO13 SPI0_SDO_PIN D8 GPIO15 SPI0_CS0_PIN UART_TX_PIN GPIO1 UART_RX_PIN GPIO3 Machine Package Docs Documentation for the machine package for the ESP8266 NodeMCU Game Boy Advance https://tinygo.org/docs/reference/microcontrollers/gameboy-advance/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/gameboy-advance/ The Game Boy Advance is a handheld videogame platform based on the ARM7TDMI microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO ? ? UART ? ? SPI ? ? I2C ? ? ADC ? ? PWM ? ? USBDevice ? ? Machine Package Docs Documentation for the machine package for the Gameboy Advance Installing dependencies You can use a Game Boy Advance software emulator such as MGBA (https://mgba.io) to test your programs. iLabs Challenger RP2040 LoRa https://tinygo.org/docs/reference/microcontrollers/challenger-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/challenger-rp2040/ The iLabs Challenger RP2040 LoRa is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM LED GPIO24 I2C0_SDA_PIN PWM4 (channel A) D5 GPIO2 I2C1_SDA_PIN, SDA_PIN I2C1 (SDA) PWM1 (channel A) D6 GPIO3 I2C1_SCL_PIN, SCL_PIN I2C1 (SCL) PWM1 (channel B) D9 GPIO4 UART1_TX_PIN I2C0 (SDA) PWM2 (channel A) D10 GPIO5 UART1_RX_PIN I2C0 (SCL) PWM2 (channel B) D11 GPIO6 I2C1 (SDA) PWM3 (channel A) D12 GPIO7 I2C1 (SCL) PWM3 (channel B) D13 GPIO8 I2C0 (SDA) PWM4 (channel A) A0 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) A1 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) A2 GPIO28 ADC2 PWM6 (channel A) A3 GPIO29 ADC3 PWM6 (channel B) I2C0_SCL_PIN GPIO25 PWM4 (channel B) SPI0_SCK_PIN GPIO22 PWM3 (channel A) SPI0_SDO_PIN GPIO23 PWM3 (channel B) SPI0_SDI_PIN GPIO20 I2C0 (SDA) PWM2 (channel A) SPI1_SCK_PIN GPIO10 LORA_SCK I2C1 (SDA) PWM5 (channel A) SPI1_SDO_PIN GPIO11 LORA_SDO I2C1 (SCL) PWM5 (channel B) SPI1_SDI_PIN GPIO12 LORA_SDI I2C0 (SDA) PWM6 (channel A) LORA_CS GPIO9 I2C0 (SCL) PWM4 (channel B) LORA_RESET GPIO13 I2C0 (SCL) PWM6 (channel B) LORA_DIO0 GPIO14 I2C1 (SDA) PWM7 (channel A) LORA_DIO1 GPIO15 I2C1 (SCL) PWM7 (channel B) LORA_DIO2 GPIO18 I2C1 (SDA) PWM1 (channel A) UART0_TX_PIN GPIO16 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO17 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) Machine Package Docs Documentation for the machine package for the iLabs Challenger RP2040 LoRa Important Build Options https://tinygo.org/docs/reference/usage/important-options/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/usage/important-options/ There are a few flags to control how binaries are built: -o Output filename, see the build command. -target Select the target you want to use. Leave it empty to compile for the host. This switch also configures the emulator, flash tool and debugger to use so you don’t have to fiddle with those options. Read supported targets for a list of supported targets. Example targets: -target=wasm WebAssembly target. Creates . LED: fade multiple https://tinygo.org/tour/pwm/multiple/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/multiple/ One PWM peripheral can be used to control multiple LEDs as well, by using different channels. In that case, the frequency (or period) will be the same for all LEDs, but the duty cycle (percent on) will vary per channel and therefore per LED. On the right, we have a single PWM instance but we use two goroutines to fade both LEDs in and out. Both LEDs are using a different PWM channel. M5Stack https://tinygo.org/docs/reference/microcontrollers/m5stack/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/m5stack/ The m5stack is a development board based on the Espressif ESP32 a powerful chip that is used on many different board mostly because of the built-in radio that can be used for WiFi or Bluetooth wireless connections. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Bluetooth YES Not yet Pins Pin Hardware pin Alternative names IO0 GPIO0 IO1 GPIO1 UART0_TX_PIN, UART_TX_PIN IO2 GPIO2 IO3 GPIO3 UART0_RX_PIN, UART_RX_PIN IO4 GPIO4 SDCARD_SS_PIN IO5 GPIO5 IO6 GPIO6 IO7 GPIO7 IO8 GPIO8 IO9 GPIO9 IO10 GPIO10 IO11 GPIO11 IO12 GPIO12 IO13 GPIO13 IO14 GPIO14 SPI0_CS0_PIN, LCD_SS_PIN IO15 GPIO15 IO16 GPIO16 UART1_RX_PIN IO17 GPIO17 UART1_TX_PIN IO18 GPIO18 SPI0_SCK_PIN, LCD_SCK_PIN, SDCARD_SCK_PIN IO19 GPIO19 SPI0_SDI_PIN, LCD_SDI_PIN, SDCARD_SDI_PIN IO21 GPIO21 SDA0_PIN, SDA_PIN IO22 GPIO22 SCL0_PIN, SCL_PIN IO23 GPIO23 SPI0_SDO_PIN, LCD_SDO_PIN, SDCARD_SDO_PIN IO25 GPIO25 SPEAKER_PIN, DAC1 IO26 GPIO26 DAC2 IO27 GPIO27 LCD_DC_PIN IO32 GPIO32 LCD_BL_PIN IO33 GPIO33 LCD_RST_PIN IO34 GPIO34 IO35 GPIO35 ADC1 IO36 GPIO36 ADC2 IO37 GPIO37 BUTTON_C IO38 GPIO38 BUTTON_B IO39 GPIO39 BUTTON_A, BUTTON Machine Package Docs Documentation for the machine package for the M5Stack Core2 M5Stack Core2 https://tinygo.org/docs/reference/microcontrollers/m5stack-core2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/m5stack-core2/ The m5stack-core2 is a development board based on the Espressif ESP32 a powerful chip that is used on many different board mostly because of the built-in radio that can be used for WiFi or Bluetooth wireless connections. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO WiFi YES Not Yet Bluetooth YES Not yet Pins Pin Hardware pin Alternative names IO0 GPIO0 IO1 GPIO1 UART0_TX_PIN, UART_TX_PIN IO2 GPIO2 IO3 GPIO3 UART0_RX_PIN, UART_RX_PIN IO4 GPIO4 SDCARD_SS_PIN IO5 GPIO5 SPI0_CS0_PIN, LCD_SS_PIN IO6 GPIO6 IO7 GPIO7 IO8 GPIO8 IO9 GPIO9 IO10 GPIO10 IO11 GPIO11 IO12 GPIO12 IO13 GPIO13 UART1_RX_PIN IO14 GPIO14 UART1_TX_PIN IO15 GPIO15 LCD_DC_PIN IO16 GPIO16 IO17 GPIO17 IO18 GPIO18 SPI0_SCK_PIN, LCD_SCK_PIN, SDCARD_SCK_PIN IO19 GPIO19 IO21 GPIO21 SDA0_PIN IO22 GPIO22 SCL0_PIN IO23 GPIO23 SPI0_SDO_PIN, LCD_SDO_PIN, SDCARD_SDO_PIN IO25 GPIO25 DAC1 IO26 GPIO26 DAC2 IO27 GPIO27 IO32 GPIO32 SDA1_PIN, SDA_PIN IO33 GPIO33 SCL1_PIN, SCL_PIN IO34 GPIO34 IO35 GPIO35 ADC1 IO36 GPIO36 ADC2 IO38 GPIO38 SPI0_SDI_PIN, LCD_SDI_PIN, SDCARD_SDI_PIN IO39 GPIO39 Pins Pin Hardware pin Alternative names IO0 GPIO0 IO1 GPIO1 UART0_TX_PIN, UART_TX_PIN IO2 GPIO2 IO3 GPIO3 UART0_RX_PIN, UART_RX_PIN IO4 GPIO4 SDCARD_SS_PIN IO5 GPIO5 SPI0_CS0_PIN, LCD_SS_PIN IO6 GPIO6 IO7 GPIO7 IO8 GPIO8 IO9 GPIO9 IO10 GPIO10 IO11 GPIO11 IO12 GPIO12 IO13 GPIO13 UART1_RX_PIN IO14 GPIO14 UART1_TX_PIN IO15 GPIO15 LCD_DC_PIN IO16 GPIO16 IO17 GPIO17 IO18 GPIO18 SPI0_SCK_PIN, LCD_SCK_PIN, SDCARD_SCK_PIN IO19 GPIO19 IO21 GPIO21 SDA0_PIN IO22 GPIO22 SCL0_PIN IO23 GPIO23 SPI0_SDO_PIN, LCD_SDO_PIN, SDCARD_SDO_PIN IO25 GPIO25 DAC1 IO26 GPIO26 DAC2 IO27 GPIO27 IO32 GPIO32 SDA1_PIN, SDA_PIN IO33 GPIO33 SCL1_PIN, SCL_PIN IO34 GPIO34 IO35 GPIO35 ADC1 IO36 GPIO36 ADC2 IO38 GPIO38 SPI0_SDI_PIN, LCD_SDI_PIN, SDCARD_SDI_PIN IO39 GPIO39 Machine Package Docs Documentation for the machine package for the M5Stack Core2 M5Stamp C3 https://tinygo.org/docs/reference/microcontrollers/m5stamp-c3/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/m5stamp-c3/ The M5Stamp-C3 is a development board based on the Espressif ESP32-C3 a powerful chip that is used on many different board mostly because of the built-in radio that can be used for WiFi or Bluetooth wireless connections. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES Not yet ADC YES YES PWM YES Not yet USBDevice YES Not yet WiFi YES Not Yet Bluetooth YES Not yet Pins Pin Hardware pin Alternative names IO0 GPIO0 XTAL_32K_P IO1 GPIO1 XTAL_32K_N IO2 GPIO2 WS2812 IO3 GPIO3 IO4 GPIO4 MTMS IO5 GPIO5 MTDI IO6 GPIO6 MTCK IO7 GPIO7 MTDO IO8 GPIO8 IO9 GPIO9 IO10 GPIO10 IO11 GPIO11 VDD_SPI IO12 GPIO12 SPIHD IO13 GPIO13 SPISP IO14 GPIO14 SPICS0 IO15 GPIO15 SPICLK IO16 GPIO16 SPID IO17 GPIO17 SPIQ IO18 GPIO18 IO19 GPIO19 IO20 GPIO20 U0RXD, UART_RX_PIN IO21 GPIO21 U0TXD, UART_TX_PIN Machine Package Docs Documentation for the machine package for the M5Stamp-C3 Makerdiary nRF52840-MDK https://tinygo.org/docs/reference/microcontrollers/nrf52840-mdk/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nrf52840-mdk/ The nRF52840-MDK (not to be confused with its sibling, the nRF52840-MDK-USB-Dongle) is an open-source, micro development kit for IoT applications based on the Nordic Semiconductor nRF52840 SoC chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names LED_GREEN P0_22 LED LED_RED P0_23 LED_BLUE P0_24 UART_TX_PIN P0_20 UART_RX_PIN P0_19 Machine Package Docs Documentation for the machine package for the nRF52840-MDK Makerdiary nRF52840-MDK USB Dongle https://tinygo.org/docs/reference/microcontrollers/nrf52840-mdk-usb-dongle/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nrf52840-mdk-usb-dongle/ The nRF52840 MDK USB Dongle (not to be confused with its sibling, the nRF52840-MDK) is an open-source, micro development kit dongle for IoT applications based on the Nordic Semiconductor nRF52840 SoC chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names LED P0_22 LED_GREEN LED_RED P0_23 LED_BLUE P0_24 BUTTON P0_18 Machine Package Docs Documentation for the machine package for the nRF52840-MDK-USB-Dongle Manual LLVM build https://tinygo.org/docs/guides/build/manual-llvm/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/build/manual-llvm/ You need to build LLVM manually in the following cases You would like to use it for the ESP8266 or ESP32 chips You are using Windows. Your Linux distribution (if you use Linux) does not ship the right LLVM version. Build dependencies Depending on which OS you use the command to install the dependencies needed to build LLVM will differ. Skip over to the command for your Operating System (OS) in this section (OS names are bolded): Microchip SAM E54 Xplained Pro https://tinygo.org/docs/reference/microcontrollers/atsame54-xpro/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/atsame54-xpro/ The Microchip SAM E54 Xplained Pro is a tiny ARM development board based on the Atmel ATSAME54P20 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM LED PC18 PDEC_INDEX, PIN_LED0 TCC0 (channel 2) BUTTON PB31 PIN_BTN0 TCC4 (channel 1), TCC0 (channel 7) EXT1_PIN3_ADC_P PB04 EXT1_PIN4_ADC_N PB05 EXT1_PIN5_GPIO1 PA06 EXT1_PIN6_GPIO2 PA07 EXT1_PIN7_PWM_P PB08 EXT1_PIN8_PWM_N PB09 EXT1_PIN9_IRQ PB07 EXT1_PIN9_GPIO EXT1_PIN10_SPI_SS_B PA27 EXT1_PIN10_GPIO EXT1_PIN11_TWI_SDA PA22 CAN0_TX, PCC_DATA06, SDA0_PIN, SDA_PIN I2C0 (SDA) TCC1 (channel 6), TCC0 (channel 2) EXT1_PIN12_TWI_SCL PA23 CAN0_RX, PCC_DATA07, SCL0_PIN, SCL_PIN I2C0 (SCL) TCC1 (channel 7), TCC0 (channel 3) EXT1_PIN13_UART_RX PA05 UART_RX_PIN EXT1_PIN14_UART_TX PA04 UART_TX_PIN EXT1_PIN15_SPI_SS_A PB28 SPI0_SS_PIN TCC1 (channel 4) EXT1_PIN16_SPI_SDO PB27 SPI0_SDO_PIN TCC1 (channel 3) EXT1_PIN17_SPI_SDI PB29 SPI0_SDI_PIN TCC1 (channel 5) EXT1_PIN18_SPI_SCK PB26 SPI0_SCK_PIN TCC1 (channel 2) EXT2_PIN3_ADC_P PB00 EXT2_PIN4_ADC_N PA03 EXT2_PIN5_GPIO1 PB01 EXT2_PIN6_GPIO2 PB06 EXT2_PIN7_PWM_P PB14 PCC_DATA08 TCC4 (channel 0), TCC0 (channel 2) EXT2_PIN8_PWM_N PB15 PCC_DATA09 TCC4 (channel 1), TCC0 (channel 3) EXT2_PIN9_IRQ PD00 EXT2_PIN9_GPIO EXT2_PIN10_SPI_SS_B PB02 EXT2_PIN10_GPIO TCC2 (channel 2) EXT2_PIN11_TWI_SDA PD08 EXT3_PIN11_TWI_SDA, I2C_SDA, PCC_I2C_SDA, SDA1_PIN, SDA2_PIN, SDA_DGI_PIN I2C1 (SDA), I2C2 (SDA), I2C3 (SDA) TCC0 (channel 1) EXT2_PIN12_TWI_SCL PD09 EXT3_PIN12_TWI_SCL, I2C_SCL, PCC_I2C_SCL, SCL1_PIN, SCL2_PIN, SCL_DGI_PIN I2C1 (SCL), I2C2 (SCL), I2C3 (SCL) TCC0 (channel 2) EXT2_PIN13_UART_RX PB17 UART2_RX_PIN TCC3 (channel 1), TCC0 (channel 5) EXT2_PIN14_UART_TX PB16 UART2_TX_PIN TCC3 (channel 0), TCC0 (channel 4) EXT2_PIN15_SPI_SS_A PC06 SPI1_SS_PIN EXT2_PIN16_SPI_SDO PC04 EXT3_PIN16_SPI_SDO, SPI1_SDO_PIN, SPI2_SDO_PIN, SPI_DGI_SDO_PIN TCC0 (channel 0) EXT2_PIN17_SPI_SDI PC07 EXT3_PIN17_SPI_SDI, SPI1_SDI_PIN, SPI2_SDI_PIN, SPI_DGI_SDI_PIN EXT2_PIN18_SPI_SCK PC05 EXT3_PIN18_SPI_SCK, SPI1_SCK_PIN, SPI2_SCK_PIN, SPI_DGI_SCK_PIN TCC0 (channel 1) EXT3_PIN3_ADC_P PC02 EXT3_PIN4_ADC_N PC03 EXT3_PIN5_GPIO1 PC01 EXT3_PIN6_GPIO2 PC10 TCC0 (channel 0), TCC1 (channel 4) EXT3_PIN7_PWM_P PD10 TCC0 (channel 3) EXT3_PIN8_PWM_N PD11 TCC0 (channel 4) EXT3_PIN9_IRQ PC30 EXT3_PIN9_GPIO EXT3_PIN10_SPI_SS_B PC31 EXT3_PIN10_GPIO EXT3_PIN13_UART_RX PC23 UART3_RX_PIN TCC0 (channel 7) EXT3_PIN14_UART_TX PC22 UART3_TX_PIN TCC0 (channel 6) EXT3_PIN15_SPI_SS_A PC14 SPI2_SS_PIN TCC0 (channel 4), TCC1 (channel 0) SD_CARD_MCDA0 PB18 TCC1 (channel 0) SD_CARD_MCDA1 PB19 TCC1 (channel 1) SD_CARD_MCDA2 PB20 TCC1 (channel 2) SD_CARD_MCDA3 PB21 TCC1 (channel 3) SD_CARD_MCCK PA21 PCC_DATA05 TCC1 (channel 5), TCC0 (channel 1) SD_CARD_MCCDA PA20 PCC_DATA04 TCC1 (channel 4), TCC0 (channel 0) SD_CARD_DETECT PD20 TCC1 (channel 0) SD_CARD_PROTECT PD21 TCC1 (channel 1) CAN1_STANDBY PC13 CAN_STANDBY TCC0 (channel 3), TCC1 (channel 7) CAN1_TX PB12 CAN_TX TCC3 (channel 0), TCC0 (channel 0) CAN1_RX PB13 CAN_RX TCC3 (channel 1), TCC0 (channel 1) PDEC_PHASE_A PC16 TCC0 (channel 0) PDEC_PHASE_B PC17 TCC0 (channel 1) PCC_VSYNC_DEN1 PA12 ETHERNET_RX1 TCC0 (channel 6), TCC1 (channel 2) PCC_HSYNC_DEN2 PA13 ETHERNET_RX0 TCC0 (channel 7), TCC1 (channel 3) PCC_CLK PA14 ETHERNET_TXCK TCC2 (channel 0), TCC1 (channel 2) PCC_XCLK PA15 ETHERNET_RXER TCC2 (channel 1), TCC1 (channel 3) PCC_DATA00 PA16 PIN_QT_BUTTON I2C0 (SDA) TCC1 (channel 0), TCC0 (channel 4) PCC_DATA01 PA17 ETHERNET_TXEN I2C0 (SCL) TCC1 (channel 1), TCC0 (channel 5) PCC_DATA02 PA18 ETHERNET_TX0 TCC1 (channel 2), TCC0 (channel 6) PCC_DATA03 PA19 ETHERNET_TX1 TCC1 (channel 3), TCC0 (channel 7) PCC_RESET PC12 ETHERNET_MDIO TCC0 (channel 2), TCC1 (channel 6) PCC_PWDN PC11 ETHERNET_MDC TCC0 (channel 1), TCC1 (channel 5) ETHERNET_RXDV PC20 TCC0 (channel 4) ETHERNET_INT PD12 TCC0 (channel 5) ETHERNET_RESET PC21 TCC0 (channel 5) PIN_ETH_LED PC15 TCC0 (channel 5), TCC1 (channel 1) PIN_ADC_DAC PA02 PIN_VBUS_DETECT PC00 PIN_USB_ID PC19 TCC0 (channel 3) USBCDC_DM_PIN PA24 TCC2 (channel 2) USBCDC_DP_PIN PA25 TCC2 (channel 3) UART4_TX_PIN PB25 UART4_RX_PIN PB24 SPI_DGI_SS_PIN PD01 QSPI_SCK PB10 TCC0 (channel 4), TCC1 (channel 0) QSPI_CS PB11 TCC0 (channel 5), TCC1 (channel 1) QSPI_DATA0 PA08 TCC0 (channel 0), TCC1 (channel 4) QSPI_DATA1 PA09 TCC0 (channel 1), TCC1 (channel 5) QSPI_DATA2 PA10 TCC0 (channel 2), TCC1 (channel 6) QSPI_DATA3 PA11 TCC0 (channel 3), TCC1 (channel 7) Machine Package Docs Documentation for the machine package for the Adafruit SAM E54 Xplained Pro nice!nano https://tinygo.org/docs/reference/microcontrollers/nicenano/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nicenano/ The nice!nano is a wireless, BLE enabled replacement for the Pro Micro powered by the Nordic Semiconductor nrf52840 processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D006 P0_06 UART_RX_PIN D008 P0_08 UART_TX_PIN D017 P0_17 SDA_PIN D020 P0_20 SCL_PIN D022 P0_22 SPI0_SCK_PIN D024 P0_24 SPI0_SDO_PIN D100 P1_00 SPI0_SDI_PIN D011 P0_11 D104 P1_04 D106 P1_06 D004 P0_04 AIN2 D013 P0_13 D115 P1_15 D113 P1_13 D031 P0_31 AIN7 D029 P0_29 AIN5 D002 P0_02 AIN0 D111 P1_11 D010 P0_10 D009 P0_09 D026 P0_26 D012 P0_12 D101 P1_01 D102 P1_02 D107 P1_07 LED P0_15 Machine Package Docs Documentation for the machine package for the nice! Nintendo Switch https://tinygo.org/docs/reference/microcontrollers/nintendoswitch/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nintendoswitch/ The Nintendo Switch is a handheld videogame platform based on the Nvidia Tegra X1 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO ? ? UART ? ? SPI ? ? I2C ? ? ADC ? ? PWM ? ? USBDevice ? ? Machine Package Docs Documentation for the machine package for the Nintendo Switch Installing dependencies You will need the linkle (https://github.com/MegatonHammer/linkle) program to convert to the NRO format needed by the Switch: Nordic Semiconductor PCA10031 https://tinygo.org/docs/reference/microcontrollers/pca10031/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pca10031/ The Nordic Semiconductor PCA10031 is a low-cost, versatile USB development dongle for wireless applications based on the Nordic Semiconductor nRF51422 chip using the nRF51 series SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Bluetooth YES YES Pins Pin Hardware pin Alternative names LED1 P0_21 LED_RED, LED LED2 P0_22 LED_GREEN LED3 P0_23 LED_BLUE UART_TX_PIN P0_09 UART_RX_PIN P0_11 Machine Package Docs Documentation for the machine package for the PCA10031 Nordic Semiconductor PCA10040 https://tinygo.org/docs/reference/microcontrollers/pca10040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pca10040/ The Nordic Semiconductor PCA10040 is a single-board development kit for wireless applications based on the Nordic Semiconductor nRF52832 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice NO NO Bluetooth YES YES Pins Pin Hardware pin Alternative names LED1 P0_17 LED LED2 P0_18 LED3 P0_19 LED4 P0_20 BUTTON1 P0_13 BUTTON BUTTON2 P0_14 BUTTON3 P0_15 BUTTON4 P0_16 UART_TX_PIN P0_06 UART_RX_PIN P0_08 ADC0 P0_03 ADC1 P0_04 ADC2 P0_28 ADC3 P0_29 ADC4 P0_30 ADC5 P0_31 SDA_PIN P0_26 SCL_PIN P0_27 SPI0_SCK_PIN P0_25 SPI0_SDO_PIN P0_23 SPI0_SDI_PIN P0_24 Machine Package Docs Documentation for the machine package for the PCA10040 Nordic Semiconductor PCA10056 https://tinygo.org/docs/reference/microcontrollers/pca10056/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pca10056/ The Nordic Semiconductor PCA10056 is a single-board development kit for wireless applications based on the Nordic Semiconductor nRF52840 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names LED1 P0_13 LED LED2 P0_14 LED3 P0_15 LED4 P0_16 BUTTON1 P0_11 BUTTON BUTTON2 P0_12 BUTTON3 P0_24 BUTTON4 P0_25 UART_TX_PIN P0_06 UART_RX_PIN P0_08 ADC0 P0_03 ADC1 P0_04 ADC2 P0_28 ADC3 P0_29 ADC4 P0_30 ADC5 P0_31 SDA_PIN P0_26 SCL_PIN P0_27 SPI0_SCK_PIN P1_15 SPI0_SDO_PIN P1_13 SPI0_SDI_PIN P1_14 Machine Package Docs Documentation for the machine package for the PCA10056 Nordic Semiconductor PCA10059 https://tinygo.org/docs/reference/microcontrollers/pca10059/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pca10059/ The Nordic Semiconductor PCA10059 is a single-board development kit for wireless applications based on the Nordic Semiconductor nRF52840 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names LED1 P0_06 LED LED2 P0_08 LED3 P1_09 LED4 P0_12 BUTTON1 P1_06 BUTTON ADC1 P0_02 ADC2 P0_04 ADC3 P0_29 ADC4 P0_31 Machine Package Docs Documentation for the machine package for the PCA10059 Particle Argon https://tinygo.org/docs/reference/microcontrollers/particle-argon/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/particle-argon/ The Particle Argon is a powerful Wi-Fi enabled development board. It is based on the Nordic nRF52840 and ESP32 2.4 GHz Wi-Fi coprocessor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names A0 P0_03 A1 P0_04 A2 P0_28 A3 P0_29 A4 P0_30 A5 P0_31 D0 P0_26 SDA_PIN D1 P0_27 SCL_PIN D2 P1_01 D3 P1_02 D4 P1_08 D5 P1_10 D6 P1_11 D7 P1_12 LED D8 P1_03 D9 P0_06 UART_TX_PIN D10 P0_08 UART_RX_PIN D11 P1_14 SPI0_SDI_PIN D12 P1_13 SPI0_SDO_PIN D13 P1_15 SPI0_SCK_PIN LED_GREEN P0_14 LED_RED P0_13 LED_BLUE P0_15 SPI1_SCK_PIN P0_19 SPI1_SDO_PIN P0_20 SPI1_SDI_PIN P0_21 SPI1_CS_PIN P0_17 SPI1_WP_PIN P0_22 SPI1_HOLD_PIN P0_23 ESP32_TXD_PIN P1_04 ESP32_RXD_PIN P1_05 ESP32_CTS_PIN P1_07 ESP32_RTS_PIN P1_06 ESP32_BOOT_MODE_PIN P0_16 ESP32_WIFI_EN_PIN P0_24 ESP32_HOST_WK_PIN P0_07 MODE_BUTTON_PIN P0_11 CHARGE_STATUS_PIN P1_09 LIPO_VOLTAGE_PIN P0_05 PCB_ANTENNA_PIN P0_02 EXTERNAL_UFL_PIN P0_25 NFC1_PIN P0_09 NFC2_PIN P0_10 Machine Package Docs Documentation for the machine package for the Particle Argon Particle Boron https://tinygo.org/docs/reference/microcontrollers/particle-boron/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/particle-boron/ The Particle Boron The Boron is a powerful LTE CAT-M1/2G/3G enabled development kit that supports cellular networks and Bluetooth LE (BLE). It is based on the Nordic nRF52840 and u-blox SARA coprocessor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names A0 P0_03 A1 P0_04 A2 P0_28 A3 P0_29 A4 P0_30 A5 P0_31 D0 P0_26 SDA_PIN D1 P0_27 SCL_PIN D2 P1_01 D3 P1_02 D4 P1_08 D5 P1_10 D6 P1_11 D7 P1_12 LED D8 P1_03 D9 P0_06 UART_TX_PIN D10 P0_08 UART_RX_PIN D11 P1_14 SPI0_SDI_PIN D12 P1_13 SPI0_SDO_PIN D13 P1_15 SPI0_SCK_PIN LED_GREEN P0_14 LED_RED P0_13 LED_BLUE P0_15 SDA1_PIN P0_24 SCL1_PIN P1_09 INT1_PIN P0_05 SPI1_SCK_PIN P0_19 SPI1_SDO_PIN P0_20 SPI1_SDI_PIN P0_21 SPI1_CS_PIN P0_17 SPI1_WP_PIN P0_22 SPI1_HOLD_PIN P0_23 SARA_TXD_PIN P1_05 SARA_RXD_PIN P1_04 SARA_CTS_PIN P1_06 SARA_RTS_PIN P1_07 SARA_RESET_PIN P0_12 SARA_POWER_ON_PIN P0_16 SARA_BUFF_EN_PIN P0_25 SARA_VINT_PIN P0_02 MODE_BUTTON_PIN P0_11 ANTENNA_SEL_PIN P0_07 NFC1_PIN P0_09 NFC2_PIN P0_10 Machine Package Docs Documentation for the machine package for the Particle Boron Particle Xenon https://tinygo.org/docs/reference/microcontrollers/particle-xenon/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/particle-xenon/ The Particle Xenon is a low cost mesh-enabled development board. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names A0 P0_03 A1 P0_04 A2 P0_28 A3 P0_29 A4 P0_30 A5 P0_31 D0 P0_26 SDA_PIN D1 P0_27 SCL_PIN D2 P1_01 D3 P1_02 D4 P1_08 D5 P1_10 D6 P1_11 D7 P1_12 LED D8 P1_03 D9 P0_06 UART_TX_PIN D10 P0_08 UART_RX_PIN D11 P1_14 SPI0_SDI_PIN D12 P1_13 SPI0_SDO_PIN D13 P1_15 SPI0_SCK_PIN LED_GREEN P0_14 LED_RED P0_13 LED_BLUE P0_15 SPI1_SCK_PIN P0_19 SPI1_SDO_PIN P0_20 SPI1_SDI_PIN P0_21 SPI1_CS_PIN P0_17 SPI1_WP_PIN P0_22 SPI1_HOLD_PIN P0_23 MODE_BUTTON_PIN P0_11 CHARGE_STATUS_PIN P1_09 LIPO_VOLTAGE_PIN P0_05 PCB_ANTENNA_PIN P0_24 EXTERNAL_UFL_PIN P0_25 NFC1_PIN P0_09 NFC2_PIN P0_10 Machine Package Docs Documentation for the machine package for the Particle Xenon Phytec reel board https://tinygo.org/docs/reference/microcontrollers/reelboard/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/reelboard/ The reel board is an evaluation board based on the Nordic Semiconductor nRF52840 SoC. It is equipped with an Electrophoretic (electronic ink) Display (EPD), along with temperature, humidity, light, and accelerometer sensors, and Bluetooth connectivity. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names LED_RED P0_11 LED2 LED_GREEN P0_12 LED3 LED_BLUE P1_09 LED4 LED_YELLOW P0_13 LED1, LED EPD_BUSY_PIN P0_14 EPD_RESET_PIN P0_15 EPD_DC_PIN P0_16 EPD_CS_PIN P0_17 EPD_SCK_PIN P0_19 EPD_SDO_PIN P0_20 POWER_SUPPLY_PIN P1_00 BUTTON P0_07 UART_TX_PIN P0_06 UART_RX_PIN P0_08 SDA_PIN P0_26 SCL_PIN P0_27 SPI0_SCK_PIN P1_15 SPI0_SDO_PIN P1_13 SPI0_SDI_PIN P1_14 Machine Package Docs Documentation for the machine package for the reel board Pimoroni Badger2040 https://tinygo.org/docs/reference/microcontrollers/badger2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/badger2040/ The Pimoroni Badger2040 is a badge with E Ink display based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM LED GPIO25 PWM4 (channel B) BUTTON_A GPIO12 I2C0 (SDA) PWM6 (channel A) BUTTON_B GPIO13 I2C0 (SCL) PWM6 (channel B) BUTTON_C GPIO14 I2C1 (SDA) PWM7 (channel A) BUTTON_UP GPIO15 I2C1 (SCL) PWM7 (channel B) BUTTON_DOWN GPIO11 I2C1 (SCL) PWM5 (channel B) BUTTON_USER GPIO23 PWM3 (channel B) EPD_BUSY_PIN GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) EPD_RESET_PIN GPIO21 I2C0 (SCL) PWM2 (channel B) EPD_DC_PIN GPIO20 I2C0 (SDA) PWM2 (channel A) EPD_CS_PIN GPIO17 I2C0 (SCL) PWM0 (channel B) EPD_SCK_PIN GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) EPD_SDO_PIN GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) VBUS_DETECT GPIO24 PWM4 (channel A) VREF_POWER GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) VREF_1V24 GPIO28 ADC2 PWM6 (channel A) VBAT_SENSE GPIO29 BATTERY, ADC3 PWM6 (channel B) ENABLE_3V3 GPIO10 I2C1 (SDA) PWM5 (channel A) I2C0_SDA_PIN GPIO4 I2C0 (SDA) PWM2 (channel A) I2C0_SCL_PIN GPIO5 I2C0 (SCL) PWM2 (channel B) SPI0_SDI_PIN GPIO16 I2C0 (SDA) PWM0 (channel A) UART0_TX_PIN GPIO0 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO1 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) Machine Package Docs Documentation for the machine package for the Pimoroni Badger2040 Pimoroni Badger2040-W https://tinygo.org/docs/reference/microcontrollers/badger2040-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/badger2040-w/ The Pimoroni Badger2040-W is a badge with E Ink display based on the Raspberry Pi Pico W microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM LED GPIO22 PWM3 (channel A) BUTTON_A GPIO12 I2C0 (SDA) PWM6 (channel A) BUTTON_B GPIO13 I2C0 (SCL) PWM6 (channel B) BUTTON_C GPIO14 I2C1 (SDA) PWM7 (channel A) BUTTON_UP GPIO15 I2C1 (SCL) PWM7 (channel B) BUTTON_DOWN GPIO11 I2C1 (SCL) PWM5 (channel B) EPD_BUSY_PIN GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) EPD_RESET_PIN GPIO21 I2C0 (SCL) PWM2 (channel B) EPD_DC_PIN GPIO20 I2C0 (SDA) PWM2 (channel A) EPD_CS_PIN GPIO17 I2C0 (SCL) PWM0 (channel B) EPD_SCK_PIN GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) EPD_SDO_PIN GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) VBUS_DETECT GPIO24 PWM4 (channel A) VREF_POWER GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) VREF_1V24 GPIO28 ADC2 PWM6 (channel A) VBAT_SENSE GPIO29 BATTERY, ADC3 PWM6 (channel B) ENABLE_3V3 GPIO10 I2C1 (SDA) PWM5 (channel A) RTC_ALARM GPIO8 I2C0 (SDA) PWM4 (channel A) I2C0_SDA_PIN GPIO4 I2C0 (SDA) PWM2 (channel A) I2C0_SCL_PIN GPIO5 I2C0 (SCL) PWM2 (channel B) SPI0_SDI_PIN GPIO16 I2C0 (SDA) PWM0 (channel A) UART0_TX_PIN GPIO0 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO1 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) Machine Package Docs Documentation for the machine package for the Pimoroni Badger2040 Pimoroni Tufty2040 https://tinygo.org/docs/reference/microcontrollers/tufty2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/tufty2040/ The Pimoroni Tufty2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM LED GPIO25 USER_LED PWM4 (channel B) BUTTON_A GPIO7 I2C1 (SCL) PWM3 (channel B) BUTTON_B GPIO8 I2C0 (SDA) PWM4 (channel A) BUTTON_C GPIO9 I2C0 (SCL) PWM4 (channel B) BUTTON_UP GPIO22 PWM3 (channel A) BUTTON_DOWN GPIO6 I2C1 (SDA) PWM3 (channel A) BUTTON_USER GPIO23 PWM3 (channel B) LCD_BACKLIGHT GPIO2 I2C1 (SDA) PWM1 (channel A) LCD_CS GPIO10 I2C1 (SDA) PWM5 (channel A) LCD_DC GPIO11 I2C1 (SCL) PWM5 (channel B) LCD_WR GPIO12 I2C0 (SDA) PWM6 (channel A) LCD_RD GPIO13 I2C0 (SCL) PWM6 (channel B) LCD_DB0 GPIO14 I2C1 (SDA) PWM7 (channel A) LCD_DB1 GPIO15 I2C1 (SCL) PWM7 (channel B) LCD_DB2 GPIO16 I2C0 (SDA) PWM0 (channel A) LCD_DB3 GPIO17 I2C0 (SCL) PWM0 (channel B) LCD_DB4 GPIO18 I2C1 (SDA) PWM1 (channel A) LCD_DB5 GPIO19 I2C1 (SCL) PWM1 (channel B) LCD_DB6 GPIO20 I2C0 (SDA) PWM2 (channel A) LCD_DB7 GPIO21 I2C0 (SCL) PWM2 (channel B) VBUS_DETECT GPIO24 PWM4 (channel A) BATTERY GPIO29 ADC3 PWM6 (channel B) LIGHT_SENSE GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) SENSOR_POWER GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) I2C0_SDA_PIN GPIO4 I2C0 (SDA) PWM2 (channel A) I2C0_SCL_PIN GPIO5 I2C0 (SCL) PWM2 (channel B) UART0_TX_PIN GPIO0 UART_TX_PIN I2C0 (SDA) PWM0 (channel A) UART0_RX_PIN GPIO1 UART_RX_PIN I2C0 (SCL) PWM0 (channel B) ADC2 GPIO28 PWM6 (channel A) Machine Package Docs Documentation for the machine package for the Pimoroni Tufty2040 PineTime DevKit https://tinygo.org/docs/reference/microcontrollers/pinetime-devkit0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pinetime-devkit0/ The PineTime is a smartwatch by Pine64 that is based on the Nordic Semiconductor nRF52832 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice NO NO Pins Pin Hardware pin Alternative names LED1 P0_23 LED, LCD_BACKLIGHT_HIGH LED2 P0_22 LCD_BACKLIGHT_MID LED3 P0_14 LCD_BACKLIGHT_LOW UART_TX_PIN P0_11 SPI0_SCK_PIN P0_02 LCD_SCK SPI0_SDO_PIN P0_03 LCD_SDI SPI0_SDI_PIN P0_04 SDA_PIN P0_06 SCL_PIN P0_07 BUTTON_IN P0_13 BUTTON_OUT P0_15 VIBRATOR_PIN P0_16 LCD_RS P0_18 LCD_CS P0_25 LCD_RESET P0_26 Machine Package Docs Documentation for the machine package for the PineTime PJRC Teensy 3.6 https://tinygo.org/docs/reference/microcontrollers/teensy36/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/teensy36/ The PJRC Teensy 3.6 is a small ARM development board based on the NXP MK66FX1M0VMD18 32-bit 180 MHz ARM Cortex-M4. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES Not yet I2C YES Not yet ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names D00 PB16 D01 PB17 D02 PD00 D03 PA12 D04 PA13 D05 PD07 D06 PD04 D07 PD02 D08 PD03 D09 PC03 D10 PC04 D11 PC06 D12 PC07 D13 PC05 LED D14 PD01 D15 PC00 D16 PB00 D17 PB01 D18 PB03 D19 PB02 D20 PD05 D21 PD06 D22 PC01 D23 PC02 D24 PE26 D25 PA05 D26 PA14 D27 PA15 D28 PA16 D29 PB18 D30 PB19 D31 PB10 D32 PB11 D33 PE24 D34 PE25 D35 PC08 D36 PC09 D37 PC10 D38 PC11 D39 PA17 D40 PA28 D41 PA29 D42 PA26 D43 PB20 D44 PB22 D45 PB23 D46 PB21 D47 PD08 D48 PD09 D49 PB04 D50 PB05 D51 PD14 D52 PD13 D53 PD12 D54 PD15 D55 PD11 D56 PE10 D57 PE11 D58 PE00 D59 PE01 D60 PE02 D61 PE03 D62 PE04 D63 PE05 Machine Package Docs Documentation for the machine package for the Teensy 3. PJRC Teensy 4.0 https://tinygo.org/docs/reference/microcontrollers/teensy40/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/teensy40/ The PJRC Teensy 4.0 is a small ARM development board based on the NXP iMXRT1062 32-bit 600 MHz ARM Cortex-M7. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names D0 PA3 UART_RX_PIN, UART1_RX_PIN, SPI2_CS_PIN D1 PA2 UART_TX_PIN, UART1_TX_PIN, SPI2_SDI_PIN D2 PD4 D3 PD5 D4 PD6 D5 PD8 D6 PB10 D7 PB17 UART2_RX_PIN D8 PB16 UART2_TX_PIN D9 PB11 D10 PB0 SPI_CS_PIN, SPI1_CS_PIN D11 PB2 SPI_SDO_PIN, SPI1_SDO_PIN D12 PB1 SPI_SDI_PIN, SPI1_SDI_PIN D13 PB3 LED, SPI_SCK_PIN, SPI1_SCK_PIN D14 PA18 A0, UART3_TX_PIN D15 PA19 A1, UART3_RX_PIN D16 PA23 A2, UART4_RX_PIN, I2C2_SCL_PIN D17 PA22 A3, UART4_TX_PIN, I2C2_SDA_PIN D18 PA17 A4, I2C_SDA_PIN, I2C1_SDA_PIN D19 PA16 A5, I2C_SCL_PIN, I2C1_SCL_PIN D20 PA26 A6, UART5_TX_PIN D21 PA27 A7, UART5_RX_PIN D22 PA24 A8 D23 PA25 A9 D24 PA12 A10, UART6_TX_PIN, I2C3_SCL_PIN D25 PA13 A11, UART6_RX_PIN, I2C3_SDA_PIN D26 PA30 A12, SPI2_SDO_PIN D27 PA31 A13, SPI2_SCK_PIN D28 PC18 UART7_RX_PIN D29 PD31 UART7_TX_PIN D30 PC23 D31 PC22 D32 PB12 D33 PD7 D34 PC15 SPI3_SDI_PIN D35 PC14 SPI3_SDO_PIN D36 PC13 SPI3_CS_PIN D37 PC12 SPI3_SCK_PIN D38 PC17 D39 PC16 Machine Package Docs Documentation for the machine package for the Teensy 4. ProductivityOpen P1AM-100 https://tinygo.org/docs/reference/microcontrollers/p1am-100/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/p1am-100/ The ProductivityOpen P1AM-100 automation platform compatible with Productivity1000 Series I/O modules, P1AM Series shields, and Arduino MKR format shields. It is based on the Microchip SAMD21G18 family of processors. It also has a NINA-W102 chip onboard which provides an wireless communication abilities based on the popular ESP32 family of wireless chips from Espressif. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA22 TCC0 (channel 0) D1 PA23 TCC0 (channel 1) D2 PA10 I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D3 PA11 I2S_WS_PIN TCC1 (channel 1), TCC0 (channel 3) D4 PB10 TCC0 (channel 0) D5 PB11 TCC0 (channel 1) D6 PA20 TCC0 (channel 2) D7 PA21 TCC0 (channel 3) D8 PA16 SPI0_SDO_PIN TCC2 (channel 0), TCC0 (channel 2) D9 PA17 SPI0_SCK_PIN TCC2 (channel 1), TCC0 (channel 3) D10 PA19 SPI0_SDI_PIN TCC0 (channel 3) D11 PA08 SDA_PIN I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 2) D12 PA09 SCL_PIN I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 3) D13 PB23 UART_RX_PIN D14 PB22 UART_TX_PIN D15 PA02 A0 D16 PB02 A1 D17 PB03 A2 D18 PA04 A3, BASE_SLAVE_SELECT_PIN TCC0 (channel 0) D19 PA05 A4, BASE_SLAVE_ACK_PIN TCC0 (channel 1) D20 PA06 A5 TCC1 (channel 0) D21 PA07 A6, I2S_SDO_PIN TCC1 (channel 1) SWITCH PA28 LED PB08 ADC_BATTERY PB09 BASE_ENABLE_PIN USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) USBCDC_HOST_ENABLE_PIN PA18 TCC0 (channel 2) SDCARD_SDI_PIN PA15 TCC0 (channel 1) SDCARD_SDO_PIN PA12 TCC2 (channel 0), TCC0 (channel 2) SDCARD_SCK_PIN PA13 TCC2 (channel 1), TCC0 (channel 3) SDCARD_SS_PIN PA14 TCC0 (channel 0) SDCARD_CD_PIN PA27 Machine Package Docs Documentation for the machine package for the ProductivityOpen P1AM-100 Raspberry Pi Pico https://tinygo.org/docs/reference/microcontrollers/pico/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pico/ The Raspberry Pi Pico is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM GP0 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) GP1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) GP2 GPIO2 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) GP3 GPIO3 I2C1_SCL_PIN I2C1 (SCL) PWM1 (channel B) GP4 GPIO4 I2C0_SDA_PIN I2C0 (SDA) PWM2 (channel A) GP5 GPIO5 I2C0_SCL_PIN I2C0 (SCL) PWM2 (channel B) GP6 GPIO6 I2C1 (SDA) PWM3 (channel A) GP7 GPIO7 I2C1 (SCL) PWM3 (channel B) GP8 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) GP9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) GP10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) GP11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) GP12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) GP13 GPIO13 I2C0 (SCL) PWM6 (channel B) GP14 GPIO14 I2C1 (SDA) PWM7 (channel A) GP15 GPIO15 I2C1 (SCL) PWM7 (channel B) GP16 GPIO16 SPI0_SDI_PIN I2C0 (SDA) PWM0 (channel A) GP17 GPIO17 I2C0 (SCL) PWM0 (channel B) GP18 GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) GP19 GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) GP20 GPIO20 I2C0 (SDA) PWM2 (channel A) GP21 GPIO21 I2C0 (SCL) PWM2 (channel B) GP22 GPIO22 PWM3 (channel A) GP26 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) GP27 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) GP28 GPIO28 ADC2 PWM6 (channel A) LED GPIO25 PWM4 (channel B) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Pico Raspberry Pi Pico 2 https://tinygo.org/docs/reference/microcontrollers/pico2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pico2/ The Raspberry Pi Pico 2 is a tiny development board based on the Raspberry Pi RP2350 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM GP0 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) GP1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) GP2 GPIO2 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) GP3 GPIO3 I2C1_SCL_PIN I2C1 (SCL) PWM1 (channel B) GP4 GPIO4 I2C0_SDA_PIN I2C0 (SDA) PWM2 (channel A) GP5 GPIO5 I2C0_SCL_PIN I2C0 (SCL) PWM2 (channel B) GP6 GPIO6 I2C1 (SDA) PWM3 (channel A) GP7 GPIO7 I2C1 (SCL) PWM3 (channel B) GP8 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) GP9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) GP10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) GP11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) GP12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) GP13 GPIO13 I2C0 (SCL) PWM6 (channel B) GP14 GPIO14 I2C1 (SDA) PWM7 (channel A) GP15 GPIO15 I2C1 (SCL) PWM7 (channel B) GP16 GPIO16 SPI0_SDI_PIN I2C0 (SDA) PWM0 (channel A) GP17 GPIO17 I2C0 (SCL) PWM0 (channel B) GP18 GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) GP19 GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) GP20 GPIO20 I2C0 (SDA) PWM2 (channel A) GP21 GPIO21 I2C0 (SCL) PWM2 (channel B) GP22 GPIO22 PWM3 (channel A) GP26 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) GP27 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) GP28 GPIO28 ADC2 PWM6 (channel A) LED GPIO25 PWM4 (channel B) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Pico Raspberry Pi Pico 2 W https://tinygo.org/docs/reference/microcontrollers/pico2-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pico2-w/ The Raspberry Pi Pico 2 - W is a tiny development board based on the Raspberry Pi RP2350 microcontroller. It also includes an onboard Infineon CYW43439 wireless chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM GP0 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) GP1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) GP2 GPIO2 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) GP3 GPIO3 I2C1_SCL_PIN I2C1 (SCL) PWM1 (channel B) GP4 GPIO4 I2C0_SDA_PIN I2C0 (SDA) PWM2 (channel A) GP5 GPIO5 I2C0_SCL_PIN I2C0 (SCL) PWM2 (channel B) GP6 GPIO6 I2C1 (SDA) PWM3 (channel A) GP7 GPIO7 I2C1 (SCL) PWM3 (channel B) GP8 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) GP9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) GP10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) GP11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) GP12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) GP13 GPIO13 I2C0 (SCL) PWM6 (channel B) GP14 GPIO14 I2C1 (SDA) PWM7 (channel A) GP15 GPIO15 I2C1 (SCL) PWM7 (channel B) GP16 GPIO16 SPI0_SDI_PIN I2C0 (SDA) PWM0 (channel A) GP17 GPIO17 I2C0 (SCL) PWM0 (channel B) GP18 GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) GP19 GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) GP20 GPIO20 I2C0 (SDA) PWM2 (channel A) GP21 GPIO21 I2C0 (SCL) PWM2 (channel B) GP22 GPIO22 PWM3 (channel A) GP26 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) GP27 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) GP28 GPIO28 ADC2 PWM6 (channel A) LED GPIO25 PWM4 (channel B) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Pico Raspberry Pi Pico W https://tinygo.org/docs/reference/microcontrollers/pico-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/pico-w/ The Raspberry Pi Pico-W is a tiny development board based on the Raspberry Pi RP2040 microcontroller that also includes an onboard Infineon CYW43439 wireless chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM GP0 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) GP1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) GP2 GPIO2 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) GP3 GPIO3 I2C1_SCL_PIN I2C1 (SCL) PWM1 (channel B) GP4 GPIO4 I2C0_SDA_PIN I2C0 (SDA) PWM2 (channel A) GP5 GPIO5 I2C0_SCL_PIN I2C0 (SCL) PWM2 (channel B) GP6 GPIO6 I2C1 (SDA) PWM3 (channel A) GP7 GPIO7 I2C1 (SCL) PWM3 (channel B) GP8 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) GP9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) GP10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) GP11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) GP12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) GP13 GPIO13 I2C0 (SCL) PWM6 (channel B) GP14 GPIO14 I2C1 (SDA) PWM7 (channel A) GP15 GPIO15 I2C1 (SCL) PWM7 (channel B) GP16 GPIO16 SPI0_SDI_PIN I2C0 (SDA) PWM0 (channel A) GP17 GPIO17 I2C0 (SCL) PWM0 (channel B) GP18 GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) GP19 GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) GP20 GPIO20 I2C0 (SDA) PWM2 (channel A) GP21 GPIO21 I2C0 (SCL) PWM2 (channel B) GP22 GPIO22 PWM3 (channel A) GP26 GPIO26 ADC0 I2C1 (SDA) PWM5 (channel A) GP27 GPIO27 ADC1 I2C1 (SCL) PWM5 (channel B) GP28 GPIO28 ADC2 PWM6 (channel A) LED GPIO25 PWM4 (channel B) ADC3 GPIO29 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Pico Reading acceleration values https://tinygo.org/tour/imu/reading/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/imu/reading/ Now that we have the accelerometer configured, we can start reading the values it reads. Most of the code is the same as before, but the reading part is new: // Read the acceleration data. w := []byte{0x28|0x80} r := make([]byte, 6) err := i2c.Tx(0x18, w, r) Here we read 6 bytes starting with register 0x28. We’ll get back to why we need to set the highest bit later (through |0x80). Seeed Sipeed MAix Bit https://tinygo.org/docs/reference/microcontrollers/maixbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/maixbit/ The Sipeed MAix Bit is a low-cost development board featuring the Kendryte K210 RISC-V (RV64GC) chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC NO NO PWM YES Not yet USBDevice ? ? Pins Pin Hardware pin Alternative names D0 P00 D1 P01 D2 P02 D3 P03 D4 P04 UART_RX_PIN D5 P05 UART_TX_PIN D6 P06 D7 P07 D8 P08 D9 P09 D10 P10 D11 P11 D12 P12 LED2, LED_GREEN D13 P13 LED, LED1, LED_RED D14 P14 LED3, LED_BLUE D15 P15 D16 P16 D17 P17 D18 P18 D19 P19 D20 P20 D21 P21 D22 P22 D23 P23 D24 P24 D25 P25 D26 P26 SPI0_SDI_PIN D27 P27 SPI0_SCK_PIN D28 P28 SPI0_SDO_PIN D29 P29 D30 P30 D31 P31 D32 P32 D33 P33 D34 P34 I2C0_SDA_PIN D35 P35 I2C0_SCL_PIN Machine Package Docs Documentation for the machine package for the Sipeed MAix Bit Seeed Studio LoRa-E5 Development Kit https://tinygo.org/docs/reference/microcontrollers/lorae5/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/lorae5/ The LoRa-E5 Development Kit is an ARM development board based on the ST Micro STM32WLE5JC SoC. It has onboard LoRa®, (G)FSK, (G)MSK, and BPSK as well as 1 user LED, 1 user buttons and 1 reset push-button Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names LED PB5 POWER_EN3V3 PA9 POWER_EN5V PB10 SPI0_NSS_PIN PA4 SPI0_SCK_PIN PA5 SPI0_SDO_PIN PA6 SPI0_SDI_PIN PA7 UART1_TX_PIN PB6 UART_TX_PIN UART1_RX_PIN PB7 UART_RX_PIN UART2_TX_PIN PA2 UART2_RX_PIN PA3 I2C2_SCL_PIN PB15 I2C0_SCL_PIN I2C2_SDA_PIN PA15 I2C0_SDA_PIN Machine Package Docs Documentation for the machine package for the LoRa E5 Seeed Studio XIAO SAMD21 aka Seeeduino XIAO https://tinygo.org/docs/reference/microcontrollers/xiao/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/xiao/ The Seeed Seeeduino XIAO, which has been renamed to Seeed Studio XIAO SAMD21 is a tiny ARM development board based on the Atmel ATSAMD21G18 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 PA02 A0 D1 PA04 A1 TCC0 (channel 0) D2 PA10 A2, I2S_SCK_PIN TCC1 (channel 0), TCC0 (channel 2) D3 PA11 A3 TCC1 (channel 1), TCC0 (channel 3) D4 PA08 A4, SDA_PIN, I2S_SDO_PIN I2C0 (SDA) TCC0 (channel 0), TCC1 (channel 2) D5 PA09 A5, SCL_PIN I2C0 (SCL) TCC0 (channel 1), TCC1 (channel 3) D6 PB08 A6, UART_TX_PIN D7 PB09 A7, UART_RX_PIN D8 PA07 A8, SPI0_SCK_PIN TCC1 (channel 1) D9 PA05 A9, SPI0_SDI_PIN TCC0 (channel 1) D10 PA06 A10, SPI0_SDO_PIN TCC1 (channel 0) LED PA17 TCC2 (channel 1), TCC0 (channel 3) LED_RXL PA18 LED2 TCC0 (channel 2) LED_TXL PA19 LED3 TCC0 (channel 3) USBCDC_DM_PIN PA24 TCC1 (channel 2) USBCDC_DP_PIN PA25 TCC1 (channel 3) Machine Package Docs Documentation for the machine package for the Seeed Seeeduino XIAO Seeed Wio Terminal https://tinygo.org/docs/reference/microcontrollers/wioterminal/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/wioterminal/ The Seeed Wio Terminal is a tiny ARM development board based on the Atmel ATSAMD51P20 family of SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM ADC0 PB08 D0, A0, BCM27, RPI_A0 ADC1 PB09 D1, A1, BCM22, RPI_A1 ADC2 PA07 D2, A2, BCM23, RPI_A2 ADC3 PB04 D3, A3, BCM24, RPI_A3 ADC4 PB05 D4, A4, BCM25, RPI_A4 ADC5 PB06 D5, A5, BCM12, RPI_A5 ADC6 PA04 D6, A6, BCM13, RPI_A6 ADC7 PB07 D7, A7, BCM16, RPI_A7 ADC8 PA06 D8, A8, BCM26, RPI_A8 LED PA15 PIN_LED_13, PIN_LED_RXL, PIN_LED_TXL, PIN_LED, PIN_LED2, PIN_LED3, LED_BUILTIN, PIN_NEOPIXEL TCC2 (channel 1), TCC1 (channel 3) BUTTON PC26 BUTTON_1, WIO_KEY_A BCM0 PA13 PIN_WIRE1_SDA, SDA1, PIN_GYROSCOPE_WIRE_SDA, WIO_LIS3DH_SDA, SDA0_PIN I2C0 (SCL) TCC0 (channel 7), TCC1 (channel 3) BCM1 PA12 PIN_WIRE1_SCL, SCL1, PIN_GYROSCOPE_WIRE_SCL, WIO_LIS3DH_SCL, SCL0_PIN I2C0 (SDA) TCC0 (channel 6), TCC1 (channel 2) BCM2 PA17 PIN_WIRE_SDA, SDA, SDA1_PIN, SDA_PIN I2C1 (SCL) TCC1 (channel 1), TCC0 (channel 5) BCM3 PA16 PIN_WIRE_SCL, SCL, SCL1_PIN, SCL_PIN I2C1 (SDA) TCC1 (channel 0), TCC0 (channel 4) BCM4 PB14 GCLK0 TCC4 (channel 0), TCC0 (channel 2) BCM5 PB12 GCLK1 TCC3 (channel 0), TCC0 (channel 0) BCM6 PB13 GCLK2 TCC3 (channel 1), TCC0 (channel 1) BCM7 PA05 PIN_DAC1 BCM8 PB01 PIN_SPI_SS, SS BCM9 PB00 PIN_SPI_SDI, SDI, SPI0_SDI_PIN BCM10 PB02 PIN_SPI_SDO, SDO, SPI0_SDO_PIN TCC2 (channel 2) BCM11 PB03 PIN_SPI_SCK, SCK, SPI0_SCK_PIN TCC2 (channel 3) BCM14 PB27 PIN_SERIAL1_RX, UART_RX_PIN TCC1 (channel 3) BCM15 PB26 PIN_SERIAL1_TX, UART_TX_PIN TCC1 (channel 2) BCM17 PA02 PIN_DAC0 BCM18 PB28 FPC1, I2S_SCK_PIN TCC1 (channel 4) BCM19 PA20 PIN_I2S_FS, I2S_LRCLK, I2S_WS_PIN TCC1 (channel 4), TCC0 (channel 0) BCM20 PA21 PIN_I2S_SDI, I2S_SDIN, I2S_SDI_PIN TCC1 (channel 5), TCC0 (channel 1) BCM21 PA22 PIN_I2S_SDO, I2S_SDOUT, I2S_SDO_PIN I2C1 (SDA) TCC1 (channel 6), TCC0 (channel 2) FPC2 PB17 TCC3 (channel 1), TCC0 (channel 5) FPC3 PB29 TCC1 (channel 5) FPC4 PA14 TCC2 (channel 0), TCC1 (channel 2) FPC5 PC01 FPC6 PC02 FPC7 PC03 FPC8 PC04 TCC0 (channel 0) FPC9 PC31 FPC10 PD00 PIN_USB_DM PA24 USBCDC_DM_PIN TCC2 (channel 2) PIN_USB_DP PA25 USBCDC_DP_PIN TCC2 (channel 3) PIN_USB_HOST_ENABLE PA27 BUTTON_2 PC27 WIO_KEY_B BUTTON_3 PC28 WIO_KEY_C SWITCH_X PD20 WIO_5S_UP TCC1 (channel 0) SWITCH_Y PD12 WIO_5S_LEFT TCC0 (channel 5) SWITCH_Z PD09 WIO_5S_RIGHT TCC0 (channel 2) SWITCH_B PD08 WIO_5S_DOWN TCC0 (channel 1) SWITCH_U PD10 WIO_5S_PRESS TCC0 (channel 3) IRQ0 PC20 TCC0 (channel 4) BUZZER_CTR PD11 WIO_BUZZER TCC0 (channel 4) MIC_INPUT PC30 WIO_MIC PIN_SERIAL2_RX PC23 UART2_RX_PIN TCC0 (channel 7) PIN_SERIAL2_TX PC22 UART2_TX_PIN TCC0 (channel 6) GYROSCOPE_INT1 PC21 WIO_LIS3DH_INT TCC0 (channel 5) PIN_SPI1_SDI PC24 SDI1, RTL8720D_SDI_PIN, SPI1_SDI_PIN PIN_SPI1_SDO PB24 SDO1, RTL8720D_SDO_PIN, SPI1_SDO_PIN PIN_SPI1_SCK PB25 SCK1, RTL8720D_SCK_PIN, SPI1_SCK_PIN PIN_SPI1_SS PC25 SS1, RTL8720D_SS_PIN PIN_SPI2_SDI PC18 SDI2, SDCARD_SDI_PIN, SPI2_SDI_PIN TCC0 (channel 2) PIN_SPI2_SDO PC16 SDO2, SDCARD_SDO_PIN, SPI2_SDO_PIN TCC0 (channel 0) PIN_SPI2_SCK PC17 SCK2, SDCARD_SCK_PIN, SPI2_SCK_PIN TCC0 (channel 1) PIN_SPI2_SS PC19 SS2, SDCARD_SS_PIN TCC0 (channel 3) PIN_SPI3_SDI PB18 SDI3, LCD_SDI_PIN, SPI3_SDI_PIN TCC1 (channel 0) PIN_SPI3_SDO PB19 SDO3, LCD_SDO_PIN, SPI3_SDO_PIN TCC1 (channel 1) PIN_SPI3_SCK PB20 SCK3, LCD_SCK_PIN, SPI3_SCK_PIN TCC1 (channel 2) PIN_SPI3_SS PB21 SS3, LCD_SS_PIN TCC1 (channel 3) SDCARD_DET_PIN PD21 TCC1 (channel 1) LCD_DC PC06 LCD_RESET PC07 LCD_BACKLIGHT PC05 TCC0 (channel 1) LCD_XL PC10 TCC0 (channel 0), TCC1 (channel 4) LCD_YU PC11 TCC0 (channel 1), TCC1 (channel 5) LCD_XR PC12 TCC0 (channel 2), TCC1 (channel 6) LCD_YD PC13 TCC0 (channel 3), TCC1 (channel 7) PIN_QSPI_IO0 PA08 QSPI_DATA0 TCC0 (channel 0), TCC1 (channel 4) PIN_QSPI_IO1 PA09 QSPI_DATA1 TCC0 (channel 1), TCC1 (channel 5) PIN_QSPI_IO2 PA10 QSPI_DATA2 TCC0 (channel 2), TCC1 (channel 6) PIN_QSPI_IO3 PA11 QSPI_DATA3 TCC0 (channel 3), TCC1 (channel 7) PIN_QSPI_SCK PB10 QSPI_SCK TCC0 (channel 4), TCC1 (channel 0) PIN_QSPI_CS PB11 QSPI_CS TCC0 (channel 5), TCC1 (channel 1) PIN_I2S_SCK PB16 I2S_BLCK TCC3 (channel 0), TCC0 (channel 4) RTL8720D_CHIP_PU PA18 TCC1 (channel 2), TCC0 (channel 6) RTL8720D_GPIO0 PA19 TCC1 (channel 3), TCC0 (channel 7) SWDCLK PA30 TCC2 (channel 0) SWDIO PA31 TCC2 (channel 1) SWO PB30 TCC4 (channel 0), TCC0 (channel 6) WIO_LIGHT PD01 WIO_IR PB31 TCC4 (channel 1), TCC0 (channel 7) OUTPUT_CTR_5V PC14 TCC0 (channel 4), TCC1 (channel 0) OUTPUT_CTR_3V3 PC15 TCC0 (channel 5), TCC1 (channel 1) Machine Package Docs Documentation for the machine package for the Seeed Wio Terminal Seeed XIAO BLE https://tinygo.org/docs/reference/microcontrollers/xiao-ble/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/xiao-ble/ The Seeed XIAO BLE is a tiny ARM development board based on the Nordic Semiconductor nrf52840 processor. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Bluetooth YES YES Pins Pin Hardware pin Alternative names D0 P0_02 A0 D1 P0_03 A1 D2 P0_28 A2 D3 P0_29 A3 D4 P0_04 A4, SDA0_PIN D5 P0_05 A5, SCL0_PIN D6 P1_11 UART_TX_PIN D7 P1_12 UART_RX_PIN D8 P1_13 SPI0_SCK_PIN D9 P1_14 SPI0_SDO_PIN D10 P1_15 SPI0_SDI_PIN LED P0_17 LED_CHG LED1 P0_26 LED_RED LED2 P0_30 LED_GREEN LED3 P0_06 LED_BLUE SDA_PIN P0_07 SDA1_PIN SCL_PIN P0_27 SCL1_PIN LSM_PWR P1_08 LSM_INT P0_11 MIC_PWR P1_10 MIC_CLK P1_00 MIC_DIN P0_16 Machine Package Docs Documentation for the machine package for the Seeed XIAO BLE Seeed XIAO RP2040 https://tinygo.org/docs/reference/microcontrollers/xiao-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/xiao-rp2040/ The Seeed XIAO RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 GPIO26 A0, ADC0 I2C1 (SDA) PWM5 (channel A) D1 GPIO27 A1, ADC1 I2C1 (SCL) PWM5 (channel B) D2 GPIO28 A2, I2C0_SDA_PIN, ADC2 PWM6 (channel A) D3 GPIO29 A3, I2C0_SCL_PIN, ADC3 PWM6 (channel B) D4 GPIO6 I2C1_SDA_PIN I2C1 (SDA) PWM3 (channel A) D5 GPIO7 I2C1_SCL_PIN I2C1 (SCL) PWM3 (channel B) D6 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) D7 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) D8 GPIO2 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) D9 GPIO4 SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) D10 GPIO3 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) NEOPIXEL GPIO12 WS2812 I2C0 (SDA) PWM6 (channel A) NEO_PWR GPIO11 NEOPIXEL_POWER I2C1 (SCL) PWM5 (channel B) LED GPIO17 LED_RED I2C0 (SCL) PWM0 (channel B) LED_GREEN GPIO16 I2C0 (SDA) PWM0 (channel A) LED_BLUE GPIO25 PWM4 (channel B) Machine Package Docs Documentation for the machine package for the Seeed XIAO RP2040 Serial Monitor https://tinygo.org/docs/tutorials/serialmonitor/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/tutorials/serialmonitor/ When you run a Go program on a desktop computer, you can use the fmt.Print(), fmt.Println(), and fmt.Printf() functions from the Go standard fmt package to print strings and numbers to the terminal program on the desktop computer. The Go language also supports the low-level print() and println() built-in functions to print to the terminal. A TinyGo program running on a microcontroller can use those same functions to print strings and numbers to its serial monitor port and have them appear on the terminal program on the host computer. SiFive HiFive1 Rev B https://tinygo.org/docs/reference/microcontrollers/hifive1b/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/hifive1b/ The HiFive1 Rev B is low-cost, Arduino-compatible development board featuring the Freedom E310 320+ MHz RISC-V chip. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC NO NO PWM YES Not yet USBDevice ? ? Pins Pin Hardware pin Alternative names I2C D0 P16 D7, UART_RX_PIN D1 P17 UART_TX_PIN D2 P18 D3 P19 LED2, LED_GREEN D4 P20 D5 P21 LED3, LED_BLUE D6 P22 LED, LED1, LED_RED D9 P01 D10 P02 D11 P03 SPI1_SDO_PIN D12 P04 SPI1_SDI_PIN D13 P05 SPI1_SCK_PIN D15 P09 D16 P10 D17 P11 D18 P12 I2C0_SDA_PIN I2C0 (SDA) D19 P13 I2C0_SCL_PIN I2C0 (SCL) Machine Package Docs Documentation for the machine package for the SiFive HiFive1b Sparkfun Thing Plus RP2040 https://tinygo.org/docs/reference/microcontrollers/thingplus-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/thingplus-rp2040/ The Sparkfun Thing Plus RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Peripherals: ws2812 Neopixel sdcard Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM GP0 GPIO0 UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) GP1 GPIO1 UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) GP2 GPIO2 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) GP3 GPIO3 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) GP4 GPIO4 SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) GP6 GPIO6 I2C0_SCL_PIN, I2C1_SDA_PIN, SDA_PIN I2C1 (SDA) PWM3 (channel A) GP7 GPIO7 I2C0_SDA_PIN, I2C1_SCL_PIN, SCL_PIN I2C1 (SCL) PWM3 (channel B) GP8 GPIO8 WS2812 I2C0 (SDA) PWM4 (channel A) GP9 GPIO9 I2C0 (SCL) PWM4 (channel B) GP10 GPIO10 I2C1 (SDA) PWM5 (channel A) GP11 GPIO11 I2C1 (SCL) PWM5 (channel B) GP12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) GP14 GPIO14 SPI1_SCK_PIN I2C1 (SDA) PWM7 (channel A) GP15 GPIO15 SPI1_SDO_PIN I2C1 (SCL) PWM7 (channel B) GP16 GPIO16 I2C0 (SDA) PWM0 (channel A) GP17 GPIO17 I2C0 (SCL) PWM0 (channel B) GP18 GPIO18 I2C1 (SDA) PWM1 (channel A) GP19 GPIO19 I2C1 (SCL) PWM1 (channel B) GP20 GPIO20 I2C0 (SDA) PWM2 (channel A) GP21 GPIO21 I2C0 (SCL) PWM2 (channel B) GP22 GPIO22 PWM3 (channel A) GP23 GPIO23 PWM3 (channel B) GP25 GPIO25 LED PWM4 (channel B) GP26 GPIO26 A0, ADC0 I2C1 (SDA) PWM5 (channel A) GP27 GPIO27 A1, ADC1 I2C1 (SCL) PWM5 (channel B) GP28 GPIO28 A2, ADC2 PWM6 (channel A) GP29 GPIO29 A3, ADC3 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Sparkfun Thing Plus RP2040 ST Micro "Nucleo" F103RB https://tinygo.org/docs/reference/microcontrollers/nucleo-f103rb/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-f103rb/ The Nucleo F103RB is a rather affordable ARM development board based on the ST Micro STM32F103RB SoC providing lots of GPIO pins and an onboard programmer/debugger with mini-USB connector. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names LED PA5 LED_BUILTIN, LED_GREEN, SPI0_SCK_PIN BUTTON PC13 BUTTON_USER UART_TX_PIN PA2 UART_RX_PIN PA3 UART_ALT_TX_PIN PD5 UART_ALT_RX_PIN PD6 SPI0_SDI_PIN PA6 SPI0_SDO_PIN PA7 I2C0_SCL_PIN PB6 I2C0_SDA_PIN PB7 Machine Package Docs Documentation for the machine package for the Nucleo F103RB ST Micro "Nucleo" F722ZE https://tinygo.org/docs/reference/microcontrollers/nucleo-f722ze/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-f722ze/ The STM32 Nucleo F722ZE is an ARM development board based on the ST Micro STM32F722ZE SoC. It has 2 user buttons, and 3 user LEDs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES Not yet I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names LED PB0 LED_BUILTIN, LED_GREEN LED_BLUE PB7 LED_RED PB14 BUTTON PC13 BUTTON_USER UART_TX_PIN PD8 UART_RX_PIN PD9 SPI0_SCK_PIN PA5 SPI0_SDI_PIN PA6 SPI0_SDO_PIN PA7 I2C0_SCL_PIN PB8 I2C0_SDA_PIN PB9 Machine Package Docs Documentation for the machine package for the STM32 Nucleo F722ZE ST Micro "Nucleo" L031K6 https://tinygo.org/docs/reference/microcontrollers/nucleo-l031k6/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-l031k6/ The STM32 Nucleo L031K6 is an ARM development board based on the ST Micro STM32L031K6 SoC. It has 2 user buttons, and 3 user LEDs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names A0 PA0 BUTTON A1 PA1 A2 PA3 A3 PA4 A4 PA5 A5 PA6 A6 PA7 A7 PA2 UART_TX_PIN D0 PA10 D1 PA9 D2 PA12 D3 PB0 D4 PB7 I2C0_SCL_PIN D5 PB6 I2C0_SDA_PIN D6 PB1 D9 PA8 D10 PA11 D11 PB5 SPI1_SDI_PIN, SPI0_SDI_PIN D12 PB4 SPI1_SDO_PIN, SPI0_SDO_PIN D13 PB3 LED, LED_BUILTIN, LED_GREEN, SPI1_SCK_PIN, SPI0_SCK_PIN UART_RX_PIN PA15 Machine Package Docs Documentation for the machine package for the STM32 Nucleo L031K6 ST Micro "Nucleo" L432KC https://tinygo.org/docs/reference/microcontrollers/nucleo-l432kc/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-l432kc/ The STM32 Nucleo L432KC is an ARM development board based on the ST Micro STM32L432KC SoC. It has 2 user buttons, and 3 user LEDs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names A0 PA0 BUTTON A1 PA1 A2 PA3 A3 PA4 A4 PA5 A5 PA6 A6 PA7 A7 PA2 UART_TX_PIN D0 PA10 D1 PA9 D2 PA12 D3 PB0 D4 PB7 I2C0_SDA_PIN D5 PB6 I2C0_SCL_PIN D6 PB1 D7 PC14 D8 PC15 D9 PA8 D10 PA11 D11 PB5 SPI1_SDI_PIN, SPI0_SDI_PIN D12 PB4 SPI1_SDO_PIN, SPI0_SDO_PIN D13 PB3 LED, LED_BUILTIN, LED_GREEN, SPI1_SCK_PIN, SPI0_SCK_PIN UART_RX_PIN PA15 Machine Package Docs Documentation for the machine package for the STM32 Nucleo L432KC ST Micro "Nucleo" L552ZE https://tinygo.org/docs/reference/microcontrollers/nucleo-l552ze/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-l552ze/ The STM32 Nucleo L552ZE is an ARM development board based on the ST Micro STM32L552ZE SoC. It has onboard ethernet, 2 user buttons, and 3 user LEDs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES Not yet I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names LED_GREEN PC7 LED_BUILTIN, LED LED_BLUE PB7 LED_RED PA9 BUTTON PC13 BUTTON_USER UART_TX_PIN PG7 UART_RX_PIN PG8 I2C0_SCL_PIN PB8 I2C0_SDA_PIN PB9 Machine Package Docs Documentation for the machine package for the STM32 Nucleo l552ze ST Micro STM32F103XX "Bluepill" https://tinygo.org/docs/reference/microcontrollers/bluepill/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/bluepill/ The Bluepill is a popular, ultra-cheap and compact ARM development board based on the ST Micro STM32F103C8 SoC. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names C13 PC13 LED C14 PC14 C15 PC15 A0 PA0 ADC0, BUTTON A1 PA1 ADC1 A2 PA2 ADC2 A3 PA3 ADC3 A4 PA4 ADC4 A5 PA5 ADC5, SPI0_SCK_PIN A6 PA6 ADC6, SPI0_SDI_PIN A7 PA7 ADC7, SPI0_SDO_PIN B0 PB0 ADC8 B1 PB1 ADC9 B10 PB10 B11 PB11 B12 PB12 B13 PB13 B14 PB14 B15 PB15 A8 PA8 A9 PA9 UART_TX_PIN A10 PA10 UART_RX_PIN A11 PA11 A12 PA12 A13 PA13 A14 PA14 A15 PA15 B3 PB3 B4 PB4 B5 PB5 B6 PB6 UART_ALT_TX_PIN, I2C0_SCL_PIN B7 PB7 UART_ALT_RX_PIN, I2C0_SDA_PIN B8 PB8 B9 PB9 Machine Package Docs Documentation for the machine package for the Bluepill ST Micro STM32F407 "Discovery" https://tinygo.org/docs/reference/microcontrollers/stm32f4disco/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/stm32f4disco/ The STM32F4 Discovery is an ARM development board based on the ST Micro STM32F407 SoC. It has an onboard LIS302DL or LIS3DSH accelerometer, MP45DT02 MEMS digital microphone, an CS43L22 audio DAC, 2 user buttons, and 4 user LEDs. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice YES Not yet Pins Pin Hardware pin Alternative names LED1 PD12 LED_GREEN, LED, LED_BUILTIN LED2 PD13 LED_ORANGE LED3 PD14 LED_RED LED4 PD15 LED_BLUE BUTTON PA0 ADC0 ADC1 PA1 ADC2 PA2 UART_TX_PIN ADC3 PA3 UART_RX_PIN ADC4 PA4 ADC5 PA5 SPI1_SCK_PIN, SPI0_SCK_PIN ADC6 PA6 SPI1_SDI_PIN, SPI0_SDI_PIN ADC7 PA7 SPI1_SDO_PIN, SPI0_SDO_PIN ADC8 PB0 ADC9 PB1 ADC10 PC0 ADC11 PC1 ADC12 PC2 ADC13 PC3 ADC14 PC4 ADC15 PC5 MEMS_ACCEL_CS PE3 MEMS_ACCEL_INT1 PE0 MEMS_ACCEL_INT2 PE1 I2C0_SCL_PIN PB6 I2C0_SDA_PIN PB9 Machine Package Docs Documentation for the machine package for the STM32F4 Discovery STM32 Nucleo WL55JC https://tinygo.org/docs/reference/microcontrollers/nucleo-wl55jc/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/nucleo-wl55jc/ The STM32 Nucleo WL55JC is an ARM development board based on the ST Micro STM32WL55JCI SoC. It has onboard LoRa®, (G)FSK, (G)MSK, and BPSK as well as 3 user LEDs, 3 user buttons and 1 reset push-button Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES Not yet USBDevice NO NO Pins Pin Hardware pin Alternative names LED_BLUE PB15 LED_GREEN PB9 LED_RED PB11 LED BTN1 PA0 BUTTON BTN2 PA1 BTN3 PC6 SPI0_NSS_PIN PA4 SPI0_SCK_PIN PA5 SPI0_SDO_PIN PA6 SPI0_SDI_PIN PA7 UART1_TX_PIN PB6 UART1_RX_PIN PB7 UART2_RX_PIN PA3 UART_RX_PIN UART2_TX_PIN PA2 UART_TX_PIN I2C1_SCL_PIN PA9 I2C0_SCL_PIN I2C1_SDA_PIN PA10 I2C0_SDA_PIN I2C2_SCL_PIN PA12 I2C2_SDA_PIN PA11 Machine Package Docs Documentation for the machine package for the STM32 Nucleo WL55JC The volatile keyword https://tinygo.org/docs/concepts/compiler-internals/volatile/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/volatile/ Go does not have the volatile keyword like C/C++. Volatile is used to read and write memory mapped registers that can change or have side effects that the compiler does not know about. To implement volatile operations, the runtime/volatile package has been added with functions that are treated specially by the compiler. For example, you can use volatile.LoadUint32 to load an *uint32, a type that is often used in memory mapped peripherals on 32-bit microcontrollers. Using WASI https://tinygo.org/docs/guides/webassembly/wasi/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/webassembly/wasi/ TinyGo is very useful for compiling programs for use on servers and other edge devices (WASI). TinyGo programs can run in Extism, Fastly Compute@Edge, Fermyon Spin, tau, wazero and many other WebAssembly runtimes. Both WASI Preview 1 (wasip1) and WASI Preview 2 (wasip2) are currently supported. Here is a small TinyGo program for use within a WASI host application: package main //go:wasmimport yourmodulename add func add(x, y uint32) uint32 { return x + y } // main is required for the `wasip1` target, even if it isn't used. Using WASM https://tinygo.org/docs/guides/webassembly/wasm/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/webassembly/wasm/ You can call a JavaScript function from Go and call a Go function from WebAssembly: package main // This calls a JS function from Go. func main() { println("adding two numbers:", add(2, 3)) // expecting 5 } // This function is imported from JavaScript, as it doesn't define a body. // You should define a function named 'add' in the WebAssembly 'env' // module from JavaScript. // //export add func add(x, y int) int // This function is exported to JavaScript, so can be called using // exports. Vicharak Shrike-Lite https://tinygo.org/docs/reference/microcontrollers/vicharak_shrike-lite/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/vicharak_shrike-lite/ The Vicharak Shrike-Lite is a tiny development board based on the Raspberry Pi RP2040 microcontroller paired with a Renesas ForgeFPGA SLG47910V FPGA. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM IO0 GPIO0 F6 I2C0 (SDA) PWM0 (channel A) IO1 GPIO1 F4 I2C0 (SCL) PWM0 (channel B) IO2 GPIO2 F3 I2C1 (SDA) PWM1 (channel A) IO3 GPIO3 F5 I2C1 (SCL) PWM1 (channel B) IO4 GPIO4 LED I2C0 (SDA) PWM2 (channel A) IO5 GPIO5 I2C0 (SCL) PWM2 (channel B) IO6 GPIO6 I2C1_SDA_PIN I2C1 (SDA) PWM3 (channel A) IO7 GPIO7 I2C1_SCL_PIN I2C1 (SCL) PWM3 (channel B) IO8 GPIO8 SPI1_SDI_PIN I2C0 (SDA) PWM4 (channel A) IO9 GPIO9 I2C0 (SCL) PWM4 (channel B) IO10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) IO11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) IO12 GPIO12 FPGA_PWR I2C0 (SDA) PWM6 (channel A) IO13 GPIO13 FPGA_EN I2C0 (SCL) PWM6 (channel B) IO14 GPIO14 F18 I2C1 (SDA) PWM7 (channel A) IO15 GPIO15 F17 I2C1 (SCL) PWM7 (channel B) IO16 GPIO16 I2C0 (SDA) PWM0 (channel A) IO17 GPIO17 I2C0 (SCL) PWM0 (channel B) IO18 GPIO18 SPI0_SCK_PIN I2C1 (SDA) PWM1 (channel A) IO19 GPIO19 SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) IO20 GPIO20 SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) IO21 GPIO21 I2C0 (SCL) PWM2 (channel B) IO22 GPIO22 PWM3 (channel A) IO23 GPIO23 PWM3 (channel B) IO24 GPIO24 I2C0_SDA_PIN, UART1_TX_PIN PWM4 (channel A) IO25 GPIO25 I2C0_SCL_PIN, UART1_RX_PIN PWM4 (channel B) IO26 GPIO26 A0, ADC0 I2C1 (SDA) PWM5 (channel A) IO27 GPIO27 A1, ADC1 I2C1 (SCL) PWM5 (channel B) IO28 GPIO28 A2, UART0_TX_PIN, UART_TX_PIN, ADC2 PWM6 (channel A) IO29 GPIO29 A3, UART0_RX_PIN, UART_RX_PIN, ADC3 PWM6 (channel B) Machine Package Docs Documentation for the machine package for Shrike-Lite Waveshare RP2040-Zero https://tinygo.org/docs/reference/microcontrollers/waveshare-rp2040-zero/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/waveshare-rp2040-zero/ The Waveshare RP2040-Zero is a tiny development board based on the Raspberry Pi RP2040 microcontroller. Interfaces Interface Hardware Supported TinyGo Support GPIO YES YES UART YES YES SPI YES YES I2C YES YES ADC YES YES PWM YES YES USBDevice YES YES Pins Pin Hardware pin Alternative names I2C PWM D0 GPIO0 I2C0_SDA_PIN, UART0_TX_PIN, UART_TX_PIN I2C0 (SDA) PWM0 (channel A) D1 GPIO1 I2C0_SCL_PIN, UART0_RX_PIN, UART_RX_PIN I2C0 (SCL) PWM0 (channel B) D2 GPIO2 I2C1_SDA_PIN I2C1 (SDA) PWM1 (channel A) D3 GPIO3 I2C1_SCL_PIN, SPI0_SDO_PIN I2C1 (SCL) PWM1 (channel B) D4 GPIO4 SPI0_SDI_PIN I2C0 (SDA) PWM2 (channel A) D5 GPIO5 I2C0 (SCL) PWM2 (channel B) D6 GPIO6 SPI0_SCK_PIN I2C1 (SDA) PWM3 (channel A) D7 GPIO7 I2C1 (SCL) PWM3 (channel B) D8 GPIO8 UART1_TX_PIN I2C0 (SDA) PWM4 (channel A) D9 GPIO9 UART1_RX_PIN I2C0 (SCL) PWM4 (channel B) D10 GPIO10 SPI1_SCK_PIN I2C1 (SDA) PWM5 (channel A) D11 GPIO11 SPI1_SDO_PIN I2C1 (SCL) PWM5 (channel B) D12 GPIO12 SPI1_SDI_PIN I2C0 (SDA) PWM6 (channel A) D13 GPIO13 I2C0 (SCL) PWM6 (channel B) D14 GPIO14 I2C1 (SDA) PWM7 (channel A) D15 GPIO15 I2C1 (SCL) PWM7 (channel B) D16 GPIO16 NEOPIXEL, WS2812 I2C0 (SDA) PWM0 (channel A) D17 GPIO17 I2C0 (SCL) PWM0 (channel B) D18 GPIO18 I2C1 (SDA) PWM1 (channel A) D19 GPIO19 I2C1 (SCL) PWM1 (channel B) D20 GPIO20 I2C0 (SDA) PWM2 (channel A) D21 GPIO21 I2C0 (SCL) PWM2 (channel B) D22 GPIO22 PWM3 (channel A) D23 GPIO23 PWM3 (channel B) D24 GPIO24 PWM4 (channel A) D25 GPIO25 PWM4 (channel B) D26 GPIO26 A0, ADC0 I2C1 (SDA) PWM5 (channel A) D27 GPIO27 A1, ADC1 I2C1 (SCL) PWM5 (channel B) D28 GPIO28 A2, ADC2 PWM6 (channel A) D29 GPIO29 A3, ADC3 PWM6 (channel B) Machine Package Docs Documentation for the machine package for the Waveshare RP2040-Zero Why a new compiler? https://tinygo.org/docs/concepts/faq/why-a-new-compiler/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/faq/why-a-new-compiler/ Why not modify the existing compiler to produce binaries for microcontrollers? There are several reasons for this: The standard Go compiler (gc) does not support instruction sets as used on microcontrollers: The Thumb instruction set is unsupported, but it should be possible to add support for it as it already has an ARM backend. The AVR instruction set (as used in the Arduino Uno) is unsupported and unlikely to be ever supported. X9 Pro Smartwatch https://tinygo.org/docs/reference/microcontrollers/x9pro/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/x9pro/ Info here Interfaces Interface Hardware Supported TinyGo Support GPIO ? ? UART ? ? SPI ? ? I2C ? ? ADC ? ? PWM ? ? USBDevice ? ? Pins Pin Hardware pin Alternative names LED P0_04 SPI0_SCK_PIN P0_18 SPI0_SDI_PIN P0_19 SPI0_SDO_PIN P0_20 OLED_CS P0_15 OLED_RES P0_14 OLED_DC P0_13 OLED_SCK P0_12 OLED_SDO P0_11 OLED_LED_POW P0_16 OLED_IC_POW P0_17 Machine Package Docs Documentation for the machine package for the X9 Pro Flashing How to do it… Additional requirements https://tinygo.org/docs/guides/build/additional-requirements/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/build/additional-requirements/ We’re not done yet. Some extra things need to be built before you can start using TinyGo. If you haven’t already, you need to download llvm-project (for the compiler-rt sources that are needed for most architectures). Run the following commands inside your cloned TinyGo repository: make llvm-source To be able to use TinyGo on a bare-metal target, you need to generate some files first: make gen-device To be able to use TinyGo to build WebAssembly binaries, you will need to compile wasi-libc and Binaryen: Additional Resources https://tinygo.org/docs/guides/webassembly/resources/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/webassembly/resources/ Here are a few resources for helping learn more about using TinyGo with WebAssembly. Wasm By Example https://wasmbyexample.dev/ Are We Wasm Yet ? - Part 1 https://elewis.dev/are-we-wasm-yet-part-1 Are We Wasm Yet ? - Part 2 https://elewis.dev/are-we-wasm-yet-part-2 Writing a WebAssembly Service in TinyGo for Wagi and Spin https://www.fermyon.com/blog/tinygo-webassembly-favicon-server wazero - TinyGo https://wazero.io/languages/tinygo/ WasmEdge Runtime - Go https://wasmedge.org/book/en/write_wasm/go.html WASI and Node.js https://k33g.hashnode.dev/series/wasi-nodejs Wazero, first steps https://k33g.hashnode.dev/series/wazero-first-steps Inline assembly https://tinygo.org/docs/concepts/compiler-internals/inline-assembly/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/inline-assembly/ Warning: inline assembly is an unstable feature and may change or be removed entirely in the future! If you want to use inline assembly, it’s better to use CGo instead (and use inline assembly in C directly). The device-specific packages like device/avr and device/arm provide Asm functions which you can use to write inline assembly: arm.Asm("wfi") You can also pass parameters to the inline assembly: result := arm.AsmFull(` add {}, {value}, #3 `, map[string]interface{}{ "value": 42, }) println("result:", int(result)) At the moment, only integer types are supported as operands. Linux support https://tinygo.org/docs/guides/linux/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/linux/ TinyGo also lets you compile programs for Linux systems, both 32-bit and 64-bit, on both x86 and ARM architectures. For cross compiling, you can use GOOS and GOARCH as usual. For example, you can cross compile the examples/serial example from a Linux host to a Raspberry Pi with the following command: GOARCH=arm tinygo build -o serial examples/serial This currently requires having the right cross compiler installed. On Debian you can do that with the following command: macOS support https://tinygo.org/docs/guides/macos/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/macos/ Using TinyGo you can compile programs for macOS systems. For cross compiling, you can use GOOS. For example, you can cross compile the examples/serial example from a Linux host targeting macOS with the following command: GOOS=darwin tinygo build -o serial examples/serial Misc. Build Options https://tinygo.org/docs/reference/usage/misc-options/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/usage/misc-options/ -no-debug Disable outputting debug symbols. This can be useful for WebAssembly, as there is no debugger for .wasm files yet and .wasm files are generally served directly. Avoiding debug symbols can have a big impact on generated binary size, reducing them by more than half. This is not necessary on microcontrollers because debugging symbols are not flashed to the microcontroller. Additionally, you will need it when you use tinygo gdb. Resources https://tinygo.org/docs/guides/embedded/resources/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/embedded/resources/ Here are some of the “official” packages and resources in the TinyGo ecosystem that you can use for creating embedded programs. I want to use sensors connected to my device I want to use a display connected to my device I want to make a wireless connection with my device I want to store data on my device There are also other great resources in the community. You can find some of them in the “Awesome TinyGo” repository: Tips, Tricks and Gotchas https://tinygo.org/docs/guides/tips-n-tricks/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/tips-n-tricks/ Ensure Concurrency In many cases (especially on microcontrollers), TinyGo is running on a single core with only cooperative scheduling. This means that a goroutine that never does IO or other blocking calls (f.ex. time.Sleep()) will lock the single available thread only for itself and never allow other goroutines to execute. In such cases, you can use runtime.Gosched() as a workaround. package main import ( "fmt" "time" "sync/atomic" "runtime" ) func main() { var ops uint64 = 0 for i := 0; i < 50; i++ { go func() { for { atomic. Why Go instead of Rust? https://tinygo.org/docs/concepts/faq/why-go-instead-of-rust/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/faq/why-go-instead-of-rust/ Rust is another “new” and safer language that is now made ready for embedded processors. There is a fairly active community around it. However, apart from personal language preference, Go has a few advantages: Subjective, but in general Go is easier to learn. Rust is in general far more complicated than Go, with difficult-to-grasp ownership rules, traits, generics, etc. Go prides itself on being a simple and slightly dumb language, sacrificing some expressiveness for readability. Windows support https://tinygo.org/docs/guides/windows/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/windows/ TinyGo also lets you compile programs for Windows systems. For cross compiling, you can use GOOS and GOARCH as usual. For example, you can cross compile the examples/serial example from a Linux host targeting Windows with the following command: GOOS=windows tinygo build -o serial.exe examples/serial Heap allocation https://tinygo.org/docs/concepts/compiler-internals/heap-allocation/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/heap-allocation/ Many operations in Go rely on heap allocation. TinyGo will try to optimize them away using escape analysis, but that is not always possible in practice. If you want to know for sure which operations allocate on the heap, you can pass the compiler flag -print-allocs=. to show all heap allocations. You can also do this for a subset of functions or packages, for details see build flags. These operations currently do heap allocations: machine package https://tinygo.org/docs/reference/machine/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/machine/ GPIO type Pin uint8 const NoPin = Pin(0xff) The pin type indicates a physical pin on a microcontroller. It can be used directly for GPIO or as part of a different peripheral (SPI, ADC, etc). The NoPin value can be used in some places where you want to explicitly not use a pin. For example, depending on the chip you could use only SDO or SDI of an SPI peripheral, leaving the other pin unused. What about the ESP8266/ESP32? https://tinygo.org/docs/concepts/faq/what-about-esp8266-esp32/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/faq/what-about-esp8266-esp32/ As of September 2020, we now have support for the ESP32 and ESP8266 in TinyGo! Please see https://tinygo.org/docs/reference/microcontrollers/esp32-mini32 and https://tinygo.org/docs/reference/microcontrollers/nodemcu for more information. Datatypes https://tinygo.org/docs/concepts/compiler-internals/datatypes/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/datatypes/ TinyGo uses a different representation for some data types than standard Go. string A string is encoded as a {ptr, len} tuple. The type is actually defined in the runtime as runtime._string, in src/runtime/string.go. That file also contains some compiler intrinsics for dealing with strings and UTF-8. slice A slice is encoded as a {ptr, len, cap} tuple. There is no runtime definition of it as slices are a generic type and the pointer type is different for each slice. Calling convention https://tinygo.org/docs/concepts/compiler-internals/calling-convention/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/calling-convention/ Go uses a stack-based calling convention and passes a pointer to the argument list as the first argument in the function. There were/are plans to switch to a register-based calling convention but they’re now on hold. TinyGo, however, uses a register based calling convention. In fact it is somewhat compatible with the C calling convention but with a few quirks: Struct parameters are split into separate arguments, if the number of fields (after flattening recursively) is 3 or lower. Differences from Go https://tinygo.org/docs/concepts/compiler-internals/differences-from-go/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/differences-from-go/ A whole program is compiled in a single step, without intermediate linking. This makes incremental development much slower for large programs but enables far more optimization opportunities. We are actively working on build caching so that at least part of the work does not need to be redone on every compilation. Interfaces are always represented as a {typecode, value} pair. Unlike Go https://research.swtch.com/interfaces, TinyGo will not precompute a list of function pointers for fast interface method calls. Vim and Neovim https://tinygo.org/docs/guides/ide-integration/vim-neovim/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/ide-integration/vim-neovim/ In Vim and Neovim LSP servers can be configured to offer completions and documentation based on the contents of the file you are editing. These LSP servers (i.e. gopls in our case) are spawned by Vim and Neovim themselves. This means we must provide them with the appropriate environment so that they know where to find the definition of the machine package. This can be done manually before starting Vim or Neovim by running export on the shell. VS Code https://tinygo.org/docs/guides/ide-integration/vscode/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/ide-integration/vscode/ In VS Code, you can edit the file .vscode/settings.json in the root of your project. If the .vscode directory does not yet exist, create it. It’s a normal JSON file where you need to set the go.toolsEnvVars property. An example file (again, using the above configuration) is the following: { "go.toolsEnvVars": { "GOROOT": "/home/user/.cache/tinygo/goroot-go1.14-f930d5b5f36579e8cbd1c139012b3d702281417fb6bdf67303c4697195b9ef1f-syscall", "GOFLAGS": "-tags=cortexm,baremetal,linux,arm,nrf51822,nrf51,nrf,microbit,tinygo,gc.conservative,scheduler.tasks" } } After creating or modifying this file, you will likely need to restart VS Code to apply these settings. Go compatibility matrix https://tinygo.org/docs/reference/go-compat-matrix/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/go-compat-matrix/ TinyGo Go 1.20 Go 1.19 Go 1.18 Go 1.17 Go 1.16 Go 1.15 Go 1.14 Go 1.13 Go 1.12 Go 1.11 0.27.0 - 0.30.0 ✔ ✔ ✔ 0.26.0 ✔ ✔ 0.24.0 - 0.25.0 ✔ ✔ ✔ ✔ 0.23.0 ✔ ✔ ✔ ✔ 0.20.0 - 0.22.0 ✔ ✔ ✔ 0.18.0 - 0.19.0 ✔ ✔ ✔ ✔ 0.17.0 ✔ ✔ ✔ ✔ ✔ ✔ 0.14.1 - 0.16.0 ✔ ✔ ✔ ✔ ✔ 0. Debugging https://tinygo.org/docs/guides/debugging/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/debugging/ A debugger can show you things that regular print statements cannot show you, especially on microcontrollers. The debugger used by TinyGo is called GDB. Debugging using GDB can sometimes be intimidating, but it is also extremely powerful. For example: A debugger works even when a serial port is not available. This can happen when there is a bug in an interrupt or in initialization code before the serial port is configured. Driver Design and Development https://tinygo.org/docs/guides/driver-design/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/driver-design/ Driver Design with TinyGo This document compiles several guidelines that may be useful to developers of drivers that are used in TinyGo and upstream Go. That said, most suggestions are pretty general and are independent of the language used- good driver design in Go, Rust or C turns out to have more in common than what one may think. General guidelines Avoid: Floating point operations. Peripherals rarely work with or return floating point representations of their measurements. GDB https://tinygo.org/docs/tutorials/gdb/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/tutorials/gdb/ The debugger used by TinyGo is called GDB. This tutorial assumes you already have GDB installed and know how to enter the GDB shell, but don’t know how to use it yet to actually debug something. For information on how to install and access GDB, see the debugging guide. For this tutorial we will assume the following: You have a BBC micro:bit. You have installed the required software: openocd and GDB (either gdb-multiarch or arm-none-eabi-gdb). Harvard architectures (AVR) https://tinygo.org/docs/concepts/compiler-internals/harvard-arch/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/harvard-arch/ The AVR architecture is a modified Harvard architecture, which means that flash and RAM live in different address spaces. In practice, this means that any given pointer may either point to RAM or flash, but this is not visible from the pointer itself. To get TinyGo to work on the Arduino, which uses the AVR architecture, all global variables (which include string constants!) are marked non-constant and thus are stored in RAM and all pointer dereferences assume that pointers point to RAM. IntelliJ IDEA https://tinygo.org/docs/guides/ide-integration/intellij/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/ide-integration/intellij/ You can install TinyGo plugin for IntelliJ IDEA Ultimate or GoLand with the version 2021.1.2 or higher. It provides an easy way of creating a new project, runs TinyGo applications and code inspections. All features are described on the blog post. Other IDEs https://tinygo.org/docs/guides/ide-integration/other/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/ide-integration/other/ Other IDEs will likely need a different setup. You can try starting them with these environment variables set in your shell or configuring these environment variables somewhere in your Go language server settings. Servo: intro https://tinygo.org/tour/pwm/servo/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/servo/ Servos are rotary motors that allow for precise control of their angular position. The position is set using a form of pulse-width modification (PWM). Every 20ms or so (the precise interval doesn’t matter too much) a pulse of 1ms to 2ms is sent that indicates the target position for the motor. The pulse width is what matters here: 1.5ms indicates the center position, 1ms all the way to the right, and 2ms all the way to the left. Optimizing binaries https://tinygo.org/docs/guides/optimizing-binaries/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/optimizing-binaries/ There are various ways TinyGo programs can be optimized for speed, size, or debuggability. Optimizing for code size By default, binaries are already optimized for code size (-opt=z, equivalent to -Oz, is the default). However, there are various things you can do to improve code size. Do not import large packages You may be tempted to import packages like fmt for simple formatted printing. But fmt is very large, so unless you absolutely need it, it is recommended to try to avoid it. Pipeline https://tinygo.org/docs/concepts/compiler-internals/pipeline/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/compiler-internals/pipeline/ Like most compilers, TinyGo is a compiler built as a pipeline of transformations that each translate an input to a simpler output version (also called lowering). However, most of these part are not in TinyGo itself. The frontend is mostly implemented by external Go libraries, and most optimizations and code generation is implemented by LLVM. This is roughly the pipeline for TinyGo: Lexing, parsing, and typechecking is done by packages in the standard library and in the golang. Servo: using a driver https://tinygo.org/tour/pwm/servo-driver/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/servo-driver/ In many cases, it would be nice to avoid having to care about all these specific calculations. Luckily we have the servo driver as part of the TinyGo drivers module. It still requires looking up the right PWM and pin combinations, but it does simplify controlling the servos a bit. To use the driver, we need to configure it first: // Configure the servo array. array, err := servo.NewArray(pwm) if err ! Tinygo flash errors https://tinygo.org/docs/guides/tinygo-flash-errors/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/tinygo-flash-errors/ Flashing to a port may be a source of pain with a unconfigured computer. Here are some common problems when trying to get your first program on a device. Unable to locate any volume (Linux) Serial port permission problems (Linux) Unable to locate any volume (Linux) This error happens with devices such as the Pi Pico (and the Pico-W) which use the UF2 protocol for flashing programs. With this protocol, the device emulates a USB block storage device that can be mounted. Servo: multiple servos https://tinygo.org/tour/pwm/servo-multiple/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/tour/pwm/servo-multiple/ Since many PWM peripherals have multiple channels (usually 2 or 4) we can in fact control multiple servos using a single PWM peripheral (freeing up other PWM peripherals for other tasks). This is why it’s called servo.NewArray! The code is very similar to using a single servo, but this time we control more than one from different goroutines. If you need more servos, you can of course use more than one servo array with different PWM peripherals. Drivers https://tinygo.org/docs/concepts/drivers/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/drivers/ Drivers are packages to make it easier for TinyGo programs to use sensors, displays, and other external hardware that can be physically connected to a microcontroller. Here is an example of a TinyGo program that uses a BMP180 digital temperature sensor by way of the I2C interface: package main import ( "time" "machine" "tinygo.org/x/drivers/bmp180" ) func main() { machine.I2C0.Configure(machine.I2CConfig{}) sensor := bmp180.New(machine.I2C0) sensor.Configure() connected := sensor.Connected() if !connected { println("BMP180 not detected") return } println("BMP180 detected") for { temp, _ := sensor. Linux https://tinygo.org/getting-started/install/linux/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/getting-started/install/linux/ This page has information on how to install and use TinyGo on Ubuntu, as well as other Linux distributions. If you want to use TinyGo to compile your own or sample code, you can install the release version directly on your machine by following the “Quick Install” instructions below. If you wish to build TinyGo from source, for example if you intend to contribute to the project, please take a look here. Low Power https://tinygo.org/docs/concepts/low-power/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/low-power/ Microcontrollers are usually rather non-demanding when it comes to power consumption. Couple hundreds mW is the most you may expect a hobby project would use. Sometimes, even that is not low enough. Power your project from a battery, and it’d benefit greatly from consuming less. Common scenario for such projects is sleeping most of the time, and only rarely briefly wake up to query sensors and execute actions. The main caveat here is if not configured properly, microcontroller and peripherals continue to consume power while your program “sleeps”. Package Organization https://tinygo.org/docs/concepts/package-organization/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/concepts/package-organization/ graph TD Y[package main] --> M{{package machine}} Y --> G(standard Go packages) G --> R(package runtime) Y --> R R --> M M --> D{{package device}} D --> H[Hardware] The main package is the main entry point to your program, just like any other Go program. Typically you will import other packages and then call them from your package. The subpackages for your application are compiled in the same way as any other Go package by the TinyGo compiler. Video https://tinygo.org/media/video/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/media/video/ TinyGo Code Review by Patricio Whittingslow - ongoing (playlist) https://www.youtube.com/playlist?list=PLx6oFeWGZv8nV1blgYXrC9VI0Dgs-CcJ_ TinyGo Conference 2025 in JAPAN - October 12, 2025 (playlist) https://www.youtube.com/playlist?list=PLAKUkp2tL1dAqyvrwx_2z2lUKGvLNl-GO Volcamp - Mes trains Jouef passent au numérique, avec des Raspberry et TinyGo! - October 2, 2025 https://www.youtube.com/watch?v=u5fTwN7ExZg GopherCon EU 2025 - Implementing Parallelism - Ayke van Laethem - June 17, 2025 https://www.youtube.com/watch?v=t7SOnE6SfwU (TinyGo and Arduino) A Soil Moisture Monitor for my Snake Plant - April 23, 2025 https://www.youtube.com/watch?v=zCdLJc0XgaU Articles https://tinygo.org/media/articles/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/media/articles/ Hriday Keni - “TinyGo for Embedded Applications: Coding Without the Code-Phobia” - February 1, 2025 https://medium.com/@hrkeni/tinygo-for-embedded-applications-coding-without-the-code-phobia-28ed90b5bcb0 Eric Gregory - “Compile Go directly to WebAssembly components with TinyGo and WASI P2” - July 2, 2024 https://wasmcloud.com/blog/compile-go-directly-to-webassembly-components-with-tinygo-and-wasi-p2/ Matt Butcher - “4 Big Developments in WebAssembly” - April 18, 2024 https://thenewstack.io/4-big-developments-in-webassembly/ Tobenna Kelvin Abanofor - Hardware Simulation with Wokwi x TinyGo - September 8, 2023 https://medium.com/@micatovin/hardware-simulation-with-wokwi-x-tinygo-d85d1a3986 Pragmatik.tech - Multiple articles on TinyGo and Raspberry Pi Pico - July 2022 onwards https://pragmatik. macOS https://tinygo.org/getting-started/install/macos/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/getting-started/install/macos/ This page has information on how to install and use TinyGo on macOS. If you wish to build TinyGo from source, for example if you intend to contribute to the project, please take a look here. You must have Go v1.20+ already installed on your machine in order to install TinyGo. You can use Homebrew to install TinyGo using the following commands: brew tap tinygo-org/tools brew install tinygo Alternative installation Mac M1/M2 Download this file. Docker https://tinygo.org/getting-started/install/using-docker/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/getting-started/install/using-docker/ You can use our Docker image to be able to run the TinyGo compiler on your computer without having to install all the dependencies. Read on to learn how. Installing docker pull tinygo/tinygo:0.40.1 Using The paths used here are automatically resolved by tinygo relative to the installation directory. For your own code, you will probably want to use absolute paths. A docker container exists for easy access to the TinyGo CLI. Windows https://tinygo.org/getting-started/install/windows/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/getting-started/install/windows/ This page has information on how to install and use TinyGo on Windows 10. If you wish to build TinyGo from source, for example if you intend to contribute to the project, please take a look here. TinyGo requires Go v1.20+ to be already installed on your machine. Quick Install via Scoop You can use Scoop to install TinyGo and dependencies. If you haven’t installed Go already, you can do so with the following command: https://tinygo.org/simulator/simulator/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/simulator/simulator/ Terminal Properties Power Add Loading... Note: these numbers are estimates, based on datasheets and measurements. They don't include everything and may be wrong. Loading... Add arduino https://tinygo.org/docs/reference/microcontrollers/machine/arduino/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino/ Constants const ( D0 = PD0 // RX D1 = PD1 // TX D2 = PD2 D3 = PD3 D4 = PD4 D5 = PD5 D6 = PD6 D7 = PD7 D8 = PB0 D9 = PB1 D10 = PB2 D11 = PB3 D12 = PB4 D13 = PB5 ) Digital pins, marked as plain numbers on the board. const LED Pin = D13 LED on the Arduino const ( ADC0 Pin = PC0 ADC1 Pin = PC1 ADC2 Pin = PC2 ADC3 Pin = PC3 ADC4 Pin = PC4 // Used by TWI for SDA ADC5 Pin = PC5 // Used by TWI for SCL ) ADC on the Arduino arduino-mega1280 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mega1280/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mega1280/ Constants const ( A0 Pin = PF0 A1 Pin = PF1 A2 Pin = PF2 A3 Pin = PF3 A4 Pin = PF4 A5 Pin = PF5 A6 Pin = PF6 A7 Pin = PF7 A8 Pin = PK0 A9 Pin = PK1 A10 Pin = PK2 A11 Pin = PK3 A12 Pin = PK4 A13 Pin = PK5 A14 Pin = PK6 A15 Pin = PK7 // Analog Input ADC0 Pin = PF0 ADC1 Pin = PF1 ADC2 Pin = PF2 ADC3 Pin = PF3 ADC4 Pin = PF4 ADC5 Pin = PF5 ADC6 Pin = PF6 ADC7 Pin = PF7 ADC8 Pin = PK0 ADC9 Pin = PK1 ADC10 Pin = PK2 ADC11 Pin = PK3 ADC12 Pin = PK4 ADC13 Pin = PK5 ADC14 Pin = PK6 ADC15 Pin = PK7 // Digital pins D0 Pin = PE0 D1 Pin = PE1 D2 Pin = PE4 D3 Pin = PE5 D4 Pin = PG5 D5 Pin = PE3 D6 Pin = PH3 D7 Pin = PH4 D8 Pin = PH5 D9 Pin = PH6 D10 Pin = PB4 D11 Pin = PB5 D12 Pin = PB6 D13 Pin = PB7 D14 Pin = PJ1 D15 Pin = PJ0 D16 Pin = PH1 D17 Pin = PH0 D18 Pin = PD3 D19 Pin = PD2 D20 Pin = PD1 D21 Pin = PD0 D22 Pin = PA0 D23 Pin = PA1 D24 Pin = PA2 D25 Pin = PA3 D26 Pin = PA4 D27 Pin = PA5 D28 Pin = PA6 D29 Pin = PA7 D30 Pin = PC7 D31 Pin = PC6 D32 Pin = PC5 D33 Pin = PC4 D34 Pin = PC3 D35 Pin = PC2 D36 Pin = PC1 D37 Pin = PC0 D38 Pin = PD7 D39 Pin = PG2 D40 Pin = PG1 D41 Pin = PG0 D42 Pin = PL7 D43 Pin = PL6 D44 Pin = PL5 D45 Pin = PL4 D46 Pin = PL3 D47 Pin = PL2 D48 Pin = PL1 D49 Pin = PL0 D50 Pin = PB3 D51 Pin = PB2 D52 Pin = PB1 D53 Pin = PB0 AREF Pin = NoPin LED Pin = PB7 ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. arduino-mega2560 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mega2560/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mega2560/ Constants const ( A0 Pin = PF0 A1 Pin = PF1 A2 Pin = PF2 A3 Pin = PF3 A4 Pin = PF4 A5 Pin = PF5 A6 Pin = PF6 A7 Pin = PF7 A8 Pin = PK0 A9 Pin = PK1 A10 Pin = PK2 A11 Pin = PK3 A12 Pin = PK4 A13 Pin = PK5 A14 Pin = PK6 A15 Pin = PK7 // Analog Input ADC0 Pin = PF0 ADC1 Pin = PF1 ADC2 Pin = PF2 ADC3 Pin = PF3 ADC4 Pin = PF4 ADC5 Pin = PF5 ADC6 Pin = PF6 ADC7 Pin = PF7 ADC8 Pin = PK0 ADC9 Pin = PK1 ADC10 Pin = PK2 ADC11 Pin = PK3 ADC12 Pin = PK4 ADC13 Pin = PK5 ADC14 Pin = PK6 ADC15 Pin = PK7 // Digital pins D0 Pin = PE0 D1 Pin = PE1 D2 Pin = PE4 D3 Pin = PE5 D4 Pin = PG5 D5 Pin = PE3 D6 Pin = PH3 D7 Pin = PH4 D8 Pin = PH5 D9 Pin = PH6 D10 Pin = PB4 D11 Pin = PB5 D12 Pin = PB6 D13 Pin = PB7 D14 Pin = PJ1 // TX3 D15 Pin = PJ0 // RX3 D16 Pin = PH1 // TX2 D17 Pin = PH0 // RX2 D18 Pin = PD3 // TX1 D19 Pin = PD2 // RX1 D20 Pin = PD1 D21 Pin = PD0 D22 Pin = PA0 D23 Pin = PA1 D24 Pin = PA2 D25 Pin = PA3 D26 Pin = PA4 D27 Pin = PA5 D28 Pin = PA6 D29 Pin = PA7 D30 Pin = PC7 D31 Pin = PC6 D32 Pin = PC5 D33 Pin = PC4 D34 Pin = PC3 D35 Pin = PC2 D36 Pin = PC1 D37 Pin = PC0 D38 Pin = PD7 D39 Pin = PG2 D40 Pin = PG1 D41 Pin = PG0 D42 Pin = PL7 D43 Pin = PL6 D44 Pin = PL5 D45 Pin = PL4 D46 Pin = PL3 D47 Pin = PL2 D48 Pin = PL1 D49 Pin = PL0 D50 Pin = PB3 D51 Pin = PB2 D52 Pin = PB1 D53 Pin = PB0 AREF Pin = NoPin LED Pin = PB7 ) const ( UART_TX_PIN Pin = UART0_TX_PIN UART_RX_PIN Pin = UART0_RX_PIN UART0_TX_PIN Pin = D1 UART0_RX_PIN Pin = D0 UART1_TX_PIN Pin = D18 UART1_RX_PIN Pin = D19 UART2_TX_PIN Pin = D16 UART2_RX_PIN Pin = D17 UART3_TX_PIN Pin = D14 UART3_RX_PIN Pin = D15 ) UART pins arduino-mkr1000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mkr1000/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mkr1000/ Constants const ( D0 Pin = PA22 // PWM available D1 Pin = PA23 // PWM available D2 Pin = PA10 // PWM available D3 Pin = PA11 // PWM available D4 Pin = PB10 // PWM available D5 Pin = PB11 // PWM available D6 Pin = PA20 // PWM available D7 Pin = PA21 // PWM available D8 Pin = PA16 // PWM available D9 Pin = PA17 D10 Pin = PA19 // PWM available D11 Pin = PA08 // SDA D12 Pin = PA09 // PWM available, SCL D13 Pin = PB23 // RX D14 Pin = PB22 // TX RX0 Pin = PB23 // UART2 RX TX1 Pin = PB22 // UART2 TX ) GPIO Pins arduino-mkrwifi1010 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mkrwifi1010/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-mkrwifi1010/ Constants const ( D0 Pin = PA22 // PWM available D1 Pin = PA23 // PWM available D2 Pin = PA10 // PWM available D3 Pin = PA11 // PWM available D4 Pin = PB10 // PWM available D5 Pin = PB11 // PWM available D6 Pin = PA20 // PWM available D7 Pin = PA21 // PWM available D8 Pin = PA16 // PWM available D9 Pin = PA17 D10 Pin = PA19 // PWM available D11 Pin = PA08 // SDA D12 Pin = PA09 // PWM available, SCL D13 Pin = PB23 // RX D14 Pin = PB22 // TX RX0 Pin = PB23 // UART1 RX TX1 Pin = PB22 // UART1 TX ) GPIO Pins arduino-nano https://tinygo.org/docs/reference/microcontrollers/machine/arduino-nano/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-nano/ Constants const ( D0 = PD0 // RX0 D1 = PD1 // TX1 D2 = PD2 D3 = PD3 D4 = PD4 D5 = PD5 D6 = PD6 D7 = PD7 D8 = PB0 D9 = PB1 D10 = PB2 D11 = PB3 D12 = PB4 D13 = PB5 ) Digital pins. const LED Pin = D13 LED on the Arduino const ( ADC0 Pin = PC0 ADC1 Pin = PC1 ADC2 Pin = PC2 ADC3 Pin = PC3 ADC4 Pin = PC4 // Used by TWI for SDA ADC5 Pin = PC5 // Used by TWI for SCL ) ADC on the Arduino arduino-nano33 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-nano33/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-nano33/ Constants const ( RX0 Pin = PB23 // UART2 RX TX1 Pin = PB22 // UART2 TX D2 Pin = PB10 // PWM available D3 Pin = PB11 // PWM available D4 Pin = PA07 D5 Pin = PA05 // PWM available D6 Pin = PA04 // PWM available D7 Pin = PA06 D8 Pin = PA18 D9 Pin = PA20 // PWM available D10 Pin = PA21 // PWM available D11 Pin = PA16 // PWM available D12 Pin = PA19 // PWM available D13 Pin = PA17 ) GPIO Pins arduino-zero https://tinygo.org/docs/reference/microcontrollers/machine/arduino-zero/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/arduino-zero/ Constants const ( D0 = PA11 // RX D1 = PA10 // TX D2 = PA14 D3 = PA09 // PWM available D4 = PA08 // PWM available D5 = PA15 // PWM available D6 = PA20 // PWM available D7 = PA21 ) GPIO Pins - Digital Low const ( D8 = PA06 // PWM available D9 = PA07 // PWM available D10 = PA18 // PWM available D11 = PA16 // PWM available D12 = PA19 // PWM available D13 = PA17 // PWM available ) GPIO Pins - Digital High atsame54-xpro https://tinygo.org/docs/reference/microcontrollers/machine/atsame54-xpro/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/atsame54-xpro/ Constants const ( LED = PC18 BUTTON = PB31 ) const ( // Extension Header EXT1 EXT1_PIN3_ADC_P = PB04 EXT1_PIN4_ADC_N = PB05 EXT1_PIN5_GPIO1 = PA06 EXT1_PIN6_GPIO2 = PA07 EXT1_PIN7_PWM_P = PB08 EXT1_PIN8_PWM_N = PB09 EXT1_PIN9_IRQ = PB07 EXT1_PIN9_GPIO = PB07 EXT1_PIN10_SPI_SS_B = PA27 EXT1_PIN10_GPIO = PA27 EXT1_PIN11_TWI_SDA = PA22 EXT1_PIN12_TWI_SCL = PA23 EXT1_PIN13_UART_RX = PA05 EXT1_PIN14_UART_TX = PA04 EXT1_PIN15_SPI_SS_A = PB28 EXT1_PIN16_SPI_SDO = PB27 EXT1_PIN17_SPI_SDI = PB29 EXT1_PIN18_SPI_SCK = PB26 // Extension Header EXT2 EXT2_PIN3_ADC_P = PB00 EXT2_PIN4_ADC_N = PA03 EXT2_PIN5_GPIO1 = PB01 EXT2_PIN6_GPIO2 = PB06 EXT2_PIN7_PWM_P = PB14 EXT2_PIN8_PWM_N = PB15 EXT2_PIN9_IRQ = PD00 EXT2_PIN9_GPIO = PD00 EXT2_PIN10_SPI_SS_B = PB02 EXT2_PIN10_GPIO = PB02 EXT2_PIN11_TWI_SDA = PD08 EXT2_PIN12_TWI_SCL = PD09 EXT2_PIN13_UART_RX = PB17 EXT2_PIN14_UART_TX = PB16 EXT2_PIN15_SPI_SS_A = PC06 EXT2_PIN16_SPI_SDO = PC04 EXT2_PIN17_SPI_SDI = PC07 EXT2_PIN18_SPI_SCK = PC05 // Extension Header EXT3 EXT3_PIN3_ADC_P = PC02 EXT3_PIN4_ADC_N = PC03 EXT3_PIN5_GPIO1 = PC01 EXT3_PIN6_GPIO2 = PC10 EXT3_PIN7_PWM_P = PD10 EXT3_PIN8_PWM_N = PD11 EXT3_PIN9_IRQ = PC30 EXT3_PIN9_GPIO = PC30 EXT3_PIN10_SPI_SS_B = PC31 EXT3_PIN10_GPIO = PC31 EXT3_PIN11_TWI_SDA = PD08 EXT3_PIN12_TWI_SCL = PD09 EXT3_PIN13_UART_RX = PC23 EXT3_PIN14_UART_TX = PC22 EXT3_PIN15_SPI_SS_A = PC14 EXT3_PIN16_SPI_SDO = PC04 EXT3_PIN17_SPI_SDI = PC07 EXT3_PIN18_SPI_SCK = PC05 // SD_CARD SD_CARD_MCDA0 = PB18 SD_CARD_MCDA1 = PB19 SD_CARD_MCDA2 = PB20 SD_CARD_MCDA3 = PB21 SD_CARD_MCCK = PA21 SD_CARD_MCCDA = PA20 SD_CARD_DETECT = PD20 SD_CARD_PROTECT = PD21 // I2C I2C_SDA = PD08 I2C_SCL = PD09 // CAN CAN0_TX = PA22 CAN0_RX = PA23 CAN1_STANDBY = PC13 CAN1_TX = PB12 CAN1_RX = PB13 CAN_STANDBY = CAN1_STANDBY CAN_TX = CAN1_TX CAN_RX = CAN1_RX // PDEC PDEC_PHASE_A = PC16 PDEC_PHASE_B = PC17 PDEC_INDEX = PC18 // PCC PCC_I2C_SDA = PD08 PCC_I2C_SCL = PD09 PCC_VSYNC_DEN1 = PA12 PCC_HSYNC_DEN2 = PA13 PCC_CLK = PA14 PCC_XCLK = PA15 PCC_DATA00 = PA16 PCC_DATA01 = PA17 PCC_DATA02 = PA18 PCC_DATA03 = PA19 PCC_DATA04 = PA20 PCC_DATA05 = PA21 PCC_DATA06 = PA22 PCC_DATA07 = PA23 PCC_DATA08 = PB14 PCC_DATA09 = PB15 PCC_RESET = PC12 PCC_PWDN = PC11 // Ethernet ETHERNET_TXCK = PA14 ETHERNET_TXEN = PA17 ETHERNET_TX0 = PA18 ETHERNET_TX1 = PA19 ETHERNET_RXER = PA15 ETHERNET_RX0 = PA13 ETHERNET_RX1 = PA12 ETHERNET_RXDV = PC20 ETHERNET_MDIO = PC12 ETHERNET_MDC = PC11 ETHERNET_INT = PD12 ETHERNET_RESET = PC21 PIN_QT_BUTTON = PA16 PIN_BTN0 = PB31 PIN_ETH_LED = PC15 PIN_LED0 = PC18 PIN_ADC_DAC = PA02 PIN_VBUS_DETECT = PC00 PIN_USB_ID = PC19 ) const ( USBCDC_DM_PIN = PA24 USBCDC_DP_PIN = PA25 ) USBCDC pins badger2040 https://tinygo.org/docs/reference/microcontrollers/machine/badger2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/badger2040/ Constants const ( LED Pin = GPIO25 BUTTON_A Pin = GPIO12 BUTTON_B Pin = GPIO13 BUTTON_C Pin = GPIO14 BUTTON_UP Pin = GPIO15 BUTTON_DOWN Pin = GPIO11 BUTTON_USER Pin = GPIO23 EPD_BUSY_PIN Pin = GPIO26 EPD_RESET_PIN Pin = GPIO21 EPD_DC_PIN Pin = GPIO20 EPD_CS_PIN Pin = GPIO17 EPD_SCK_PIN Pin = GPIO18 EPD_SDO_PIN Pin = GPIO19 VBUS_DETECT Pin = GPIO24 VREF_POWER Pin = GPIO27 VREF_1V24 Pin = GPIO28 VBAT_SENSE Pin = GPIO29 ENABLE_3V3 Pin = GPIO10 BATTERY = VBAT_SENSE ) const ( I2C0_SDA_PIN Pin = GPIO4 I2C0_SCL_PIN Pin = GPIO5 I2C1_SDA_PIN Pin = NoPin I2C1_SCL_PIN Pin = NoPin ) I2C pins badger2040-w https://tinygo.org/docs/reference/microcontrollers/machine/badger2040-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/badger2040-w/ Constants const ( LED Pin = GPIO22 BUTTON_A Pin = GPIO12 BUTTON_B Pin = GPIO13 BUTTON_C Pin = GPIO14 BUTTON_UP Pin = GPIO15 BUTTON_DOWN Pin = GPIO11 BUTTON_USER Pin = NoPin // Not available on Badger 2040 W EPD_BUSY_PIN Pin = GPIO26 EPD_RESET_PIN Pin = GPIO21 EPD_DC_PIN Pin = GPIO20 EPD_CS_PIN Pin = GPIO17 EPD_SCK_PIN Pin = GPIO18 EPD_SDO_PIN Pin = GPIO19 VBUS_DETECT Pin = GPIO24 VREF_POWER Pin = GPIO27 VREF_1V24 Pin = GPIO28 VBAT_SENSE Pin = GPIO29 ENABLE_3V3 Pin = GPIO10 BATTERY = VBAT_SENSE RTC_ALARM = GPIO8 ) const ( I2C0_SDA_PIN Pin = GPIO4 I2C0_SCL_PIN Pin = GPIO5 I2C1_SDA_PIN Pin = NoPin I2C1_SCL_PIN Pin = NoPin ) I2C pins bluepill https://tinygo.org/docs/reference/microcontrollers/machine/bluepill/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/bluepill/ Constants const ( C13 = PC13 C14 = PC14 C15 = PC15 A0 = PA0 A1 = PA1 A2 = PA2 A3 = PA3 A4 = PA4 A5 = PA5 A6 = PA6 A7 = PA7 B0 = PB0 B1 = PB1 B10 = PB10 B11 = PB11 B12 = PB12 B13 = PB13 B14 = PB14 B15 = PB15 A8 = PA8 A9 = PA9 A10 = PA10 A11 = PA11 A12 = PA12 A13 = PA13 A14 = PA14 A15 = PA15 B3 = PB3 B4 = PB4 B5 = PB5 B6 = PB6 B7 = PB7 B8 = PB8 B9 = PB9 ) Pins printed on the silkscreen challenger-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/challenger-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/challenger-rp2040/ Constants const ( LED = GPIO24 // Onboard crystal oscillator frequency, in MHz. xoscFreq = 12 // MHz ) const ( D5 = GPIO2 D6 = GPIO3 D9 = GPIO4 D10 = GPIO5 D11 = GPIO6 D12 = GPIO7 D13 = GPIO8 ) GPIO Pins const ( A0 = ADC0 A1 = ADC1 A2 = ADC2 A3 = ADC3 ) Analog pins const ( I2C0_SDA_PIN = GPIO24 I2C0_SCL_PIN = GPIO25 I2C1_SDA_PIN = GPIO2 I2C1_SCL_PIN = GPIO3 SDA_PIN = I2C1_SDA_PIN SCL_PIN = I2C1_SCL_PIN ) I2C Pins. circuitplay-bluefruit https://tinygo.org/docs/reference/microcontrollers/machine/circuitplay-bluefruit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/circuitplay-bluefruit/ Constants const HasLowFrequencyCrystal = false const ( D0 = P0_30 D1 = P0_14 D2 = P0_05 D3 = P0_04 D4 = P1_02 D5 = P1_15 D6 = P0_02 D7 = P1_06 D8 = P0_13 D9 = P0_29 D10 = P0_03 D11 = P1_04 D12 = P0_26 D13 = P1_14 ) GPIO Pins const ( A1 = P0_02 A2 = P0_29 A3 = P0_03 A4 = P0_04 A5 = P0_05 A6 = P0_30 A7 = P0_14 A8 = P0_28 A9 = P0_31 ) Analog Pins circuitplay-express https://tinygo.org/docs/reference/microcontrollers/machine/circuitplay-express/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/circuitplay-express/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins clue https://tinygo.org/docs/reference/microcontrollers/machine/clue/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/clue/ Constants const HasLowFrequencyCrystal = false const ( D0 = P0_04 D1 = P0_05 D2 = P0_03 D3 = P0_28 D4 = P0_02 D5 = P1_02 D6 = P1_09 D7 = P0_07 D8 = P1_07 D9 = P0_27 D10 = P0_30 D11 = P1_10 D12 = P0_31 D13 = P0_08 D14 = P0_06 D15 = P0_26 D16 = P0_29 D17 = P1_01 D18 = P0_16 D19 = P0_25 D20 = P0_24 D29 = P0_14 D30 = P0_15 D31 = P0_12 D32 = P0_13 D33 = P1_03 D34 = P1_05 D35 = P0_00 D36 = P0_01 D37 = P0_19 D38 = P0_20 D39 = P0_17 D40 = P0_22 D41 = P0_23 D42 = P0_21 D43 = P0_10 D44 = P0_09 D45 = P1_06 D46 = P1_00 ) GPIO Pins d1mini https://tinygo.org/docs/reference/microcontrollers/machine/d1mini/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/d1mini/ Constants const ( D0 = GPIO16 D1 = GPIO5 D2 = GPIO4 D3 = GPIO0 D4 = GPIO2 D5 = GPIO14 D6 = GPIO12 D7 = GPIO13 D8 = GPIO15 ) GPIO pins on the NodeMCU board. const LED = D4 Onboard blue LED (on the AI-Thinker module). const ( SPI0_SCK_PIN = D5 SPI0_SDO_PIN = D7 SPI0_SDI_PIN = D6 SPI0_CS0_PIN = D8 ) SPI pins const ( SDA_PIN = D2 SCL_PIN = D1 ) I2C pins digispark https://tinygo.org/docs/reference/microcontrollers/machine/digispark/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/digispark/ Constants const ( P0 Pin = PB0 P1 Pin = PB1 P2 Pin = PB2 P3 Pin = PB3 P4 Pin = PB4 P5 Pin = PB5 LED = P1 ) const Device = deviceName Device is the running program’s chip name, such as “ATSAMD51J19A” or “nrf52840”. It is not the same as the CPU name. The constant is some hardcoded default value if the program does not target a particular chip but instead runs in WebAssembly for example. esp32-coreboard-v2 https://tinygo.org/docs/reference/microcontrollers/machine/esp32-coreboard-v2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/esp32-coreboard-v2/ Constants const ( CLK = GPIO6 CMD = GPIO11 IO0 = GPIO0 IO1 = GPIO1 IO2 = GPIO2 IO3 = GPIO3 IO4 = GPIO4 IO5 = GPIO5 IO9 = GPIO9 IO10 = GPIO10 IO16 = GPIO16 IO17 = GPIO17 IO18 = GPIO18 IO19 = GPIO19 IO21 = GPIO21 IO22 = GPIO22 IO23 = GPIO23 IO25 = GPIO25 IO26 = GPIO26 IO27 = GPIO27 IO32 = GPIO32 IO33 = GPIO33 IO34 = GPIO34 IO35 = GPIO35 IO36 = GPIO36 IO39 = GPIO39 RXD = GPIO3 SD0 = GPIO7 SD1 = GPIO8 SD2 = GPIO9 SD3 = GPIO10 SVN = GPIO39 SVP = GPIO36 TCK = GPIO13 TD0 = GPIO15 TDI = GPIO12 TMS = GPIO14 TXD = GPIO1 ) const LED = IO2 Built-in LED on some ESP32 boards. esp32-mini32 https://tinygo.org/docs/reference/microcontrollers/machine/esp32-mini32/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/esp32-mini32/ Constants const ( CLK = GPIO6 CMD = GPIO11 IO0 = GPIO0 IO1 = GPIO1 IO2 = GPIO2 IO3 = GPIO3 IO4 = GPIO4 IO5 = GPIO5 IO9 = GPIO9 IO10 = GPIO10 IO16 = GPIO16 IO17 = GPIO17 IO18 = GPIO18 IO19 = GPIO19 IO21 = GPIO21 IO22 = GPIO22 IO23 = GPIO23 IO25 = GPIO25 IO26 = GPIO26 IO27 = GPIO27 IO32 = GPIO32 IO33 = GPIO33 IO34 = GPIO34 IO35 = GPIO35 IO36 = GPIO36 IO39 = GPIO39 RXD = GPIO3 SD0 = GPIO7 SD1 = GPIO8 SD2 = GPIO9 SD3 = GPIO10 SVN = GPIO39 SVP = GPIO36 TCK = GPIO13 TD0 = GPIO15 TDI = GPIO12 TMS = GPIO14 TXD = GPIO1 ) const LED = IO2 Built-in LED on some ESP32 boards. feather-m0 https://tinygo.org/docs/reference/microcontrollers/machine/feather-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-m0/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins feather-m4 https://tinygo.org/docs/reference/microcontrollers/machine/feather-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-m4/ Constants const ( D0 = PB17 // UART0 RX/PWM available D1 = PB16 // UART0 TX/PWM available D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available D8 = PB03 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX D11 = PA21 // can be used for PWM or UART1 RX D12 = PA22 // PWM available D13 = PA23 // PWM available D21 = PA13 // PWM available D22 = PA12 // PWM available D23 = PB22 // PWM available D24 = PB23 // PWM available D25 = PA17 // PWM available ) GPIO Pins feather-m4-can https://tinygo.org/docs/reference/microcontrollers/machine/feather-m4-can/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-m4-can/ Constants const ( D0 = PB17 // UART0 RX/PWM available D1 = PB16 // UART0 TX/PWM available D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available D7 = PB03 // neopixel power D8 = PB02 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX D11 = PA21 // can be used for PWM or UART1 RX D12 = PA22 // PWM available D13 = PA23 // PWM available D21 = PA13 // PWM available D22 = PA12 // PWM available D23 = PB22 // PWM available D24 = PB23 // PWM available D25 = PA17 // PWM available ) GPIO Pins feather-nrf52840 https://tinygo.org/docs/reference/microcontrollers/machine/feather-nrf52840/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-nrf52840/ Constants const HasLowFrequencyCrystal = true const ( D0 = P0_25 // UART TX D1 = P0_24 // UART RX D2 = P0_10 // NFC2 D3 = P1_15 // LED1 D4 = P1_10 // LED2 D5 = P1_08 D6 = P0_07 D7 = P1_02 // Button D8 = P0_16 // NeoPixel D9 = P0_26 D10 = P0_27 D11 = P0_06 D12 = P0_08 D13 = P1_09 D14 = P0_04 // A0 D15 = P0_05 // A1 D16 = P0_30 // A2 D17 = P0_28 // A3 D18 = P0_02 // A4 D19 = P0_03 // A5 D20 = P0_29 // Battery D21 = P0_31 // AREF D22 = P0_12 // I2C SDA D23 = P0_11 // I2C SCL D24 = P0_15 // SPI MISO D25 = P0_13 // SPI MOSI D26 = P0_14 // SPI SCK D27 = P0_19 // QSPI CLK D28 = P0_20 // QSPI CS D29 = P0_17 // QSPI Data 0 D30 = P0_22 // QSPI Data 1 D31 = P0_23 // QSPI Data 2 D32 = P0_21 // QSPI Data 3 D33 = P0_09 // NFC1 (test point on bottom of board) ) GPIO Pins feather-nrf52840-sense https://tinygo.org/docs/reference/microcontrollers/machine/feather-nrf52840-sense/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-nrf52840-sense/ Constants const HasLowFrequencyCrystal = false const ( D0 = P0_25 // UART TX D1 = P0_24 // UART RX D2 = P0_10 // NFC2 D3 = P1_11 D4 = P1_10 // LED2 D5 = P1_08 D6 = P0_07 D7 = P1_02 // Button D8 = P0_16 // NeoPixel D9 = P0_26 D10 = P0_27 D11 = P0_06 D12 = P0_08 D13 = P1_09 // LED1 D14 = P0_04 // A0 D15 = P0_05 // A1 D16 = P0_30 // A2 D17 = P0_28 // A3 D18 = P0_02 // A4 D19 = P0_03 // A5 D20 = P0_29 // Battery D21 = P0_31 // AREF D22 = P0_12 // I2C SDA D23 = P0_11 // I2C SCL D24 = P0_15 // SPI MISO D25 = P0_13 // SPI MOSI D26 = P0_14 // SPI SCK D27 = P0_19 // QSPI CLK D28 = P0_20 // QSPI CS D29 = P0_17 // QSPI Data 0 D30 = P0_22 // QSPI Data 1 D31 = P0_23 // QSPI Data 2 D32 = P0_21 // QSPI Data 3 D33 = P0_09 // NFC1 (test point on bottom of board) ) GPIO Pins feather-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/feather-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-rp2040/ Constants const ( D4 = GPIO6 D5 = GPIO7 D6 = GPIO8 D9 = GPIO9 D10 = GPIO10 D11 = GPIO11 D12 = GPIO12 D13 = GPIO13 D24 = GPIO24 D25 = GPIO25 ) GPIO Pins const ( A0 = GPIO26 A1 = GPIO27 A2 = GPIO28 A3 = GPIO29 ) Analog pins const LED = GPIO13 const ( I2C0_SDA_PIN = GPIO24 I2C0_SCL_PIN = GPIO25 I2C1_SDA_PIN = GPIO2 I2C1_SCL_PIN = GPIO3 SDA_PIN = I2C1_SDA_PIN SCL_PIN = I2C1_SCL_PIN ) I2C Pins. feather-stm32f405 https://tinygo.org/docs/reference/microcontrollers/machine/feather-stm32f405/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/feather-stm32f405/ Constants const ( NUM_DIGITAL_IO_PINS = 39 NUM_ANALOG_IO_PINS = 7 ) const ( // Arduino pin = MCU port pin // primary functions (alternate functions) D0 = PB11 // USART3 RX, PWM TIM2_CH4 (I2C2 SDA) D1 = PB10 // USART3 TX, PWM TIM2_CH3 (I2C2 SCL, I2S2 BCK) D2 = PB3 // GPIO, SPI3 FLASH SCK D3 = PB4 // GPIO, SPI3 FLASH MISO D4 = PB5 // GPIO, SPI3 FLASH MOSI D5 = PC7 // GPIO, PWM TIM3_CH2 (USART6 RX, I2S3 MCK) D6 = PC6 // GPIO, PWM TIM3_CH1 (USART6 TX, I2S2 MCK) D7 = PA15 // GPIO, SPI3 FLASH CS D8 = PC0 // GPIO, Neopixel D9 = PB8 // GPIO, PWM TIM4_CH3 (CAN1 RX, I2C1 SCL) D10 = PB9 // GPIO, PWM TIM4_CH4 (CAN1 TX, I2C1 SDA, I2S2 WSL) D11 = PC3 // GPIO (I2S2 SD, SPI2 MOSI) D12 = PC2 // GPIO (I2S2ext SD, SPI2 MISO) D13 = PC1 // GPIO, Builtin LED D14 = PB7 // I2C1 SDA, PWM TIM4_CH2 (USART1 RX) D15 = PB6 // I2C1 SCL, PWM TIM4_CH1 (USART1 TX, CAN2 TX) D16 = PA4 // A0 (DAC OUT1) D17 = PA5 // A1 (DAC OUT2, SPI1 SCK) D18 = PA6 // A2, PWM TIM3_CH1 (SPI1 MISO) D19 = PA7 // A3, PWM TIM3_CH2 (SPI1 MOSI) D20 = PC4 // A4 D21 = PC5 // A5 D22 = PA3 // A6 D23 = PB13 // SPI2 SCK, PWM TIM1_CH1N (I2S2 BCK, CAN2 TX) D24 = PB14 // SPI2 MISO, PWM TIM1_CH2N (I2S2ext SD) D25 = PB15 // SPI2 MOSI, PWM TIM1_CH3N (I2S2 SD) D26 = PC8 // SDIO D27 = PC9 // SDIO D28 = PC10 // SDIO D29 = PC11 // SDIO D30 = PC12 // SDIO D31 = PD2 // SDIO D32 = PB12 // SD Detect D33 = PC14 // OSC32 D34 = PC15 // OSC32 D35 = PA11 // USB D+ D36 = PA12 // USB D- D37 = PA13 // SWDIO D38 = PA14 // SWCLK ) Digital pins gameboy-advance https://tinygo.org/docs/reference/microcontrollers/machine/gameboy-advance/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/gameboy-advance/ Constants const Device = deviceName Device is the running program’s chip name, such as “ATSAMD51J19A” or “nrf52840”. It is not the same as the CPU name. The constant is some hardcoded default value if the program does not target a particular chip but instead runs in WebAssembly for example. const ( KHz = 1000 MHz = 1000_000 GHz = 1000_000_000 ) Generic constants. const NoPin = Pin(0xff) NoPin explicitly indicates “not a pin”. grandcentral-m4 https://tinygo.org/docs/reference/microcontrollers/machine/grandcentral-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/grandcentral-m4/ Constants const ( // = Pin Alt. Function SERCOM PWM Timer Interrupt // ------ -------------------- -------- ----------- ----------- D0 = PB25 // UART1 RX 0[1] EXTI9 D1 = PB24 // UART1 TX 0[0] EXTI8 D2 = PC18 // TCC0[2] EXTI2 D3 = PC19 // TCC0[3] EXTI3 D4 = PC20 // TCC0[4] EXTI4 D5 = PC21 // TCC0[5] EXTI5 D6 = PD20 // TCC1[0] EXTI10 D7 = PD21 // TCC1[1] EXTI11 D8 = PB18 // TCC1[0] EXTI2 D9 = PB02 // TC6[0] EXTI3 D10 = PB22 // TC7[0] EXTI6 D11 = PB23 // EXTI7 D12 = PB00 // TC7[0] EXTI0 D13 = PB01 // On-board LED TC7[1] EXTI1 D14 = PB16 // UART4 TX, I2S0 SCK 5[0] TC6[0] EXTI0 D15 = PB17 // UART4 RX, I2S0 MCK 5[1] EXTI1 D16 = PC22 // UART3 TX 1[0] EXTI6 D17 = PC23 // UART3 RX 1[1] EXTI6 D18 = PB12 // UART2 TX 4[0] TCC3[0] EXTI12 D19 = PB13 // UART2 RX 4[1] TCC3[1] EXTI13 D20 = PB20 // I2C0 SDA 3[0] EXTI4 D21 = PB21 // I2C0 SCL 3[1] EXTI5 D22 = PD12 // EXTI7 D23 = PA15 // TCC2[1] EXTI15 D24 = PC17 // I2C1 SCL 6[1] TCC0[1] EXTI1 D25 = PC16 // I2C1 SDA 6[0] TCC0[0] EXTI0 D26 = PA12 // PCC DEN1 TC2[0] EXTI12 D27 = PA13 // PCC DEN2 TC2[1] EXTI13 D28 = PA14 // PCC CLK TCC2[0] EXTI14 D29 = PB19 // PCC XCLK EXTI3 D30 = PA23 // PCC D7 TC4[1] EXTI7 D31 = PA22 // PCC D6, I2S0 SDI TC4[0] EXTI6 D32 = PA21 // PCC D5, I2S0 SDO EXTI5 D33 = PA20 // PCC D4, I2S0 FS EXTI4 D34 = PA19 // PCC D3 TC3[1] EXTI3 D35 = PA18 // PCC D2 TC3[0] EXTI2 D36 = PA17 // PCC D1 EXTI1 D37 = PA16 // PCC D0 EXTI0 D38 = PB15 // PCC D9 TCC4[1] EXTI15 D39 = PB14 // PCC D8 TCC4[0] EXTI14 D40 = PC13 // PCC D11 EXTI13 D41 = PC12 // PCC D10 EXTI12 D42 = PC15 // PCC D13 EXTI15 D43 = PC14 // PCC D12 EXTI14 D44 = PC11 // EXTI11 D45 = PC10 // EXTI10 D46 = PC06 // EXTI6 D47 = PC07 // EXTI5 D48 = PC04 // EXTI4 D49 = PC05 // EXTI5 D50 = PD11 // SPI0 SDI 7[3] EXTI11 D51 = PD08 // SPI0 SDO 7[0] EXTI8 D52 = PD09 // SPI0 SCK 7[1] EXTI9 D53 = PD10 // SPI0 CS EXTI10 D54 = PB05 // ADC1 (A8) EXTI5 D55 = PB06 // ADC1 (A9) EXTI6 D56 = PB07 // ADC1 (A10) EXTI7 D57 = PB08 // ADC1 (A11) EXTI8 D58 = PB09 // ADC1 (A12) EXTI9 D59 = PA04 // ADC0 (A13) TC0[0] EXTI4 D60 = PA06 // ADC0 (A14) TC1[0] EXTI6 D61 = PA07 // ADC0 (A15) TC1[1] EXTI7 D62 = PB20 // I2C0 SDA 3[0] TCC1[2] EXTI4 D63 = PB21 // I2C0 SCL 3[1] TCC1[3] EXTI5 D64 = PD11 // SPI0 SDI 7[3] EXTI6 D65 = PD08 // SPI0 SDO 7[0] EXTI3 D66 = PD09 // SPI0 SCK 7[1] EXTI4 D67 = PA02 // ADC0 (A0), DAC0 EXTI2 D68 = PA05 // ADC0 (A1), DAC1 EXTI5 D69 = PB03 // ADC0 (A2) TC6[1] EXTI3 D70 = PC00 // ADC1 (A3) EXTI0 D71 = PC01 // ADC1 (A4) EXTI1 D72 = PC02 // ADC1 (A5) EXTI2 D73 = PC03 // ADC1 (A6) EXTI3 D74 = PB04 // ADC1 (A7) EXTI4 D75 = PC31 // UART RX LED D76 = PC30 // UART TX LED D77 = PA27 // USB HOST EN D78 = PA24 // USB DM EXTI8 D79 = PA25 // USB DP EXTI9 D80 = PB29 // SD/SPI1 SDI 2[3] D81 = PB27 // SD/SPI1 SCK 2[1] D82 = PB26 // SD/SPI1 SDO 2[0] D83 = PB28 // SD/SPI1 CS D84 = PA03 // AREF EXTI3 D85 = PA02 // DAC0 EXTI2 D86 = PA05 // DAC1 EXTI5 D87 = PB01 // On-board LED (D13) TC7[1] EXTI1 D88 = PC24 // On-board NeoPixel D89 = PB10 // QSPI SCK EXTI10 D90 = PB11 // QSPI CS EXTI11 D91 = PA08 // QSPI ID0 EXTI(NMI) D92 = PA09 // QSPI ID1 EXTI9 D93 = PA10 // QSPI ID2 EXTI10 D94 = PA11 // QSPI ID3 EXTI11 D95 = PB31 // SD Detect EXTI15 D96 = PB30 // SWO EXTI14 ) Digital pins hifive1b https://tinygo.org/docs/reference/microcontrollers/machine/hifive1b/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/hifive1b/ Constants const ( P00 Pin = 0 P01 Pin = 1 P02 Pin = 2 P03 Pin = 3 P04 Pin = 4 P05 Pin = 5 P06 Pin = 6 P07 Pin = 7 P08 Pin = 8 P09 Pin = 9 P10 Pin = 10 P11 Pin = 11 P12 Pin = 12 // peripherals: I2C0 SDA P13 Pin = 13 // peripherals: I2C0 SCL P14 Pin = 14 P15 Pin = 15 P16 Pin = 16 P17 Pin = 17 P18 Pin = 18 P19 Pin = 19 P20 Pin = 20 P21 Pin = 21 P22 Pin = 22 P23 Pin = 23 P24 Pin = 24 P25 Pin = 25 P26 Pin = 26 P27 Pin = 27 P28 Pin = 28 P29 Pin = 29 P30 Pin = 30 P31 Pin = 31 ) const ( D0 = P16 D1 = P17 D2 = P18 D3 = P19 // Green LED/PWM (PWM1_PWM1) D4 = P20 // PWM (PWM1_PWM0) D5 = P21 // Blue LED/PWM (PWM1_PWM2) D6 = P22 // Red LED/PWM (PWM1_PWM3) D7 = P16 D8 = NoPin // PWM? itsybitsy-m0 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-m0/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins itsybitsy-m4 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-m4/ Constants const ( D0 = PA16 // UART0 RX/PWM available D1 = PA17 // UART0 TX/PWM available D2 = PA07 D3 = PB22 D4 = PA14 // PWM available D5 = PA15 // PWM available D6 = PB02 // dotStar clock D7 = PA18 // PWM available D8 = PB03 // dotStar data D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX D11 = PA21 // can be used for PWM or UART1 RX D12 = PA23 // PWM available D13 = PA22 // PWM available ) GPIO Pins itsybitsy-nrf52840 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-nrf52840/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/itsybitsy-nrf52840/ Constants const HasLowFrequencyCrystal = true const ( D0 = P0_25 // UART TX D1 = P0_24 // UART RX D2 = P1_02 D3 = P0_06 // LED1 D4 = P0_29 // Button D5 = P0_27 D6 = P1_09 // DotStar Clock D7 = P1_08 D8 = P0_08 // DotStar Data D9 = P0_07 D10 = P0_05 D11 = P0_26 D12 = P0_11 D13 = P0_12 D14 = P0_04 // A0 D15 = P0_30 // A1 D16 = P0_28 // A2 D17 = P0_31 // A3 D18 = P0_02 // A4 D19 = P0_03 // A5 D20 = P0_05 // A6 D21 = P0_16 // I2C SDA D22 = P0_14 // I2C SCL D23 = P0_20 // SPI SDI D24 = P0_15 // SPI SDO D25 = P0_13 // SPI SCK D26 = P0_19 // QSPI SCK D27 = P0_23 // QSPI CS D28 = P0_21 // QSPI Data 0 D29 = P0_22 // QSPI Data 1 D30 = P1_00 // QSPI Data 2 D31 = P0_17 // QSPI Data 3 ) GPIO Pins lgt92 https://tinygo.org/docs/reference/microcontrollers/machine/lgt92/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/lgt92/ Constants const ( LED1 = PA12 LED2 = PA8 LED3 = PA11 LED_RED = LED1 LED_BLUE = LED2 LED_GREEN = LED3 // Default led LED = LED1 BUTTON = PB14 // LG GPS module GPS_STANDBY_PIN = PB3 GPS_RESET_PIN = PB4 GPS_POWER_PIN = PB5 MEMS_ACCEL_CS = PE3 MEMS_ACCEL_INT1 = PE0 MEMS_ACCEL_INT2 = PE1 // SPI SPI1_SCK_PIN = PA5 SPI1_SDI_PIN = PA6 SPI1_SDO_PIN = PA7 SPI0_SCK_PIN = SPI1_SCK_PIN SPI0_SDI_PIN = SPI1_SDI_PIN SPI0_SDO_PIN = SPI1_SDO_PIN // LORA RFM95 Radio RFM95_DIO0_PIN = PC13 // TinyGo UART is MCU LPUSART1 UART_RX_PIN = PA13 UART_TX_PIN = PA14 // TinyGo UART1 is MCU USART1 UART1_RX_PIN = PB6 UART1_TX_PIN = PB7 // MPU9250 Nine-Axis (Gyro + Accelerometer + Compass) I2C0_SCL_PIN = PA9 I2C0_SDA_PIN = PA10 ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. lorae5 https://tinygo.org/docs/reference/microcontrollers/machine/lorae5/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/lorae5/ Constants const ( // We assume a LED is connected on PB5 LED = PB5 // Default LED // Set the POWER_EN3V3 pin to high to turn // on the 3.3V power for all peripherals POWER_EN3V3 = PA9 // Set the POWER_EN5V pin to high to turn // on the 5V bus power for all peripherals POWER_EN5V = PB10 ) const ( SPI0_NSS_PIN = PA4 SPI0_SCK_PIN = PA5 SPI0_SDO_PIN = PA6 SPI0_SDI_PIN = PA7 ) SubGhz (SPI3) m5stack https://tinygo.org/docs/reference/microcontrollers/machine/m5stack/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/m5stack/ Constants const ( IO0 = GPIO0 IO1 = GPIO1 IO2 = GPIO2 IO3 = GPIO3 IO4 = GPIO4 IO5 = GPIO5 IO6 = GPIO6 IO7 = GPIO7 IO8 = GPIO8 IO9 = GPIO9 IO10 = GPIO10 IO11 = GPIO11 IO12 = GPIO12 IO13 = GPIO13 IO14 = GPIO14 IO15 = GPIO15 IO16 = GPIO16 IO17 = GPIO17 IO18 = GPIO18 IO19 = GPIO19 IO21 = GPIO21 IO22 = GPIO22 IO23 = GPIO23 IO25 = GPIO25 IO26 = GPIO26 IO27 = GPIO27 IO32 = GPIO32 IO33 = GPIO33 IO34 = GPIO34 IO35 = GPIO35 IO36 = GPIO36 IO37 = GPIO37 IO38 = GPIO38 IO39 = GPIO39 ) const ( // Buttons BUTTON_A = IO39 BUTTON_B = IO38 BUTTON_C = IO37 BUTTON = BUTTON_A // Speaker SPEAKER_PIN = IO25 ) const ( SPI0_SCK_PIN = IO18 SPI0_SDO_PIN = IO23 SPI0_SDI_PIN = IO19 SPI0_CS0_PIN = IO14 // LCD (ILI9342C) LCD_SCK_PIN = SPI0_SCK_PIN LCD_SDO_PIN = SPI0_SDO_PIN LCD_SDI_PIN = SPI0_SDI_PIN // NoPin ? m5stack-core2 https://tinygo.org/docs/reference/microcontrollers/machine/m5stack-core2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/m5stack-core2/ Constants const ( IO0 = GPIO0 IO1 = GPIO1 // U0TXD IO2 = GPIO2 IO3 = GPIO3 // U0RXD IO4 = GPIO4 IO5 = GPIO5 IO6 = GPIO6 // SD_CLK IO7 = GPIO7 // SD_DATA0 IO8 = GPIO8 // SD_DATA1 IO9 = GPIO9 // SD_DATA2 IO10 = GPIO10 // SD_DATA3 IO11 = GPIO11 // SD_CMD IO12 = GPIO12 IO13 = GPIO13 // U0RXD IO14 = GPIO14 // U1TXD IO15 = GPIO15 IO16 = GPIO16 IO17 = GPIO17 IO18 = GPIO18 // SPI0_SCK IO19 = GPIO19 IO21 = GPIO21 // SDA0 IO22 = GPIO22 // SCL0 IO23 = GPIO23 // SPI0_SDO IO25 = GPIO25 IO26 = GPIO26 IO27 = GPIO27 IO32 = GPIO32 // SDA1 IO33 = GPIO33 // SCL1 IO34 = GPIO34 IO35 = GPIO35 // ADC1 IO36 = GPIO36 // ADC2 IO38 = GPIO38 // SPI0_SDI IO39 = GPIO39 ) const ( SPI0_SCK_PIN = IO18 SPI0_SDO_PIN = IO23 SPI0_SDI_PIN = IO38 SPI0_CS0_PIN = IO5 // LCD (ILI9342C) LCD_SCK_PIN = SPI0_SCK_PIN LCD_SDO_PIN = SPI0_SDO_PIN LCD_SDI_PIN = SPI0_SDI_PIN LCD_SS_PIN = SPI0_CS0_PIN LCD_DC_PIN = IO15 // SD CARD SDCARD_SCK_PIN = SPI0_SCK_PIN SDCARD_SDO_PIN = SPI0_SDO_PIN SDCARD_SDI_PIN = SPI0_SDI_PIN SDCARD_SS_PIN = IO4 ) SPI pins m5stamp-c3 https://tinygo.org/docs/reference/microcontrollers/machine/m5stamp-c3/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/m5stamp-c3/ Constants const ( IO0 = GPIO0 IO1 = GPIO1 IO2 = GPIO2 IO3 = GPIO3 IO4 = GPIO4 IO5 = GPIO5 IO6 = GPIO6 IO7 = GPIO7 IO8 = GPIO8 IO9 = GPIO9 IO10 = GPIO10 IO11 = GPIO11 IO12 = GPIO12 IO13 = GPIO13 IO14 = GPIO14 IO15 = GPIO15 IO16 = GPIO16 IO17 = GPIO17 IO18 = GPIO18 IO19 = GPIO19 IO20 = GPIO20 IO21 = GPIO21 XTAL_32K_P = IO0 XTAL_32K_N = IO1 MTMS = IO4 MTDI = IO5 MTCK = IO6 MTDO = IO7 VDD_SPI = IO11 SPIHD = IO12 SPISP = IO13 SPICS0 = IO14 SPICLK = IO15 SPID = IO16 SPIQ = IO17 U0RXD = IO20 U0TXD = IO21 UART_TX_PIN = U0TXD UART_RX_PIN = U0RXD ) const ( WS2812 = IO2 ) const Device = deviceName Device is the running program’s chip name, such as “ATSAMD51J19A” or “nrf52840”. macropad-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/macropad-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/macropad-rp2040/ Constants const ( NeopixelCount = 12 // Onboard crystal oscillator frequency, in MHz. xoscFreq = 12 // MHz ) const ( SWITCH = GPIO0 BUTTON = GPIO0 KEY1 = GPIO1 KEY2 = GPIO2 KEY3 = GPIO3 KEY4 = GPIO4 KEY5 = GPIO5 KEY6 = GPIO6 KEY7 = GPIO7 KEY8 = GPIO8 KEY9 = GPIO9 KEY10 = GPIO10 KEY11 = GPIO11 KEY12 = GPIO12 LED = GPIO13 SPEAKER_ENABLE = GPIO14 SPEAKER = GPIO16 ROT_A = GPIO18 ROT_B = GPIO17 OLED_CS = GPIO22 OLED_RST = GPIO23 OLED_DC = GPIO24 NEOPIXEL = GPIO19 WS2812 = NEOPIXEL ) const ( I2C0_SDA_PIN = GPIO20 I2C0_SCL_PIN = GPIO21 I2C1_SDA_PIN = NoPin // not pinned out I2C1_SCL_PIN = NoPin // not pinned out ) I2C Default pins on Raspberry Pico. maixbit https://tinygo.org/docs/reference/microcontrollers/machine/maixbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/maixbit/ Constants const ( P00 Pin = 0 P01 Pin = 1 P02 Pin = 2 P03 Pin = 3 P04 Pin = 4 P05 Pin = 5 P06 Pin = 6 P07 Pin = 7 P08 Pin = 8 P09 Pin = 9 P10 Pin = 10 P11 Pin = 11 P12 Pin = 12 P13 Pin = 13 P14 Pin = 14 P15 Pin = 15 P16 Pin = 16 P17 Pin = 17 P18 Pin = 18 P19 Pin = 19 P20 Pin = 20 P21 Pin = 21 P22 Pin = 22 P23 Pin = 23 P24 Pin = 24 P25 Pin = 25 P26 Pin = 26 P27 Pin = 27 P28 Pin = 28 P29 Pin = 29 P30 Pin = 30 P31 Pin = 31 P32 Pin = 32 P33 Pin = 33 P34 Pin = 34 P35 Pin = 35 P36 Pin = 36 P37 Pin = 37 P38 Pin = 38 P39 Pin = 39 P40 Pin = 40 P41 Pin = 41 P42 Pin = 42 P43 Pin = 43 P44 Pin = 44 P45 Pin = 45 P46 Pin = 46 P47 Pin = 47 ) K210 IO pins. matrixportal-m4 https://tinygo.org/docs/reference/microcontrollers/machine/matrixportal-m4/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/matrixportal-m4/ Constants const ( // Pin // Function SERCOM PWM Interrupt // ---- // ---------------- ------ --- --------- D0 = PA01 // UART RX 1[1] PWM EXTI1 D1 = PA00 // UART TX 1[0] PWM EXTI0 D2 = PB22 // Button "Up" EXTI6 D3 = PB23 // Button "Down" EXTI7 D4 = PA23 // NeoPixel EXTI7 D5 = PB31 // I2C SDA 5[1] EXTI15 D6 = PB30 // I2C SCL 5[0] EXTI14 D7 = PB00 // HUB75 R1 EXTI0 D8 = PB01 // HUB75 G1 EXTI1 D9 = PB02 // HUB75 B1 EXTI2 D10 = PB03 // HUB75 R2 EXTI3 D11 = PB04 // HUB75 G2 EXTI4 D12 = PB05 // HUB75 B2 EXTI5 D13 = PA14 // LED PWM EXTI14 D14 = PB06 // HUB75 CLK EXTI6 D15 = PB14 // HUB75 LAT EXTI14 D16 = PB12 // HUB75 OE EXTI12 D17 = PB07 // HUB75 ADDR A EXTI7 D18 = PB08 // HUB75 ADDR B EXTI8 D19 = PB09 // HUB75 ADDR C EXTI9 D20 = PB15 // HUB75 ADDR D EXTI15 D21 = PB13 // HUB75 ADDR E EXTI13 D22 = PA02 // ADC (A0) EXTI2 D23 = PA05 // ADC (A1) EXTI5 D24 = PA04 // ADC (A2) PWM EXTI4 D25 = PA06 // ADC (A3) PWM EXTI6 D26 = PA07 // ADC (A4) EXTI7 D27 = PA12 // ESP32 UART RX 4[1] PWM EXTI12 D28 = PA13 // ESP32 UART TX 4[0] PWM EXTI13 D29 = PA20 // ESP32 GPIO0 PWM EXTI4 D30 = PA21 // ESP32 Reset PWM EXTI5 D31 = PA22 // ESP32 Busy PWM EXTI6 D32 = PA18 // ESP32 RTS PWM EXTI2 D33 = PB17 // ESP32 SPI CS PWM EXTI1 D34 = PA16 // ESP32 SPI SCK 3[1] PWM EXTI0 D35 = PA17 // ESP32 SPI SDI 3[0] PWM EXTI1 D36 = PA19 // ESP32 SPI SDO 1[3] PWM EXTI3 D37 = NoPin // USB Host enable D38 = PA24 // USB DM D39 = PA25 // USB DP D40 = PA03 // DAC/VREFP D41 = PB10 // Flash QSPI SCK D42 = PB11 // Flash QSPI CS D43 = PA08 // Flash QSPI I00 D44 = PA09 // Flash QSPI IO1 D45 = PA10 // Flash QSPI IO2 D46 = PA11 // Flash QSPI IO3 D47 = PA27 // LIS3DH IRQ EXTI11 D48 = PA05 // SPI SCK 0[1] EXTI5 D49 = PA04 // SPI SDO 0[0] PWM EXTI4 D50 = PA07 // SPI SDI 0[3] EXTI7 ) Digital pins metro-m4-airlift https://tinygo.org/docs/reference/microcontrollers/machine/metro-m4-airlift/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/metro-m4-airlift/ Constants const ( D0 = PA23 // UART0 RX/PWM available D1 = PA22 // UART0 TX/PWM available D2 = PB17 // PWM available D3 = PB16 // PWM available D4 = PB13 // PWM available D5 = PB14 // PWM available D6 = PB15 // PWM available D7 = PB12 // PWM available D8 = PA21 // PWM available D9 = PA20 // PWM available D10 = PA18 // can be used for PWM or UART1 TX D11 = PA19 // can be used for PWM or UART1 RX D12 = PA17 // PWM available D13 = PA16 // PWM available D40 = PB22 // built-in neopixel ) GPIO Pins microbit https://tinygo.org/docs/reference/microcontrollers/machine/microbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/microbit/ Constants const HasLowFrequencyCrystal = false The micro:bit does not have a 32kHz crystal on board. const ( P0 = P0_03 P1 = P0_02 P2 = P0_01 P3 = P0_04 P4 = P0_05 P5 = P0_17 P6 = P0_12 P7 = P0_11 P8 = P0_18 P9 = P0_10 P10 = P0_06 P11 = P0_26 P12 = P0_20 P13 = P0_23 P14 = P0_22 P15 = P0_21 P16 = P0_16 ) GPIO/Analog pins nano-33-ble https://tinygo.org/docs/reference/microcontrollers/machine/nano-33-ble/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nano-33-ble/ Constants const HasLowFrequencyCrystal = true const ( D2 Pin = P1_11 D3 Pin = P1_12 D4 Pin = P1_15 D5 Pin = P1_13 D6 Pin = P1_14 D7 Pin = P0_23 D8 Pin = P0_21 D9 Pin = P0_27 D10 Pin = P1_02 D11 Pin = P1_01 D12 Pin = P1_08 D13 Pin = P0_13 ) Digital Pins const ( A0 Pin = P0_04 A1 Pin = P0_05 A2 Pin = P0_30 A3 Pin = P0_29 A4 Pin = P0_31 A5 Pin = P0_02 A6 Pin = P0_28 A7 Pin = P0_03 ) Analog pins nano-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/nano-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nano-rp2040/ Constants const ( D2 Pin = GPIO25 D3 Pin = GPIO15 D4 Pin = GPIO16 D5 Pin = GPIO17 D6 Pin = GPIO18 D7 Pin = GPIO19 D8 Pin = GPIO20 D9 Pin = GPIO21 D10 Pin = GPIO5 D11 Pin = GPIO7 D12 Pin = GPIO4 D13 Pin = GPIO6 D14 Pin = GPIO26 D15 Pin = GPIO27 D16 Pin = GPIO28 D17 Pin = GPIO29 D18 Pin = GPIO12 D19 Pin = GPIO13 ) Digital Pins nicenano https://tinygo.org/docs/reference/microcontrollers/machine/nicenano/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nicenano/ Constants const HasLowFrequencyCrystal = true const ( D006 = P0_06 D008 = P0_08 D017 = P0_17 D020 = P0_20 D022 = P0_22 D024 = P0_24 D100 = P1_00 D011 = P0_11 D104 = P1_04 D106 = P1_06 D004 = P0_04 // AIN2; P0.04 (AIN2) is used to read the voltage of the battery via ADC. It can’t be used for any other function. D013 = P0_13 // VCC 3.3V; P0.13 on VCC shuts off the power to VCC when you set it to high; This saves on battery immensely for LEDs of all kinds that eat power even when off D115 = P1_15 D113 = P1_13 D031 = P0_31 // AIN7 D029 = P0_29 // AIN5 D002 = P0_02 // AIN0 D111 = P1_11 D010 = P0_10 // NFC2 D009 = P0_09 // NFC1 D026 = P0_26 D012 = P0_12 D101 = P1_01 D102 = P1_02 D107 = P1_07 ) GPIO Pins nodemcu https://tinygo.org/docs/reference/microcontrollers/machine/nodemcu/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nodemcu/ Constants const ( D0 = GPIO16 D1 = GPIO5 D2 = GPIO4 D3 = GPIO0 D4 = GPIO2 D5 = GPIO14 D6 = GPIO12 D7 = GPIO13 D8 = GPIO15 ) GPIO pins on the NodeMCU board. const LED = D4 Onboard blue LED (on the AI-Thinker module). const ( SPI0_SCK_PIN = D5 SPI0_SDO_PIN = D7 SPI0_SDI_PIN = D6 SPI0_CS0_PIN = D8 ) SPI pins const ( SDA_PIN = D2 SCL_PIN = D1 ) I2C pins nrf52840-mdk https://tinygo.org/docs/reference/microcontrollers/machine/nrf52840-mdk/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nrf52840-mdk/ Constants const HasLowFrequencyCrystal = true const ( LED_GREEN Pin = 22 LED_RED Pin = 23 LED_BLUE Pin = 24 LED Pin = LED_GREEN ) LEDs on the nrf52840-mdk (nRF52840 dev board) const ( UART_TX_PIN Pin = 20 UART_RX_PIN Pin = 19 ) UART pins const ( SDA_PIN = NoPin SCL_PIN = NoPin ) I2C pins (unused) const ( SPI0_SCK_PIN = NoPin SPI0_SDO_PIN = NoPin SPI0_SDI_PIN = NoPin ) SPI pins (unused) nrf52840-mdk-usb-dongle https://tinygo.org/docs/reference/microcontrollers/machine/nrf52840-mdk-usb-dongle/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nrf52840-mdk-usb-dongle/ Constants const HasLowFrequencyCrystal = true const ( LED Pin = LED_GREEN LED_GREEN Pin = 22 LED_RED Pin = 23 LED_BLUE Pin = 24 ) LEDs on the nrf52840-mdk-usb-dongle const ( BUTTON Pin = 18 ) RESET/USR button, depending on value of PSELRESET UICR register const ( UART_TX_PIN Pin = NoPin UART_RX_PIN Pin = NoPin ) UART pins const ( SDA_PIN = NoPin SCL_PIN = NoPin ) I2C pins (unused) const ( SPI0_SCK_PIN = NoPin SPI0_SDO_PIN = NoPin SPI0_SDI_PIN = NoPin ) SPI pins (unused) nucleo-f103rb https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-f103rb/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-f103rb/ Constants const ( LED = LED_BUILTIN LED_BUILTIN = LED_GREEN LED_GREEN = PA5 ) const ( BUTTON = BUTTON_USER BUTTON_USER = PC13 ) const ( UART_TX_PIN = PA2 UART_RX_PIN = PA3 UART_ALT_TX_PIN = PD5 UART_ALT_RX_PIN = PD6 ) UART pins const ( SPI0_SCK_PIN = PA5 SPI0_SDI_PIN = PA6 SPI0_SDO_PIN = PA7 ) SPI pins const ( I2C0_SCL_PIN = PB6 I2C0_SDA_PIN = PB7 ) I2C pins const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. nucleo-f722ze https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-f722ze/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-f722ze/ Constants const ( LED = LED_BUILTIN LED_BUILTIN = LED_GREEN LED_GREEN = PB0 LED_BLUE = PB7 LED_RED = PB14 ) const ( BUTTON = BUTTON_USER BUTTON_USER = PC13 ) const ( // PD8 and PD9 are connected to the ST-Link Virtual Com Port (VCP) UART_TX_PIN = PD8 UART_RX_PIN = PD9 UART_ALT_FN = 7 // GPIO_AF7_UART3 ) UART pins const ( SPI0_SCK_PIN = PA5 SPI0_SDI_PIN = PA6 SPI0_SDO_PIN = PA7 ) SPI pins nucleo-l031k6 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l031k6/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l031k6/ Constants const ( // Arduino Pins A0 = PA0 // ADC_IN0 A1 = PA1 // ADC_IN1 A2 = PA3 // ADC_IN3 A3 = PA4 // ADC_IN4 A4 = PA5 // ADC_IN5 || I2C1_SDA A5 = PA6 // ADC_IN6 || I2C1_SCL A6 = PA7 // ADC_IN7 A7 = PA2 // ADC_IN2 D0 = PA10 // USART1_TX D1 = PA9 // USART1_RX D2 = PA12 D3 = PB0 // TIM2_CH3 D4 = PB7 D5 = PB6 // TIM16_CH1N D6 = PB1 // TIM14_CH1 D9 = PA8 // TIM1_CH1 D10 = PA11 // SPI_CS || TIM1_CH4 D11 = PB5 // SPI1_MOSI || TIM3_CH2 D12 = PB4 // SPI1_MISO D13 = PB3 // SPI1_SCK ) const ( LED = LED_BUILTIN LED_BUILTIN = LED_GREEN LED_GREEN = PB3 ) const ( // This board does not have a user button, so // use first GPIO pin by default BUTTON = PA0 ) const ( // UART pins // PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP) UART_TX_PIN = PA2 UART_RX_PIN = PA15 // SPI SPI1_SCK_PIN = PB3 SPI1_SDI_PIN = PB5 SPI1_SDO_PIN = PB4 SPI0_SCK_PIN = SPI1_SCK_PIN SPI0_SDI_PIN = SPI1_SDI_PIN SPI0_SDO_PIN = SPI1_SDO_PIN // I2C pins // PB6 and PB7 are mapped to CN4 pin 7 and CN4 pin 8 respectively with the // default solder bridge settings I2C0_SCL_PIN = PB7 I2C0_SDA_PIN = PB6 I2C0_ALT_FUNC = 1 ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. nucleo-l432kc https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l432kc/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l432kc/ Constants const ( // Arduino Pins A0 = PA0 A1 = PA1 A2 = PA3 A3 = PA4 A4 = PA5 A5 = PA6 A6 = PA7 A7 = PA2 D0 = PA10 D1 = PA9 D2 = PA12 D3 = PB0 D4 = PB7 D5 = PB6 D6 = PB1 D7 = PC14 D8 = PC15 D9 = PA8 D10 = PA11 D11 = PB5 D12 = PB4 D13 = PB3 ) const ( LED = LED_BUILTIN LED_BUILTIN = LED_GREEN LED_GREEN = PB3 ) const ( // This board does not have a user button, so // use first GPIO pin by default BUTTON = PA0 ) const ( // UART pins // PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP) UART_TX_PIN = PA2 UART_RX_PIN = PA15 // I2C pins // With default solder bridge settings: // PB6 / Arduino D5 / CN3 Pin 8 is SCL // PB7 / Arduino D4 / CN3 Pin 7 is SDA I2C0_SCL_PIN = PB6 I2C0_SDA_PIN = PB7 // SPI pins SPI1_SCK_PIN = PB3 SPI1_SDI_PIN = PB5 SPI1_SDO_PIN = PB4 SPI0_SCK_PIN = SPI1_SCK_PIN SPI0_SDI_PIN = SPI1_SDI_PIN SPI0_SDO_PIN = SPI1_SDO_PIN ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. nucleo-l552ze https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l552ze/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-l552ze/ Constants const ( LED_GREEN = PC7 LED_BLUE = PB7 LED_RED = PA9 LED_BUILTIN = LED_GREEN LED = LED_BUILTIN ) const ( BUTTON = BUTTON_USER BUTTON_USER = PC13 ) const ( // PG7 and PG8 are connected to the ST-Link Virtual Com Port (VCP) UART_TX_PIN = PG7 UART_RX_PIN = PG8 UART_ALT_FN = 8 // GPIO_AF8_LPUART1 ) UART pins const ( I2C0_SCL_PIN = PB8 I2C0_SDA_PIN = PB9 ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. nucleo-wl55jc https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-wl55jc/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/nucleo-wl55jc/ Constants const ( LED_BLUE = PB15 LED_GREEN = PB9 LED_RED = PB11 LED = LED_RED BTN1 = PA0 BTN2 = PA1 BTN3 = PC6 BUTTON = BTN1 // SubGhz (SPI3) SPI0_NSS_PIN = PA4 SPI0_SCK_PIN = PA5 SPI0_SDO_PIN = PA6 SPI0_SDI_PIN = PA7 //MCU USART1 UART1_TX_PIN = PB6 UART1_RX_PIN = PB7 //MCU USART2 UART2_RX_PIN = PA3 UART2_TX_PIN = PA2 // DEFAULT USART UART_RX_PIN = UART2_RX_PIN UART_TX_PIN = UART2_TX_PIN // I2C1 pins I2C1_SCL_PIN = PA9 I2C1_SDA_PIN = PA10 I2C1_ALT_FUNC = 4 // I2C2 pins I2C2_SCL_PIN = PA12 I2C2_SDA_PIN = PA11 I2C2_ALT_FUNC = 4 // I2C0 alias for I2C1 I2C0_SDA_PIN = I2C1_SDA_PIN I2C0_SCL_PIN = I2C1_SCL_PIN ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. p1am-100 https://tinygo.org/docs/reference/microcontrollers/machine/p1am-100/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/p1am-100/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins Packages supported by TinyGo https://tinygo.org/docs/reference/lang-support/stdlib/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/lang-support/stdlib/ The following table shows all Go standard library packages and whether they can be imported by TinyGo. If they can’t, you can click the ’no’ link to jump to the explanation why the package cannot be compiled. Note that the fact they can be imported, does not mean that all functions and types in the program can be used. For example, sometimes using some functions or types of the package will still trigger compiler errors. particle-argon https://tinygo.org/docs/reference/microcontrollers/machine/particle-argon/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/particle-argon/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins particle-boron https://tinygo.org/docs/reference/microcontrollers/machine/particle-boron/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/particle-boron/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins particle-xenon https://tinygo.org/docs/reference/microcontrollers/machine/particle-xenon/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/particle-xenon/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins pca10031 https://tinygo.org/docs/reference/microcontrollers/machine/pca10031/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pca10031/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 ) Hardware pins pca10040 https://tinygo.org/docs/reference/microcontrollers/machine/pca10040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pca10040/ Constants const HasLowFrequencyCrystal = true The PCA10040 has a low-frequency (32kHz) crystal oscillator on board. const ( LED1 Pin = 17 LED2 Pin = 18 LED3 Pin = 19 LED4 Pin = 20 LED Pin = LED1 ) LEDs on the PCA10040 (nRF52832 dev board) const ( BUTTON1 Pin = 13 BUTTON2 Pin = 14 BUTTON3 Pin = 15 BUTTON4 Pin = 16 BUTTON Pin = BUTTON1 ) Buttons on the PCA10040 (nRF52832 dev board) pca10056 https://tinygo.org/docs/reference/microcontrollers/machine/pca10056/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pca10056/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins pca10059 https://tinygo.org/docs/reference/microcontrollers/machine/pca10059/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pca10059/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins pico https://tinygo.org/docs/reference/microcontrollers/machine/pico/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pico/ Constants const ( GP0 Pin = GPIO0 GP1 Pin = GPIO1 GP2 Pin = GPIO2 GP3 Pin = GPIO3 GP4 Pin = GPIO4 GP5 Pin = GPIO5 GP6 Pin = GPIO6 GP7 Pin = GPIO7 GP8 Pin = GPIO8 GP9 Pin = GPIO9 GP10 Pin = GPIO10 GP11 Pin = GPIO11 GP12 Pin = GPIO12 GP13 Pin = GPIO13 GP14 Pin = GPIO14 GP15 Pin = GPIO15 GP16 Pin = GPIO16 GP17 Pin = GPIO17 GP18 Pin = GPIO18 GP19 Pin = GPIO19 GP20 Pin = GPIO20 GP21 Pin = GPIO21 GP22 Pin = GPIO22 GP26 Pin = GPIO26 GP27 Pin = GPIO27 GP28 Pin = GPIO28 // Onboard LED LED Pin = GPIO25 // Onboard crystal oscillator frequency, in MHz. pico-w https://tinygo.org/docs/reference/microcontrollers/machine/pico-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pico-w/ Constants const ( GP0 Pin = GPIO0 GP1 Pin = GPIO1 GP2 Pin = GPIO2 GP3 Pin = GPIO3 GP4 Pin = GPIO4 GP5 Pin = GPIO5 GP6 Pin = GPIO6 GP7 Pin = GPIO7 GP8 Pin = GPIO8 GP9 Pin = GPIO9 GP10 Pin = GPIO10 GP11 Pin = GPIO11 GP12 Pin = GPIO12 GP13 Pin = GPIO13 GP14 Pin = GPIO14 GP15 Pin = GPIO15 GP16 Pin = GPIO16 GP17 Pin = GPIO17 GP18 Pin = GPIO18 GP19 Pin = GPIO19 GP20 Pin = GPIO20 GP21 Pin = GPIO21 GP22 Pin = GPIO22 GP26 Pin = GPIO26 GP27 Pin = GPIO27 GP28 Pin = GPIO28 // Onboard LED LED Pin = GPIO25 // Onboard crystal oscillator frequency, in MHz. pico2 https://tinygo.org/docs/reference/microcontrollers/machine/pico2/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pico2/ Constants const ( GP0 Pin = GPIO0 GP1 Pin = GPIO1 GP2 Pin = GPIO2 GP3 Pin = GPIO3 GP4 Pin = GPIO4 GP5 Pin = GPIO5 GP6 Pin = GPIO6 GP7 Pin = GPIO7 GP8 Pin = GPIO8 GP9 Pin = GPIO9 GP10 Pin = GPIO10 GP11 Pin = GPIO11 GP12 Pin = GPIO12 GP13 Pin = GPIO13 GP14 Pin = GPIO14 GP15 Pin = GPIO15 GP16 Pin = GPIO16 GP17 Pin = GPIO17 GP18 Pin = GPIO18 GP19 Pin = GPIO19 GP20 Pin = GPIO20 GP21 Pin = GPIO21 GP22 Pin = GPIO22 GP26 Pin = GPIO26 GP27 Pin = GPIO27 GP28 Pin = GPIO28 // Onboard LED LED Pin = GPIO25 // Onboard crystal oscillator frequency, in MHz. pico2-w https://tinygo.org/docs/reference/microcontrollers/machine/pico2-w/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pico2-w/ Constants const ( GP0 Pin = GPIO0 GP1 Pin = GPIO1 GP2 Pin = GPIO2 GP3 Pin = GPIO3 GP4 Pin = GPIO4 GP5 Pin = GPIO5 GP6 Pin = GPIO6 GP7 Pin = GPIO7 GP8 Pin = GPIO8 GP9 Pin = GPIO9 GP10 Pin = GPIO10 GP11 Pin = GPIO11 GP12 Pin = GPIO12 GP13 Pin = GPIO13 GP14 Pin = GPIO14 GP15 Pin = GPIO15 GP16 Pin = GPIO16 GP17 Pin = GPIO17 GP18 Pin = GPIO18 GP19 Pin = GPIO19 GP20 Pin = GPIO20 GP21 Pin = GPIO21 GP22 Pin = GPIO22 GP26 Pin = GPIO26 GP27 Pin = GPIO27 GP28 Pin = GPIO28 // Onboard LED LED Pin = GPIO25 // Onboard crystal oscillator frequency, in MHz. pinetime-devkit0 https://tinygo.org/docs/reference/microcontrollers/machine/pinetime-devkit0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pinetime-devkit0/ Constants const HasLowFrequencyCrystal = true The PineTime has a low-frequency (32kHz) crystal oscillator on board. const ( LED1 = LCD_BACKLIGHT_HIGH LED2 = LCD_BACKLIGHT_MID LED3 = LCD_BACKLIGHT_LOW LED = LED1 ) LEDs simply expose the three brightness level LEDs on the PineTime. They can be useful for simple “hello world” style programs. const ( UART_TX_PIN Pin = 11 // TP29 (TXD) UART_RX_PIN Pin = NoPin ) UART pins for PineTime. Note that RX is set to NoPin as RXD is not listed in the PineTime schematic 1. Porting code to TinyGo https://tinygo.org/docs/guides/compatibility/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/guides/compatibility/ TinyGo tries to stay compatible with the gc compiler toolchain. It should over time become more and more compatible as new features are implemented. However, if you’re porting existing code over then you may encounter a number of issues. Serialization and deserialization TinyGo does have limited support for the reflect package, but it is not complete. This is especially noticeable with serialization/deserialization packages such as encoding/json. How to fix Your best bet is is to use a different package than the standard library package. pybadge https://tinygo.org/docs/reference/microcontrollers/machine/pybadge/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pybadge/ Constants const ( D0 = PB17 // UART0 RX/PWM available D1 = PB16 // UART0 TX/PWM available D2 = PB03 D3 = PB02 D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available D7 = PB14 D8 = PA15 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX D11 = PA21 // can be used for PWM or UART1 RX D12 = PA22 // PWM available D13 = PA23 // PWM available ) GPIO Pins pygamer https://tinygo.org/docs/reference/microcontrollers/machine/pygamer/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pygamer/ Constants const ( D0 = PB17 // UART0 RX/PWM available D1 = PB16 // UART0 TX/PWM available D2 = PB03 D3 = PB02 D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available D7 = PB14 // CS for microSD card slot D8 = PA15 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX D11 = PA21 // can be used for PWM or UART1 RX D12 = PA22 // PWM available D13 = PA23 // PWM available ) GPIO Pins pyportal https://tinygo.org/docs/reference/microcontrollers/machine/pyportal/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/pyportal/ Constants const ( D0 = PB13 // NINA_RX D1 = PB12 // NINA_TX D2 = PB22 // built-in neopixel D3 = PA04 // PWM available D4 = PA05 // PWM available D5 = PB16 // NINA_ACK D6 = PB15 // NINA_GPIO0 D7 = PB17 // NINA_RESETN D8 = PB14 // NINA_CS D9 = PB04 // TFT_RD D10 = PB05 // TFT_DC D11 = PB06 // TFT_CS D12 = PB07 // TFT_TE D13 = PB23 // built-in LED D24 = PA00 // TFT_RESET D25 = PB31 // TFT_BACKLIGHT D26 = PB09 // TFT_WR D27 = PB02 // SDA D28 = PB03 // SCL D29 = PA12 // SDO D30 = PA13 // SCK D31 = PA14 // SDI D32 = PB30 // SD_CS D33 = PA01 // SD_CARD_DETECT D34 = PA16 // LCD_DATA0 D35 = PA17 // LCD_DATA1 D36 = PA18 // LCD_DATA2 D37 = PA19 // LCD_DATA3 D38 = PA20 // LCD_DATA4 D39 = PA21 // LCD_DATA5 D40 = PA22 // LCD_DATA6 D41 = PA23 // LCD_DATA7 D42 = PB10 // QSPI D43 = PB11 // QSPI D44 = PA08 // QSPI D45 = PA09 // QSPI D46 = PA10 // QSPI D47 = PA11 // QSPI D50 = PA02 // speaker amplifier shutdown D51 = PA15 // NINA_RTS NINA_CS = D8 NINA_ACK = D5 NINA_GPIO0 = D6 NINA_RESETN = D7 // pins used for the ESP32 connection do not allow hardware // flow control, which is required. qtpy https://tinygo.org/docs/reference/microcontrollers/machine/qtpy/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/qtpy/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins qtpy-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/qtpy-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/qtpy-rp2040/ Constants const ( SDA = GPIO24 SCL = GPIO25 TX = GPIO20 MO = GPIO3 MOSI = GPIO3 MI = GPIO4 MISO = GPIO4 SCK = GPIO6 RX = GPIO5 QT_SCL1 = GPIO23 QT_SDA1 = GPIO22 ) GPIO Pins const ( A0 = GPIO29 A1 = GPIO28 A2 = GPIO27 A3 = GPIO26 ) Analog pins const ( NEOPIXEL = GPIO12 WS2812 = GPIO12 NEOPIXEL_POWER = GPIO11 ) const ( I2C0_SDA_PIN = GPIO24 I2C0_SCL_PIN = GPIO25 I2C1_SDA_PIN = GPIO26 I2C1_SCL_PIN = GPIO27 I2C1_QT_SDA_PIN = GPIO22 I2C1_QT_SCL_PIN = GPIO23 SDA_PIN = GPIO24 SCL_PIN = GPIO25 ) I2C Pins. reelboard https://tinygo.org/docs/reference/microcontrollers/machine/reelboard/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/reelboard/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins Search Results https://tinygo.org/search/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/search/ stm32f4disco https://tinygo.org/docs/reference/microcontrollers/machine/stm32f4disco/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/stm32f4disco/ Constants const ( LED1 = LED_GREEN LED2 = LED_ORANGE LED3 = LED_RED LED4 = LED_BLUE LED_GREEN = PD12 LED_ORANGE = PD13 LED_RED = PD14 LED_BLUE = PD15 LED = LED_BUILTIN LED_BUILTIN = LED_GREEN ) const ( BUTTON = PA0 ) const ( ADC0 = PA0 ADC1 = PA1 ADC2 = PA2 ADC3 = PA3 ADC4 = PA4 ADC5 = PA5 ADC6 = PA6 ADC7 = PA7 ADC8 = PB0 ADC9 = PB1 ADC10 = PC0 ADC11 = PC1 ADC12 = PC2 ADC13 = PC3 ADC14 = PC4 ADC15 = PC5 ) Analog Pins swan https://tinygo.org/docs/reference/microcontrollers/machine/swan/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/swan/ Constants const ( // LED on the SWAN LED = PE2 // UART pins // PA9 and PA10 are connected to the SWAN Tx/Rx UART_TX_PIN = PA9 UART_RX_PIN = PA10 // I2C pins // PB6 is SCL // PB7 is SDA I2C0_SCL_PIN = PB6 I2C0_SDA_PIN = PB7 // SPI pins SPI1_SCK_PIN = PD1 SPI1_SDI_PIN = PB14 SPI1_SDO_PIN = PB15 SPI0_SCK_PIN = SPI1_SCK_PIN SPI0_SDI_PIN = SPI1_SDI_PIN SPI0_SDO_PIN = SPI1_SDO_PIN ) const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. teensy36 https://tinygo.org/docs/reference/microcontrollers/machine/teensy36/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/teensy36/ Constants const ( D00 = PB16 D01 = PB17 D02 = PD00 D03 = PA12 D04 = PA13 D05 = PD07 D06 = PD04 D07 = PD02 D08 = PD03 D09 = PC03 D10 = PC04 D11 = PC06 D12 = PC07 D13 = PC05 D14 = PD01 D15 = PC00 D16 = PB00 D17 = PB01 D18 = PB03 D19 = PB02 D20 = PD05 D21 = PD06 D22 = PC01 D23 = PC02 D24 = PE26 D25 = PA05 D26 = PA14 D27 = PA15 D28 = PA16 D29 = PB18 D30 = PB19 D31 = PB10 D32 = PB11 D33 = PE24 D34 = PE25 D35 = PC08 D36 = PC09 D37 = PC10 D38 = PC11 D39 = PA17 D40 = PA28 D41 = PA29 D42 = PA26 D43 = PB20 D44 = PB22 D45 = PB23 D46 = PB21 D47 = PD08 D48 = PD09 D49 = PB04 D50 = PB05 D51 = PD14 D52 = PD13 D53 = PD12 D54 = PD15 D55 = PD11 D56 = PE10 D57 = PE11 D58 = PE00 D59 = PE01 D60 = PE02 D61 = PE03 D62 = PE04 D63 = PE05 ) digital IO teensy40 https://tinygo.org/docs/reference/microcontrollers/machine/teensy40/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/teensy40/ Constants const ( // = Pin // [Pad]: Alt Func 0 Alt Func 1 Alt Func 2 Alt Func 3 Alt Func 4 Alt Func 5 Alt Func 6 Alt Func 7 Alt Func 8 Alt Func 9 // = ---- ----------- --------------- --------------- --------------- -------------- -------------------- ---------- -------------------- --------------------- --------------------- ---------------- D0 = PA3 // [AD_B0_03]: FLEXCAN2_RX XBAR1_INOUT17 LPUART6_RX USB_OTG1_OC FLEXPWM1_PWMX01 GPIO1_IO03 REF_CLK_24M LPSPI3_PCS0 ~ ~ D1 = PA2 // [AD_B0_02]: FLEXCAN2_TX XBAR1_INOUT16 LPUART6_TX USB_OTG1_PWR FLEXPWM1_PWMX00 GPIO1_IO02 LPI2C1_HREQ LPSPI3_SDI ~ ~ D2 = PD4 // [EMC_04]: SEMC_DATA04 FLEXPWM4_PWMA02 SAI2_TX_DATA XBAR1_INOUT06 FLEXIO1_FLEXIO04 GPIO4_IO04 ~ ~ ~ ~ D3 = PD5 // [EMC_05]: SEMC_DATA05 FLEXPWM4_PWMB02 SAI2_TX_SYNC XBAR1_INOUT07 FLEXIO1_FLEXIO05 GPIO4_IO05 ~ ~ ~ ~ D4 = PD6 // [EMC_06]: SEMC_DATA06 FLEXPWM2_PWMA00 SAI2_TX_BCLK XBAR1_INOUT08 FLEXIO1_FLEXIO06 GPIO4_IO06 ~ ~ ~ ~ D5 = PD8 // [EMC_08]: SEMC_DM00 FLEXPWM2_PWMA01 SAI2_RX_DATA XBAR1_INOUT17 FLEXIO1_FLEXIO08 GPIO4_IO08 ~ ~ ~ ~ D6 = PB10 // [B0_10]: LCD_DATA06 QTIMER4_TIMER1 FLEXPWM2_PWMA02 SAI1_TX_DATA03 FLEXIO2_FLEXIO10 GPIO2_IO10 SRC_BOOT_CFG06 ENET2_CRS ~ ~ D7 = PB17 // [B1_01]: LCD_DATA13 XBAR1_INOUT15 LPUART4_RX SAI1_TX_DATA00 FLEXIO2_FLEXIO17 GPIO2_IO17 FLEXPWM1_PWMB03 ENET2_RDATA00 FLEXIO3_FLEXIO17 ~ D8 = PB16 // [B1_00]: LCD_DATA12 XBAR1_INOUT14 LPUART4_TX SAI1_RX_DATA00 FLEXIO2_FLEXIO16 GPIO2_IO16 FLEXPWM1_PWMA03 ENET2_RX_ER FLEXIO3_FLEXIO16 ~ D9 = PB11 // [B0_11]: LCD_DATA07 QTIMER4_TIMER2 FLEXPWM2_PWMB02 SAI1_TX_DATA02 FLEXIO2_FLEXIO11 GPIO2_IO11 SRC_BOOT_CFG07 ENET2_COL ~ ~ D10 = PB0 // [B0_00]: LCD_CLK QTIMER1_TIMER0 MQS_RIGHT LPSPI4_PCS0 FLEXIO2_FLEXIO00 GPIO2_IO00 SEMC_CSX01 ENET2_MDC ~ ~ D11 = PB2 // [B0_02]: LCD_HSYNC QTIMER1_TIMER2 FLEXCAN1_TX LPSPI4_SDO FLEXIO2_FLEXIO02 GPIO2_IO02 SEMC_CSX03 ENET2_1588_EVENT0_OUT ~ ~ D12 = PB1 // [B0_01]: LCD_ENABLE QTIMER1_TIMER1 MQS_LEFT LPSPI4_SDI FLEXIO2_FLEXIO01 GPIO2_IO01 SEMC_CSX02 ENET2_MDIO ~ ~ D13 = PB3 // [B0_03]: LCD_VSYNC QTIMER2_TIMER0 FLEXCAN1_RX LPSPI4_SCK FLEXIO2_FLEXIO03 GPIO2_IO03 WDOG2_RESET_B_DEB ENET2_1588_EVENT0_IN ~ ~ D14 = PA18 // [AD_B1_02]: USB_OTG1_ID QTIMER3_TIMER2 LPUART2_TX SPDIF_OUT ENET_1588_EVENT2_OUT GPIO1_IO18 USDHC1_CD_B KPP_ROW06 GPT2_CLK FLEXIO3_FLEXIO02 D15 = PA19 // [AD_B1_03]: USB_OTG1_OC QTIMER3_TIMER3 LPUART2_RX SPDIF_IN ENET_1588_EVENT2_IN GPIO1_IO19 USDHC2_CD_B KPP_COL06 GPT2_CAPTURE1 FLEXIO3_FLEXIO03 D16 = PA23 // [AD_B1_07]: FLEXSPIB_DATA00 LPI2C3_SCL LPUART3_RX SPDIF_EXT_CLK CSI_HSYNC GPIO1_IO23 USDHC2_DATA3 KPP_COL04 GPT2_COMPARE3 FLEXIO3_FLEXIO07 D17 = PA22 // [AD_B1_06]: FLEXSPIB_DATA01 LPI2C3_SDA LPUART3_TX SPDIF_LOCK CSI_VSYNC GPIO1_IO22 USDHC2_DATA2 KPP_ROW04 GPT2_COMPARE2 FLEXIO3_FLEXIO06 D18 = PA17 // [AD_B1_01]: USB_OTG1_PWR QTIMER3_TIMER1 LPUART2_RTS_B LPI2C1_SDA CCM_PMIC_READY GPIO1_IO17 USDHC1_VSELECT KPP_COL07 ENET2_1588_EVENT0_IN FLEXIO3_FLEXIO01 D19 = PA16 // [AD_B1_00]: USB_OTG2_ID QTIMER3_TIMER0 LPUART2_CTS_B LPI2C1_SCL WDOG1_B GPIO1_IO16 USDHC1_WP KPP_ROW07 ENET2_1588_EVENT0_OUT FLEXIO3_FLEXIO00 D20 = PA26 // [AD_B1_10]: FLEXSPIA_DATA03 WDOG1_B LPUART8_TX SAI1_RX_SYNC CSI_DATA07 GPIO1_IO26 USDHC2_WP KPP_ROW02 ENET2_1588_EVENT1_OUT FLEXIO3_FLEXIO10 D21 = PA27 // [AD_B1_11]: FLEXSPIA_DATA02 EWM_OUT_B LPUART8_RX SAI1_RX_BCLK CSI_DATA06 GPIO1_IO27 USDHC2_RESET_B KPP_COL02 ENET2_1588_EVENT1_IN FLEXIO3_FLEXIO11 D22 = PA24 // [AD_B1_08]: FLEXSPIA_SS1_B FLEXPWM4_PWMA00 FLEXCAN1_TX CCM_PMIC_READY CSI_DATA09 GPIO1_IO24 USDHC2_CMD KPP_ROW03 FLEXIO3_FLEXIO08 ~ D23 = PA25 // [AD_B1_09]: FLEXSPIA_DQS FLEXPWM4_PWMA01 FLEXCAN1_RX SAI1_MCLK CSI_DATA08 GPIO1_IO25 USDHC2_CLK KPP_COL03 FLEXIO3_FLEXIO09 ~ D24 = PA12 // [AD_B0_12]: LPI2C4_SCL CCM_PMIC_READY LPUART1_TX WDOG2_WDOG_B FLEXPWM1_PWMX02 GPIO1_IO12 ENET_1588_EVENT1_OUT NMI_GLUE_NMI ~ ~ D25 = PA13 // [AD_B0_13]: LPI2C4_SDA GPT1_CLK LPUART1_RX EWM_OUT_B FLEXPWM1_PWMX03 GPIO1_IO13 ENET_1588_EVENT1_IN REF_CLK_24M ~ ~ D26 = PA30 // [AD_B1_14]: FLEXSPIA_SCLK ACMP_OUT02 LPSPI3_SDO SAI1_TX_BCLK CSI_DATA03 GPIO1_IO30 USDHC2_DATA6 KPP_ROW00 ENET2_1588_EVENT3_OUT FLEXIO3_FLEXIO14 D27 = PA31 // [AD_B1_15]: FLEXSPIA_SS0_B ACMP_OUT03 LPSPI3_SCK SAI1_TX_SYNC CSI_DATA02 GPIO1_IO31 USDHC2_DATA7 KPP_COL00 ENET2_1588_EVENT3_IN FLEXIO3_FLEXIO15 D28 = PC18 // [EMC_32]: SEMC_DATA10 FLEXPWM3_PWMB01 LPUART7_RX CCM_PMIC_RDY CSI_DATA21 GPIO3_IO18 ENET2_TX_EN ~ ~ ~ D29 = PD31 // [EMC_31]: SEMC_DATA09 FLEXPWM3_PWMA01 LPUART7_TX LPSPI1_PCS1 CSI_DATA22 GPIO4_IO31 ENET2_TDATA01 ~ ~ ~ D30 = PC23 // [EMC_37]: SEMC_DATA15 XBAR1_IN23 GPT1_COMPARE3 SAI3_MCLK CSI_DATA16 GPIO3_IO23 USDHC2_WP ENET2_RX_EN FLEXCAN3_RX ~ D31 = PC22 // [EMC_36]: SEMC_DATA14 XBAR1_IN22 GPT1_COMPARE2 SAI3_TX_DATA CSI_DATA17 GPIO3_IO22 USDHC1_WP ENET2_RDATA01 FLEXCAN3_TX ~ D32 = PB12 // [B0_12]: LCD_DATA08 XBAR1_INOUT10 ARM_TRACE_CLK SAI1_TX_DATA01 FLEXIO2_FLEXIO12 GPIO2_IO12 SRC_BOOT_CFG08 ENET2_TDATA00 ~ ~ D33 = PD7 // [EMC_07]: SEMC_DATA07 FLEXPWM2_PWMB00 SAI2_MCLK XBAR1_INOUT09 FLEXIO1_FLEXIO07 GPIO4_IO07 ~ ~ ~ ~ D34 = PC15 // [SD_B0_03]: USDHC1_DATA1 FLEXPWM1_PWMB01 LPUART8_RTS_B XBAR1_INOUT07 LPSPI1_SDI GPIO3_IO15 ENET2_RDATA00 SEMC_CLK6 ~ ~ D35 = PC14 // [SD_B0_02]: USDHC1_DATA0 FLEXPWM1_PWMA01 LPUART8_CTS_B XBAR1_INOUT06 LPSPI1_SDO GPIO3_IO14 ENET2_RX_ER SEMC_CLK5 ~ ~ D36 = PC13 // [SD_B0_01]: USDHC1_CLK FLEXPWM1_PWMB00 LPI2C3_SDA XBAR1_INOUT05 LPSPI1_PCS0 GPIO3_IO13 FLEXSPIB_SS1_B ENET2_TX_CLK ENET2_REF_CLK2 ~ D37 = PC12 // [SD_B0_00]: USDHC1_CMD FLEXPWM1_PWMA00 LPI2C3_SCL XBAR1_INOUT04 LPSPI1_SCK GPIO3_IO12 FLEXSPIA_SS1_B ENET2_TX_EN SEMC_DQS4 ~ D38 = PC17 // [SD_B0_05]: USDHC1_DATA3 FLEXPWM1_PWMB02 LPUART8_RX XBAR1_INOUT09 FLEXSPIB_DQS GPIO3_IO17 CCM_CLKO2 ENET2_RX_EN ~ ~ D39 = PC16 // [SD_B0_04]: USDHC1_DATA2 FLEXPWM1_PWMA02 LPUART8_TX XBAR1_INOUT08 FLEXSPIB_SS0_B GPIO3_IO16 CCM_CLKO1 ENET2_RDATA01 ~ ~ ) Digital pins thingplus-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/thingplus-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/thingplus-rp2040/ Constants const ( GP0 Pin = GPIO0 // TX GP1 Pin = GPIO1 // RX GP2 Pin = GPIO2 // SCK GP3 Pin = GPIO3 // COPI GP4 Pin = GPIO4 // CIPO GP6 Pin = GPIO6 // SDA GP7 Pin = GPIO7 // SCL (connected to GPIO23 as well) GP8 Pin = GPIO8 // WS2812 RGB LED GP9 Pin = GPIO9 // muSDcard DATA3 / CS GP10 Pin = GPIO10 // muSDcard DATA2 GP11 Pin = GPIO11 // muSDcard DATA1 GP12 Pin = GPIO12 // muSDcard DATA0 / CIPO GP14 Pin = GPIO14 // muSDcard CLK /SCLK GP15 Pin = GPIO15 // muSDcard CMD / COPI GP16 Pin = GPIO16 // 16 GP17 Pin = GPIO17 // 17 GP18 Pin = GPIO18 // 18 GP19 Pin = GPIO19 // 19 GP20 Pin = GPIO20 // 20 GP21 Pin = GPIO21 // 21 GP22 Pin = GPIO22 // 22 GP23 Pin = GPIO23 // Connected to GPIO7 GP25 Pin = GPIO25 // Status blue LED GP26 Pin = GPIO26 // ADC0 GP27 Pin = GPIO27 // ADC1 GP28 Pin = GPIO28 // ADC2 GP29 Pin = GPIO29 // ADC3 ) GPIO Pins Tour https://tinygo.org/getting-started/tour/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/getting-started/tour/ We have a Tour of TinyGo, where you’ll learn how to use TinyGo even if you aren’t very familiar with programming hardware. You can find it here. The tour assumes you are already familiar with Go. If not, you can follow the Tour of Go to get started. trinket-m0 https://tinygo.org/docs/reference/microcontrollers/machine/trinket-m0/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/trinket-m0/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins trinkey-qt2040 https://tinygo.org/docs/reference/microcontrollers/machine/trinkey-qt2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/trinkey-qt2040/ Constants const ( NEOPIXEL = GPIO27 WS2812 = NEOPIXEL ) Onboard LEDs const ( I2C0_SDA_PIN = GPIO16 I2C0_SCL_PIN = GPIO17 I2C1_SDA_PIN = NoPin I2C1_SCL_PIN = NoPin ) I2C pins const ( SPI0_SCK_PIN = NoPin SPI0_SDO_PIN = NoPin SPI0_SDI_PIN = NoPin SPI1_SCK_PIN = NoPin SPI1_SDO_PIN = NoPin SPI1_SDI_PIN = NoPin ) SPI pins const ( UART0_TX_PIN = NoPin UART0_RX_PIN = NoPin UART_TX_PIN = UART0_TX_PIN UART_RX_PIN = UART0_RX_PIN ) UART pins const ( TWI_FREQ_100KHZ = 100000 TWI_FREQ_400KHZ = 400000 ) TWI_FREQ is the I2C bus speed. tufty2040 https://tinygo.org/docs/reference/microcontrollers/machine/tufty2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/tufty2040/ Constants const ( LED Pin = GPIO25 BUTTON_A Pin = GPIO7 BUTTON_B Pin = GPIO8 BUTTON_C Pin = GPIO9 BUTTON_UP Pin = GPIO22 BUTTON_DOWN Pin = GPIO6 BUTTON_USER Pin = GPIO23 LCD_BACKLIGHT Pin = GPIO2 LCD_CS Pin = GPIO10 LCD_DC Pin = GPIO11 LCD_WR Pin = GPIO12 LCD_RD Pin = GPIO13 LCD_DB0 Pin = GPIO14 LCD_DB1 Pin = GPIO15 LCD_DB2 Pin = GPIO16 LCD_DB3 Pin = GPIO17 LCD_DB4 Pin = GPIO18 LCD_DB5 Pin = GPIO19 LCD_DB6 Pin = GPIO20 LCD_DB7 Pin = GPIO21 VBUS_DETECT Pin = GPIO24 BATTERY Pin = GPIO29 USER_LED Pin = GPIO25 LIGHT_SENSE Pin = GPIO26 SENSOR_POWER Pin = GPIO27 ) const ( I2C0_SDA_PIN Pin = GPIO4 I2C0_SCL_PIN Pin = GPIO5 I2C1_SDA_PIN Pin = NoPin I2C1_SCL_PIN Pin = NoPin ) I2C pins vicharak_shrike-lite https://tinygo.org/docs/reference/microcontrollers/machine/vicharak_shrike-lite/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/vicharak_shrike-lite/ Constants const ( IO0 Pin = GPIO0 IO1 Pin = GPIO1 IO2 Pin = GPIO2 IO3 Pin = GPIO3 IO4 Pin = GPIO4 IO5 Pin = GPIO5 IO6 Pin = GPIO6 IO7 Pin = GPIO7 IO8 Pin = GPIO8 IO9 Pin = GPIO9 IO10 Pin = GPIO10 IO11 Pin = GPIO11 IO12 Pin = GPIO12 IO13 Pin = GPIO13 IO14 Pin = GPIO14 IO15 Pin = GPIO15 IO16 Pin = GPIO16 IO17 Pin = GPIO17 IO18 Pin = GPIO18 IO19 Pin = GPIO19 IO20 Pin = GPIO20 IO21 Pin = GPIO21 IO22 Pin = GPIO22 IO23 Pin = GPIO23 IO24 Pin = GPIO24 IO25 Pin = GPIO25 IO26 Pin = GPIO26 IO27 Pin = GPIO27 IO28 Pin = GPIO28 IO29 Pin = GPIO29 ) Digital waveshare-rp2040-zero https://tinygo.org/docs/reference/microcontrollers/machine/waveshare-rp2040-zero/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/waveshare-rp2040-zero/ Constants const ( D0 Pin = GPIO0 D1 Pin = GPIO1 D2 Pin = GPIO2 D3 Pin = GPIO3 D4 Pin = GPIO4 D5 Pin = GPIO5 D6 Pin = GPIO6 D7 Pin = GPIO7 D8 Pin = GPIO8 D9 Pin = GPIO9 D10 Pin = GPIO10 D11 Pin = GPIO11 D12 Pin = GPIO12 D13 Pin = GPIO13 D14 Pin = GPIO14 D15 Pin = GPIO15 D16 Pin = GPIO16 D17 Pin = GPIO17 D18 Pin = GPIO18 D19 Pin = GPIO19 D20 Pin = GPIO20 D21 Pin = GPIO21 D22 Pin = GPIO22 D23 Pin = GPIO23 D24 Pin = GPIO24 D25 Pin = GPIO25 D26 Pin = GPIO26 D27 Pin = GPIO27 D28 Pin = GPIO28 D29 Pin = GPIO29 ) Digital Pins wioterminal https://tinygo.org/docs/reference/microcontrollers/machine/wioterminal/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/wioterminal/ Constants const ( ADC0 = A0 ADC1 = A1 ADC2 = A2 ADC3 = A3 ADC4 = A4 ADC5 = A5 ADC6 = A6 ADC7 = A7 ADC8 = A8 LED = PIN_LED BUTTON = BUTTON_1 ) const ( // LEDs PIN_LED_13 = PA15 PIN_LED_RXL = PA15 PIN_LED_TXL = PA15 PIN_LED = PIN_LED_13 PIN_LED2 = PIN_LED_RXL PIN_LED3 = PIN_LED_TXL LED_BUILTIN = PIN_LED_13 PIN_NEOPIXEL = PA15 //Digital PINs D0 = PB08 D1 = PB09 D2 = PA07 D3 = PB04 D4 = PB05 D5 = PB06 D6 = PA04 D7 = PB07 D8 = PA06 //Analog PINs A0 = PB08 // ADC/AIN[0] A1 = PB09 // ADC/AIN[2] A2 = PA07 // ADC/AIN[3] A3 = PB04 // ADC/AIN[4] A4 = PB05 // ADC/AIN[5] A5 = PB06 // ADC/AIN[10] A6 = PA04 // ADC/AIN[10] A7 = PB07 // ADC/AIN[10] A8 = PA06 // ADC/AIN[10] //PIN DEFINE FOR RPI BCM0 = PA13 // I2C Wire1 BCM1 = PA12 // I2C Wire1 BCM2 = PA17 // I2C Wire2 BCM3 = PA16 // I2C Wire2 BCM4 = PB14 // GCLK BCM5 = PB12 // GCLK BCM6 = PB13 // GCLK BCM7 = PA05 // DAC1 BCM8 = PB01 // SPI SS BCM9 = PB00 // SPI SDI BCM10 = PB02 // SPI SDO BCM11 = PB03 // SPI SCK BCM12 = PB06 BCM13 = PA04 BCM14 = PB27 // UART Serial1 BCM15 = PB26 // UART Serial1 BCM16 = PB07 BCM17 = PA02 // DAC0 BCM18 = PB28 // FPC Digital & AD pins BCM19 = PA20 // WIO_IR BCM20 = PA21 // I2S SDO BCM21 = PA22 // I2S SDI BCM22 = PB09 BCM23 = PA07 BCM24 = PB04 BCM25 = PB05 BCM26 = PA06 BCM27 = PB08 // FPC NEW DEFINE FPC1 = PB28 // FPC Digital & AD pins FPC2 = PB17 FPC3 = PB29 FPC4 = PA14 FPC5 = PC01 FPC6 = PC02 FPC7 = PC03 FPC8 = PC04 FPC9 = PC31 FPC10 = PD00 // RPI Analog RPIs RPI_A0 = PB08 RPI_A1 = PB09 RPI_A2 = PA07 RPI_A3 = PB04 RPI_A4 = PB05 RPI_A5 = PB06 RPI_A6 = PA04 RPI_A7 = PB07 RPI_A8 = PA06 PIN_DAC0 = PA02 PIN_DAC1 = PA05 // USB PIN_USB_DM = PA24 PIN_USB_DP = PA25 PIN_USB_HOST_ENABLE = PA27 // BUTTON BUTTON_1 = PC26 BUTTON_2 = PC27 BUTTON_3 = PC28 WIO_KEY_A = PC26 WIO_KEY_B = PC27 WIO_KEY_C = PC28 // SWITCH SWITCH_X = PD20 SWITCH_Y = PD12 SWITCH_Z = PD09 SWITCH_B = PD08 SWITCH_U = PD10 WIO_5S_UP = PD20 WIO_5S_LEFT = PD12 WIO_5S_RIGHT = PD09 WIO_5S_DOWN = PD08 WIO_5S_PRESS = PD10 // IRQ0 : RTL8720D IRQ0 = PC20 // BUZZER_CTR BUZZER_CTR = PD11 WIO_BUZZER = PD11 // MIC_INPUT MIC_INPUT = PC30 WIO_MIC = PC30 // GCLK GCLK0 = PB14 GCLK1 = PB12 GCLK2 = PB13 // Serial interfaces // Serial1 PIN_SERIAL1_RX = PB27 PIN_SERIAL1_TX = PB26 // Serial2 : RTL8720D PIN_SERIAL2_RX = PC23 PIN_SERIAL2_TX = PC22 // Wire Interfaces // I2C Wire2 // I2C1 PIN_WIRE_SDA = PA17 PIN_WIRE_SCL = PA16 SDA = PIN_WIRE_SDA SCL = PIN_WIRE_SCL // I2C Wire1 // I2C0 : LIS3DHTR and ATECC608 PIN_WIRE1_SDA = PA13 PIN_WIRE1_SCL = PA12 SDA1 = PIN_WIRE1_SDA SCL1 = PIN_WIRE1_SCL PIN_GYROSCOPE_WIRE_SDA = PIN_WIRE1_SDA PIN_GYROSCOPE_WIRE_SCL = PIN_WIRE1_SCL GYROSCOPE_INT1 = PC21 WIO_LIS3DH_SDA = PIN_WIRE1_SDA WIO_LIS3DH_SCL = PIN_WIRE1_SCL WIO_LIS3DH_INT = PC21 // SPI PIN_SPI_SDI = PB00 PIN_SPI_SDO = PB02 PIN_SPI_SCK = PB03 PIN_SPI_SS = PB01 SS = PIN_SPI_SS SDO = PIN_SPI_SDO SDI = PIN_SPI_SDI SCK = PIN_SPI_SCK // SPI1 RTL8720D_SPI PIN_SPI1_SDI = PC24 PIN_SPI1_SDO = PB24 PIN_SPI1_SCK = PB25 PIN_SPI1_SS = PC25 SS1 = PIN_SPI1_SS SDO1 = PIN_SPI1_SDO SDI1 = PIN_SPI1_SDI SCK1 = PIN_SPI1_SCK // SPI2 SD_SPI PIN_SPI2_SDI = PC18 PIN_SPI2_SDO = PC16 PIN_SPI2_SCK = PC17 PIN_SPI2_SS = PC19 SS2 = PIN_SPI2_SS SDO2 = PIN_SPI2_SDO SDI2 = PIN_SPI2_SDI SCK2 = PIN_SPI2_SCK // SPI3 LCD_SPI PIN_SPI3_SDI = PB18 PIN_SPI3_SDO = PB19 PIN_SPI3_SCK = PB20 PIN_SPI3_SS = PB21 SS3 = PIN_SPI3_SS SDO3 = PIN_SPI3_SDO SDI3 = PIN_SPI3_SDI SCK3 = PIN_SPI3_SCK // Needed for SD library SDCARD_SDI_PIN = PIN_SPI2_SDI SDCARD_SDO_PIN = PIN_SPI2_SDO SDCARD_SCK_PIN = PIN_SPI2_SCK SDCARD_SS_PIN = PIN_SPI2_SS SDCARD_DET_PIN = PD21 LCD_SDI_PIN = PIN_SPI3_SDI LCD_SDO_PIN = PIN_SPI3_SDO LCD_SCK_PIN = PIN_SPI3_SCK LCD_SS_PIN = PIN_SPI3_SS LCD_DC = PC06 LCD_RESET = PC07 LCD_BACKLIGHT = PC05 // 4 WIRE LCD TOUCH LCD_XL = PC10 LCD_YU = PC11 LCD_XR = PC12 LCD_YD = PC13 // Needed for RTL8720D RTL8720D_SDI_PIN = PIN_SPI1_SDI RTL8720D_SDO_PIN = PIN_SPI1_SDO RTL8720D_SCK_PIN = PIN_SPI1_SCK RTL8720D_SS_PIN = PIN_SPI1_SS //QSPI Pins PIN_QSPI_IO0 = PA08 PIN_QSPI_IO1 = PA09 PIN_QSPI_IO2 = PA10 PIN_QSPI_IO3 = PA11 PIN_QSPI_SCK = PB10 PIN_QSPI_CS = PB11 // I2S Interfaces PIN_I2S_FS = PA20 PIN_I2S_SCK = PB16 PIN_I2S_SDO = PA22 PIN_I2S_SDI = PA21 I2S_LRCLK = PA20 I2S_BLCK = PB16 I2S_SDOUT = PA22 I2S_SDIN = PA21 // RTL8720D Interfaces RTL8720D_CHIP_PU = PA18 RTL8720D_GPIO0 = PA19 // SYNC // SWD SWDCLK = PA30 SWDIO = PA31 SWO = PB30 // light sensor WIO_LIGHT = PD01 // ir sensor WIO_IR = PB31 // OUTPUT_CTR OUTPUT_CTR_5V = PC14 OUTPUT_CTR_3V3 = PC15 ) const ( USBCDC_DM_PIN = PIN_USB_DM USBCDC_DP_PIN = PIN_USB_DP ) USBCDC pins x9pro https://tinygo.org/docs/reference/microcontrollers/machine/x9pro/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/x9pro/ Constants const ( LED Pin = 4 // HR LED pin UART_TX_PIN Pin = NoPin UART_RX_PIN Pin = NoPin SCL_PIN Pin = NoPin SDA_PIN Pin = NoPin SPI0_SCK_PIN Pin = 18 SPI0_SDI_PIN Pin = 19 SPI0_SDO_PIN Pin = 20 ) https://hackaday.io/project/144350-hacking-wearables-for-mental-health-and-more/details const ( OLED_CS Pin = 15 // chip select OLED_RES Pin = 14 // reset pin OLED_DC Pin = 13 // data/command OLED_SCK Pin = 12 // SPI clock OLED_SDO Pin = 11 // SPI SDO (chip-out, peripheral-in) OLED_LED_POW Pin = 16 OLED_IC_POW Pin = 17 ) LCD pins. xiao https://tinygo.org/docs/reference/microcontrollers/machine/xiao/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/xiao/ Constants const ( PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL PA02 Pin = 2 PA03 Pin = 3 PA04 Pin = 4 // peripherals: TCC0 channel 0 PA05 Pin = 5 // peripherals: TCC0 channel 1 PA06 Pin = 6 // peripherals: TCC1 channel 0 PA07 Pin = 7 // peripherals: TCC1 channel 1 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL PA14 Pin = 14 // peripherals: TCC0 channel 0 PA15 Pin = 15 // peripherals: TCC0 channel 1 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL PA18 Pin = 18 // peripherals: TCC0 channel 2 PA19 Pin = 19 // peripherals: TCC0 channel 3 PA20 Pin = 20 // peripherals: TCC0 channel 2 PA21 Pin = 21 // peripherals: TCC0 channel 3 PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL PA24 Pin = 24 // peripherals: TCC1 channel 2 PA25 Pin = 25 // peripherals: TCC1 channel 3 PA26 Pin = 26 PA27 Pin = 27 PA28 Pin = 28 PA29 Pin = 29 PA30 Pin = 30 // peripherals: TCC1 channel 0 PA31 Pin = 31 // peripherals: TCC1 channel 1 PB00 Pin = 32 PB01 Pin = 33 PB02 Pin = 34 // peripherals: sercomI2CM5 SDA PB03 Pin = 35 // peripherals: sercomI2CM5 SCL PB04 Pin = 36 PB05 Pin = 37 PB06 Pin = 38 PB07 Pin = 39 PB08 Pin = 40 // peripherals: sercomI2CM4 SDA PB09 Pin = 41 // peripherals: sercomI2CM4 SCL PB10 Pin = 42 // peripherals: TCC0 channel 0 PB11 Pin = 43 // peripherals: TCC0 channel 1 PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL PB14 Pin = 46 PB15 Pin = 47 PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL PB18 Pin = 50 PB19 Pin = 51 PB20 Pin = 52 PB21 Pin = 53 PB22 Pin = 54 PB23 Pin = 55 PB24 Pin = 56 PB25 Pin = 57 PB26 Pin = 58 PB27 Pin = 59 PB28 Pin = 60 PB29 Pin = 61 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL ) Hardware pins xiao-ble https://tinygo.org/docs/reference/microcontrollers/machine/xiao-ble/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/xiao-ble/ Constants const ( P0_00 Pin = 0 P0_01 Pin = 1 P0_02 Pin = 2 P0_03 Pin = 3 P0_04 Pin = 4 P0_05 Pin = 5 P0_06 Pin = 6 P0_07 Pin = 7 P0_08 Pin = 8 P0_09 Pin = 9 P0_10 Pin = 10 P0_11 Pin = 11 P0_12 Pin = 12 P0_13 Pin = 13 P0_14 Pin = 14 P0_15 Pin = 15 P0_16 Pin = 16 P0_17 Pin = 17 P0_18 Pin = 18 P0_19 Pin = 19 P0_20 Pin = 20 P0_21 Pin = 21 P0_22 Pin = 22 P0_23 Pin = 23 P0_24 Pin = 24 P0_25 Pin = 25 P0_26 Pin = 26 P0_27 Pin = 27 P0_28 Pin = 28 P0_29 Pin = 29 P0_30 Pin = 30 P0_31 Pin = 31 P1_00 Pin = 32 P1_01 Pin = 33 P1_02 Pin = 34 P1_03 Pin = 35 P1_04 Pin = 36 P1_05 Pin = 37 P1_06 Pin = 38 P1_07 Pin = 39 P1_08 Pin = 40 P1_09 Pin = 41 P1_10 Pin = 42 P1_11 Pin = 43 P1_12 Pin = 44 P1_13 Pin = 45 P1_14 Pin = 46 P1_15 Pin = 47 ) Hardware pins xiao-rp2040 https://tinygo.org/docs/reference/microcontrollers/machine/xiao-rp2040/ Mon, 01 Jan 0001 00:00:00 +0000 https://tinygo.org/docs/reference/microcontrollers/machine/xiao-rp2040/ Constants const ( D0 Pin = GPIO26 D1 Pin = GPIO27 D2 Pin = GPIO28 D3 Pin = GPIO29 D4 Pin = GPIO6 D5 Pin = GPIO7 D6 Pin = GPIO0 D7 Pin = GPIO1 D8 Pin = GPIO2 D9 Pin = GPIO4 D10 Pin = GPIO3 ) Digital Pins const ( A0 Pin = D0 A1 Pin = D1 A2 Pin = D2 A3 Pin = D3 ) Analog pins