View unanswered posts | View active topics It is currently Wed May 23, 2018 2:43 am

Reply to topic  [ 3 posts ] 
Question about input ports? 
Author Message

Joined: Thu Oct 16, 2008 11:41 pm
Posts: 1
Post Question about input ports?
I am extremely new to programing for the NXT and I was wondering if anybody knows of a simple way to connect more than 4 sensors to the input ports. I believe that I can calibrate the NXT using the digital voltmeter with the sensors in a circuit, but is there another way?

Thanks in advance.

Thu Oct 16, 2008 11:55 pm

Joined: Fri Feb 09, 2007 9:21 am
Posts: 616
Post Re: Question about input ports?
what type of sensors do you want to gang on a single port? THis makes a difference.

Touch sensors are easy. Ultrasonic sensors are virtually impossible. Etc.

Fri Oct 17, 2008 5:21 am
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Question about input ports?
if it's just about I²C sensors (ultrasonic, colour, compass, gyro,...) you may plug possibly up to 3 different I²C sensors to 1 sensor port without any problems, IF they have different I²C adresses.
This is mostly not possible if you use original Lego Sensors, because their adresses are fixed to 0x02 (as far as I know).
But (some? all?) sensors of Hitechnic or Mindsensors have adjustable adresses, so you could use them parallel to each other.

I²C standards are designed for chaining up to 126 devices at 1 port, but this is not completely supported by the NXT architecture.
As I know on good authority, the NXT sensor port is limited to 20 mA electrical power, so
without an external power supply this is why there is a limitation of attached sensors, but if you had an extra external I²C switch with an extra power supply, you may plug all the maximum 126 I²C sensors to 1 port as well.


HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}

Fri Oct 17, 2008 5:39 am
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.