My bet would be that you have a bug related to java bytes being signed.
To get a value between 0-255 from a byte type, use (value & 0xff)
On Jun 7, 2015 04:35, "Gabor Schilten" <[email protected]> wrote:

> Hi,
>
> With your advice I got something working!
> (Compete i2c noob here)
>
> Distance works up to 80 cm or so, after that I get negative values. Any
> suggestions?
>
> Best regards,
>
> Gabor
>
> On Sat, 6 Jun 2015 07:52 Ytai Ben-Tsvi <[email protected]> wrote:
>
>> I2C is easy. Once you have implemented two near trivial methods, namely:
>> byte readRegister(byte regnum)
>> and
>> void writeRegister(byte regnum, byte value)
>> You can forget about I2C and start talking to the chip according to the
>> information provided in
>> http://kb.pulsedlight3d.com/support/solutions/articles/5000549537-control-registers
>>  and
>> related documentation on that site.
>>
>> Alternatively, this sensor seems to support a different mode, where it is
>> emitting PWM with bandwidth proportional to distance, so you can use this
>> mode as well with PulseInput.
>>
>>
>> On Fri, Jun 5, 2015 at 12:03 PM, Gabor Schilten <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to get a Lidar Lite working via the IOIO OTG board, using
>>> I2C.
>>> However, I'm not the most experienced I2C developer, and can;t get the
>>> device to work.
>>>
>>> Has anyone here been playing with the same/different I2C based laser
>>> distance sensor?
>>>
>>> Thanks,
>>>
>>> Gabor
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to