import { pinIoCategory } from '../blocks/categories/pinIo.js';
import { pwmCategory } from '../blocks/categories/pwm.js';
import { adcCategory } from '../blocks/categories/adc.js';
import { sensorsCategory } from '../blocks/categories/sensors.js';
import { timeCategory } from '../blocks/categories/time.js';
import { i2cCategory } from '../blocks/categories/i2c.js';
import { serialPrintCategory } from '../blocks/categories/serialPrint.js';
import { soundCategory } from '../blocks/categories/sound.js';
import { neopixelCategory } from '../blocks/categories/neopixel.js';
import { randomCategory } from '../blocks/categories/random.js';
import { hbridgeMotorCategory } from '../blocks/categories/hbridgeMotor.js';

export const rp2040 = {
  id: 'rp2040',
  label: 'RP2040 (Pico)',
  firmware: {
    label: 'MicroPython (Raspberry Pi Pico)',
    url: import.meta.env.BASE_URL + 'firmware/RPI_PICO-20251209-v1.27.0.uf2',
    canFlashInBrowser: true,
    flashMethod: 'webusb',
    instructions: 'Hold BOOTSEL while plugging in, then click Flash FW.',
  },
  categories: [
    pinIoCategory,
    pwmCategory,
    adcCategory,
    sensorsCategory,
    timeCategory,
    i2cCategory,
    soundCategory(),
    hbridgeMotorCategory,
    serialPrintCategory,
    neopixelCategory,
    randomCategory,
  ],
};
