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 / 842
841  |  843
Subject: 
Re: NRLink reading RCX response w/ RobotC
Newsgroups: 
lugnet.robotics.nxt
Date: 
Thu, 2 Aug 2007 03:32:25 GMT
Viewed: 
20492 times
  
Do a search on the nxtasy forums for keywords "ROBOTC" and "I2C". You
should find a good explanation of ROBOTC's "Test I2C Messaging"
capabilities. This provides a terrific method for testing I2C devices.
I have used this to verify NRLink successful operation with ROBOTC.

Searching for "robotc i2c" returns 3 message in the forums:
"Interfacing with Lego Sensors"
"Help with US sensor!!"
"RobotC I2C Help"

Only the third message describes "Test I2C Messaging". It's very specific to the
message thread and in it you also state that you have written on the subject
before.  I couldn't find any other messages with info about the "Test I2C"
function. If there is a general explanation of this function I would very much
like to learn - it seems to be a very useful tool, Without instructions it
requires a bit of intuition.

An important item missing was the fact that "Menu Level->Expert" must be enabled
to make the test panel entry appear in the menus - a wild guess I made after
hunting through the menus over and over.  It took me a loooooong time to figure
this out.  I can now open "I2C Test".

So, I am able to see the data coming from the RCX using "02 42" (found that in
"NXT Hitechnic Accelerometer.c" - thanks).  The response is 9 bytes long.  Where
do I find the definition of this response - the RCX sent message is only 1 byte
long.  Is this all from the NRLink device or is some of the data added by
RobotC?

Example:
RCX sends 0x46 and NXT reads C2 55 FF 00 F7 08 46 B9 3D
7th byte looks like the data to be read.

RCX send 0x95 and NXT reads C2 55 FF 00 F7 08 95 6A 8C
Again, 7th byte looks like the data - but the trailing two bytes are different
also.



Message has 1 Reply:
  RE: NRLink reading RCX response w/ RobotC
 
(...) I couldn't find it either, but its out there somewhere. (...) Agreed. It started as a internal debugging tool and was left visible for the small handful of power users who write their own I2C device drivers. (...) Agreed. I went back and (...) (17 years ago, 2-Aug-07, to lugnet.robotics.nxt)

Message is in Reply To:
  RE: NRLink reading RCX response w/ RobotC
 
There are three steps to reading an I2C message from a sensor. 1. Send a message to the I2C sensor to initiate the read. Look at the program "NXT HiTechnic Accelerometer" in the RobotC sample programs folder for an example that you can clone. (...) (17 years ago, 1-Aug-07, to lugnet.robotics.nxt)

8 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