npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@typecad/board-arduino-uno

v1.0.0-alpha.3

Published

TypeCAD Arduino Uno board definition with typed pins and peripherals

Readme

@typecad/board-arduino-uno

Arduino Uno board definition package for TypeCAD.

Overview

@typecad/board-arduino-uno provides a fully-typed TypeScript SDK for the Arduino Uno (ATmega328P). It exports pins, peripherals, timing utilities, and board metadata so TypeCAD can perform board-aware transpilation and catch hardware mistakes early.

Quick start

Add or reference this board in cuttlefish.config.ts:

import type { CuttlefishConfig } from '@typecad/cuttlefish/api';

const config: CuttlefishConfig = {
  entry: './src/main.ts',
  target: 'avr',
  mcu: '@typecad/mcu-atmega328p',
  board: '@typecad/board-arduino-uno',
  framework: '@typecad/framework-arduino',
  output: { framework: 'arduino', optimize: 'size' },
};

export default config;

Transpile and compile:

npx cuttlefish src/main.ts --compile --upload --port COM3

How to use

Import styles

There are several import styles:

Virtual @typecad/board import (recommended)

import { D13, A0, LED, UART0, delay, millis, I2C0, SPI0, Board } from '@typecad/board';

The @typecad/board import is a virtual module that the TypeCAD transpiler resolves to whichever board package you configured in cuttlefish.config.ts. This is the recommended style.

Barrel import

import {
  D13, A0, LED, UART0, delay, millis,
  I2C0, SPI0, Board,
} from '@typecad/board-arduino-uno';

Board namespace

import { Board } from '@typecad/board-arduino-uno';

Board.D13.high();
Board.UART0.println('Hello');

Pin and peripheral exports

The package exports full Uno pin definitions plus convenience aliases:

  • D0..D13
  • A0..A5
  • LED, SDA, SCL, MOSI, MISO, SCK, SS, TX, RX
  • I2C0, SPI0, UART0
  • timing utilities: delay, millis, micros, delayMicroseconds, map, constrain
  • numeric helpers: abs, min, max, clamp, inRange, toPercent, toByte, Num
  • pulse helpers: pulseIn, pulseInLong, Pulse
  • shift utilities: shiftIn, shiftOut, Shift, ShiftBitOrder
  • random utilities: randomSeed, random, Random
  • analog helpers: AnalogReference, analogReference
  • interrupt helpers: noInterrupts, interrupts, attachInterrupt, detachInterrupt

Pin safety

The Arduino Uno pin package exposes peripheral pin mappings and capability information that TypeCAD uses to warn about unsafe pin usage. Key reserved pin groups include:

  • D0 / D1 — UART0 RX/TX
  • A4 / A5 — I2C0 SDA/SCL
  • D11 / D12 / D13 — SPI0 MOSI/MISO/SCK

Example

import { LED, delay, HIGH } from '@typecad/board';

LED.output(HIGH);

while (true) {
  LED.toggle();
  delay(1000);
}

This package is intended to be used through the virtual @typecad/board import resolver in TypeCAD, but direct imports from @typecad/board-arduino-uno are also supported when you want explicit board package references.