New Member Introductions New here? Introduce yourself to the 6SpeedOnline Community and show us your ride!

How to get Luxometer data from Texas Instruments SensorTag

Thread Tools
 
Rate Thread
 
Old Aug 19, 2022 | 03:45 AM
  #1  
tom john's Avatar
Thread Starter
|
Registered User
Joined: Aug 2022
Posts: 1
From: Hyderabad
Rep Power: 0
tom john is infamous around these parts
Arrow How to get Luxometer data from Texas Instruments SensorTag

I'm developing an android app that reads data from Texas Instruments SensorTag CC2650.

I'm able to read battery level, and Temperature but I'm not able to read Lux data from opt sensor.
Code:
if(service.getUuid().equals(UUID_OPT_SERV)){
                    luxService = gatt.getService(UUID_OPT_SERV);
                    BluetoothGattCharacteristic characteristic = luxService.getCharacteristic(UUID_OPT_CONF);
                    characteristic.setValue(new byte[] {0x01});
                    gatt.writeCharacteristic(characteristic);
                    gatt.setCharacteristicNotification(luxService.getCharacteristic(UUID_OPT_DATA), true);
                    lux = false;
                    break;
                }
I'm getting the luxometer service from my gatt, then take the characteristic, set the value for enable the sensor, write the change, and finally I set the notification.

The problem is that the
Code:
onCharacteristicChanged(...)
method it's never invoked with the result.

Where is the error?
 



You have already rated this thread Rating: Thread Rating: 0 votes,  average.


All times are GMT -6. The time now is 09:39 PM.