You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to read a smart bicycle trainer (Tacx Flux 2), and I am able to pair to the trainer, but then when I try to read from the device it comes back empty. I tried to set the reader on an interval as well, to see if maybe by moving the trainer it would update the value but still nothing. Trainer does send info to other apps like Zwift or Tacx App. Please help, here is my code:
Thank you for the help!
import React, { useState, useEffect } from 'react'
import { StyleSheet, Text, View, Button, PermissionsAndroid, FlatList } from 'react-native'
import BluetoothSerial from 'react-native-bluetooth-serial'
import KeepAwake from 'react-native-keep-awake'
const IndoorTrainer = () => {
PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION)
.then(result => {
if (!result) {
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION);
}
});
// Use effect when enable button is clicked
useEffect(() => {
if (bluetoothDeviceInitialState.isEnabled === true) {
console.log('new try -------------------------');
console.log('Bluetooth has been enabled');
console.log(bluetoothDeviceInitialState);
console.log(bluetoothDeviceState);
afterEnable();
} else console.log('Bluetooth is not enabled');
}, [bluetoothDeviceInitialState]);
Hello,
I am trying to read a smart bicycle trainer (Tacx Flux 2), and I am able to pair to the trainer, but then when I try to read from the device it comes back empty. I tried to set the reader on an interval as well, to see if maybe by moving the trainer it would update the value but still nothing. Trainer does send info to other apps like Zwift or Tacx App. Please help, here is my code:
Thank you for the help!
The text was updated successfully, but these errors were encountered: