Skip to content

mono424/chessupdriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chessupdriver

The chessupdriver flutter package allows you to quickly get you chessup-board connected to your Android application.

Screenshot

Getting Started with chessupdriver

Add dependencies to pubspec.yaml

dependencies:
	chessupdriver: ^0.0.1

include the package

import 'package:chessupdriver/chessupdriver.dart';

Connect to a connected board and listen to its events:

    chessupCommunicationClient chessupCommunichessupCommunicationClient = chessupCommunicationClient(
      chessupCommunicationType.bluetooth,
      (v) => flutterReactiveBle.writeCharacteristicWithResponse(write, value: v),
      waitForAck: ackEnabled
    );
    boardBtInputStreamA = flutterReactiveBle
        .subscribeToCharacteristic(readA)
        .listen((list) {
          chessupCommunichessupCommunicationClient.handleReceive(Uint8List.fromList(list));
        });
    boardBtInputStreamB = flutterReactiveBle
        .subscribeToCharacteristic(readB)
        .listen((list) {
          chessupCommunichessupCommunicationClient.handleAckReceive(Uint8List.fromList(list));
        });
      

    // connect to board and initialize
    chessupBoard nBoard = new chessupBoard();
    await nBoard.init(chessupCommunichessupCommunicationClient);
    print("chessupBoard connected");

In action

To get a quick look, it is used in the follwoing project, which is not open source yet.

https://khad.im/p/white-pawn

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages