View unanswered posts | View active topics It is currently Sat Dec 15, 2018 9:35 am

Reply to topic  [ 2 posts ] 
Multiple Ultrasonic Readings 
Author Message

Joined: Tue Mar 11, 2008 7:33 am
Posts: 11
Post Multiple Ultrasonic Readings
I've been trying to read the other 7 ultrasonic readings that are available in the I2C mode of the Lego Ultrasonic Sensor.
The program works like a charm when reading the "first" value at 0x42. However I always receive a zero when I try any of the other addresses which supposedly have the other values, like 0x43, 0x44, etc...
Has anyone managed to do this successfully on RobotC?
(I'm using version 1.05, and it's associated firmware, because 1.10 is too buggy for other things I need to do.)


Sun Mar 23, 2008 6:10 am

Joined: Fri Feb 09, 2007 9:21 am
Posts: 616
Yes. I've had it working.

It's very possible.BUt you have to write your own driver and set the sensor type to "I2Custom".

And the setup for the sensor is different. I think you have to send it a different mode byte to set the sensor into this type of mode. I can't recall whether you have to set it in "single shot" mode or can set it up for continuous polling. But thie is all covered in LEGO's SDK.

Wed Mar 26, 2008 1:50 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.