atmotuber 0.1.4 copy "atmotuber: ^0.1.4" to clipboard
atmotuber: ^0.1.4 copied to clipboard

A new Flutter package for BLE comunication with ATMOTUBE Pro.

atmotuber #

black_atmotuber_logo

A Flutter package to deal with Atmotube Bluetooth API directly via BLE connection and make data ready to use within your app.

usage #

To use the package:

  • add the dependency to your pubspec.yaml file
dependencies:
  flutter:
      sdk: flutter
  atmotuber:
  • (ios only) go to ios/Runner/Info.plist and add the following
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Need BLE permission</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Need BLE permission</string>
  • (android only) go to android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

To connect to Atmotube Pro:

// init
Atmotuber atm = Atmotuber();
// connect
await atm.searchAtmotube();

To read real-time data:

await atm.wrapper(callback: (streams) {
    dataGot.value = streams;
    }

To read history data:

await atm.hist_wrapper(callback: (streams) {
    history.value = streams;
    }

To disconnect from Atmotube Pro:

// disconnect
await atm.dropConnection(); 
2
likes
150
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for BLE comunication with ATMOTUBE Pro.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

async, collection, cupertino_icons, flutter, flutter_blue

More

Packages that depend on atmotuber