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';
import { hbridgeMotorCategory } from '../blocks/categories/hbridgeMotor.js';

export const microbit = {
  id: 'microbit',
  label: 'micro:bit',
  firmware: {
    label: 'MicroPython (micro:bit)',
    url: import.meta.env.BASE_URL + 'firmware/micropython-microbit-v2.1.1.hex',
    canFlashInBrowser: false,
    flashMethod: 'microbit',
    instructions: 'Hold RESET while plugging in, then select the MICROBIT drive when prompted.',
  },
  categories: [
    pinIoCategory,
    pwmCategory,
    adcCategory,
    sensorsCategory,
    timeCategory,
    microbitDisplayCategory,
    superbitCategory,
    soundCategory({ hasSpeaker: true }),
    hbridgeMotorCategory,
    serialPrintCategory,
    neopixelCategory,
    randomCategory,
  ],
};
