react-native-led-shoes
v0.1.5
Published
React Native SDK for smart LED shoes
Downloads
449
Readme
react-native-led-shoes
React Native SDK for smart LED shoes
Installation
npm install react-native-led-shoesUsage
import { LedShoesClient } from 'react-native-led-shoes';
const ledShoes = new LedShoesClient({
devicePrefix: 'LS-',
uuids: {
service: '0000ffe0-0000-1000-8000-00805f9b34fb',
settings: '0000ffe1-0000-1000-8000-00805f9b34fb',
operatingData: '0000ffe2-0000-1000-8000-00805f9b34fb',
},
});
await ledShoes.initialize();
ledShoes.scanForShoes(
(device) => {
console.log('Found shoe', device);
},
(error) => {
console.error('BLE scan failed', error);
}
);
await ledShoes.connect('device-id');
const settings = await ledShoes.readSettings();
const operatingData = await ledShoes.readOperatingData();
await ledShoes.writeSettings({
...settings,
brightness: 80,
});
console.log('Telemetry', operatingData);Contributing
License
MIT
Made with create-react-native-library
