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 { serialPrintCategory } from '../blocks/categories/serialPrint.js';
import { microbitDisplayCategory } from '../blocks/categories/microbitDisplay.js';
import { soundCategory } from '../blocks/categories/sound.js';
import { neopixelCategory } from '../blocks/categories/neopixel.js';
import { randomCategory } from '../blocks/categories/random.js';
import { superbitCategory } from '../blocks/categories/superbit.js';

export const microbit = {
  id: 'microbit',
  label: 'micro:bit',
  firmware: {
    label: 'MicroPython (micro:bit v2)',
    url: 'https://micropython.org/resources/firmware/MICROBIT_V2.hex',
    canFlashInBrowser: false,
    instructions: 'Hold RESET, then drag the .hex file onto the MICROBIT drive.',
  },
  categories: [
    pinIoCategory,
    pwmCategory,
    adcCategory,
    sensorsCategory,
    timeCategory,
    microbitDisplayCategory,
    superbitCategory,
    soundCategory({ hasSpeaker: true }),
    serialPrintCategory,
    neopixelCategory,
    randomCategory,
  ],
};
