To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 545
544  |  546
Subject: 
Re: Ping mode for US Sensor in NXT-G
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 4 Mar 2007 13:53:40 GMT
Viewed: 
16776 times
  
Hi Guy,

You inspired me to do a ping using NBC, but I have run into trouble. I get
a -35 (ERR_COMM_BUS_ERR) when I try to read more than one object reading.
The code is long, so I'll just put the basics of what I am doing here to see
if anyone notices anything wrong with the technique. I'm only reading
distances for two objects here.

- Write 0x02, 0x41, 0x01 to ping
- Read furthest away of the two objects first (0x02, 0x43)
- Read closest object last (0x02, 0x42)

If I just read one object distance (even if it's not the closest), it seems
to be OK. I've tried delaying from 10 ms to 1 sec between reads, but it
doesn't help.

I am using NBC's __ReadLSBytes to do the reads.

Do you have the disassembly for the NXT-G I2C read/write blocks?

David



Message has 1 Reply:
  Re: Ping mode for US Sensor in NXT-G
 
(...) You are using firmware version 1.04, right? 1.03 doesn't work well for multibyte reads. JB (18 years ago, 4-Mar-07, to lugnet.robotics.nxt)

Message is in Reply To:
  Ping mode for US Sensor in NXT-G
 
I've written a detailed toturial on working in ping mode in NXT-G using I2C read/I2C write block and the US Sensor block. Read it here: (URL) shows how you can set the sensor to ping mode, read and display all 8 measurements and alternatly ping two (...) (18 years ago, 28-Feb-07, to lugnet.robotics.nxt)

5 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR