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 / 988
987  |  989
Subject: 
Re: Nxc and Mindsensors stuff
Newsgroups: 
lugnet.robotics.nxt
Date: 
Mon, 26 Nov 2007 09:23:03 GMT
Viewed: 
28659 times
  
Il giorno 12-nov-2007, alle ore 16:59, GiP ha scritto:
Now I am trying to use the Dual Infrared Obstacle Detector (Drod-Nx)
but cannot extract e meaningful number from it.



Hi, I finally got my mindsensors stuff (including a DIST-Nx) and am
still figuring out how to use them with NXC.

It seems we need only two functions:

- a "do a full initialization" one: something like SetSensorLowspeed
(S1) should suffice

- a "I2C command/response" one (using the I2CBytes)

I always get a zero value, no matter what I "send" out on the sensor
port (including correct setup commands).

In fact, after reading documentation of latest NXC version, I came
out with this function:

int readvalue(int c) // doesn't work :-(
{
   byte cmd[1], ret[1];
   int tot=1;
   cmd[0]=c;
   I2CBytes(IN_1, cmd, tot, ret);
   return ret[0];
}

Calling it for any mindsensors register (0x42, 0x45, etc) always
returns 0.

Where am I wrong?

Thank you!!


alf



Message has 1 Reply:
  Re: Nxc and Mindsensors stuff
 
(...) To use the DIST-Nx sensor from mindsensors.com you can use the code at this url: (URL) sure you initialize the sensor using the correct type and properly energize it after you configure the port as a lowspeed port. The sample program is setup (...) (17 years ago, 27-Nov-07, to lugnet.robotics.nxt)

Message is in Reply To:
  Nxc and Mindsensors stuff
 
Hi, we just bought some sensors from mindsensor.com but I cannot find any info on how to use them with nxc. I have seen that b33 has two new API but there is no "generic" info on how to use them and the mindsensor.com site has no info or sample (...) (17 years ago, 12-Nov-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