SINTEF-9012 / bglib

Java implementation of the BGAPI binary protocol for Bluegiga BLE112 Bluetooth low energy modules.
37 stars 14 forks source link

I2C read data #18

Closed Nikolsi closed 8 years ago

Nikolsi commented 8 years ago

Hello, could you show somehow an example how to get data from a specific sensor with i2c by using your library? How to get these read bytes? Thank you in advance

ffleurey commented 8 years ago

Hello, I have not used it for a while but the library is only an port of the C library from BG. You should be able to find/translate from their examples and documentation. As far as I remember everything is asynchronous so when you send a "read" command you should get the result of the read (and the data) in a callback. You just have to find from the documentation which is the right callback :-) Hope this helps you get on the right track. Cheers, Franck

Nikolsi commented 8 years ago

Frank, Thank you for your response. I found the solution without calling any hardware fuctions. Wish you all the best, Nikolai