Boards
The board files of 1.0.0, one folder per SDK. Require the package, then name a board in extra.baremetal.board.
ESP32 · 1 board official
Arduino Nano ESP32
arduino-nano-esp32
- Chip
- ESP32-S3
- PSRAM
- octal
- Flash
- 16MB
- network: wifi
- i2c: i2c
$ composer require php-baremetal/boards-arduino
The board files of the Arduino® Nano ESP32 for php-baremetal: chip, PSRAM, flash, console, the names of its pins
(D0–D13, A0–A7, the LEDs) and the on-board peripherals (Wi-Fi, I2C) with their pins. It is a board package
(Composer type bm-boards): it holds board files only, and the esp32 SDK reads them from boards/esp32/ once the
package is installed in the project.
Install
composer require php-baremetal/boards-arduino
phpbm init adds it by itself when you pick one of its boards. Then name the board in composer.json:
"extra": {
"baremetal": {
"sdk": "esp32@^2.0",
"board": "arduino-nano-esp32",
"runtime": "init-loop",
"storage": "embedded"
}
}
The package requires nothing: not the SDK, not the drivers. The SDK checks every board against its chips when it
loads them. The drivers of the blocks are separate packages, listed per board in the documentation; phpbm init
proposes them.
Pin names
The board file names the pins as they are printed on the board. PHP reads them as constants worth the GPIO number:
Baremetal\Board\Pin::D13 is 48, and with the SDK option board-constants: global plain D13 works too.
<?php
use Baremetal\Board\Pin;
function setup(): void
{
gpio_mode(Pin::D13, GPIO_OUTPUT); // ext-gpio
}
function loop(int $tick): void
{
gpio_write(Pin::D13, $tick % 2);
delay(500); // ext-sys
}
The full table is in the board page.
Boards
| Board id | Product | Chip |
|---|---|---|
arduino-nano-esp32 |
Arduino Nano ESP32 (ABX00083) | ESP32-S3 |
boards/catalog.json gives, for each board, the Arduino documentation page (docs) and a product photo
(photo), both online URLs, grouped by SDK. The package registry site uses it to link and show the boards; the
build does not read it.
Documentation
- Overview
- One page per board, with its pins, its blocks and the driver packages they need: Arduino Nano ESP32
License
MIT.
Arduino® is a trademark of Arduino S.r.l. This package is not made or endorsed by Arduino; it describes Arduino boards for use with php-baremetal.