import { pinIoCategory } from '../blocks/categories/pinIo.js';
import { pwmCategory } from '../blocks/categories/pwm.js';
import { adcCategory } from '../blocks/categories/adc.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';

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,
    timeCategory,
    microbitDisplayCategory,
    soundCategory({ hasSpeaker: true }),
    serialPrintCategory,
  ],
};
