Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
/ qysc-web Public archive

A TypeScript library for interacting with QYSC (QiYi Smart Cube) devices via Web Bluetooth API.

License

Notifications You must be signed in to change notification settings

simonkellly/qysc-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QYSC Web

## DEPRECIATED This library has been superceeded by btcube-web which has support for moyu cubes as well as qiyi. No further development will be done on this library, and all contributions should be directed towards btcube-web

A TypeScript library for interacting with QYSC (QiYi Smart Cube) devices via Web Bluetooth API.

This library is availible on the NPM registry at https://www.npmjs.com/package/qysc-web A sample app can be seen at https://simonkellly.github.io/qysc-web

Features

  • Web Bluetooth integration for QYSC devices
  • Cube state management and manipulation
  • RxJS integration for reactive programming
  • TypeScript support with full type definitions

This library follows closely to the standard set by gan-web-bluetooth and implements the qiyi smart cube protocol described at qiyi_smartcube_protocol with some help from qy-cube

Installation

npm install qysc-web
# or
yarn add qysc-web
# or
bun add qysc-web

Usage

There is a very basic sample-app within this repository, but the core usage can be seen below.

import { connectQYSC } from 'qysc-web';

// Connect to a QYSC device
const cube = await connectQYSC();

// Listen for cube state changes
cube.events.moves.subscribe(move => {
  console.log('Cube Moved:', move);
});

// Disconnect when done
cube.disconnect();

Development

This project uses Bun as the package manager and build tool.

# Install dependencies
bun install

# Build the project
bun run build

# Link the package for the sample app
bun link qysc-web

# Publish the package to NPM
bun publish

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A TypeScript library for interacting with QYSC (QiYi Smart Cube) devices via Web Bluetooth API.

Topics

Resources

License

Stars

Watchers

Forks