Setting sensor port pin properties

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 1
Joined: Wed Apr 30, 2008 4:04 pm

Setting sensor port pin properties

Postby matsik » Wed Apr 30, 2008 4:15 pm

I have read (in several documents) about the possibility to set pins to act in a non-default way. Specifically pin 1 to act as a +9V provider and pin 6 as a high speed analog input.

Question: how, if at all possible, is this done in LeJOS?

User avatar
leJOS Team Member
Posts: 5972
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Wed Apr 30, 2008 8:38 pm

Pin 1 can be set to output 9V by leJOS. Take a look at...
Take a look at the native methods setADTypeById and setPowerTypeById the comments should explain what is going on.

There is currently no support in leJOS for using Pin 6 as an analog input.

What sort of device are you looking to connect? The standard analog input is effectively sampled every 2ms, do you need a higher sample rate then this?

All the best


User avatar
leJOS Team Member
Posts: 305
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby kirkpthompson » Thu May 01, 2008 10:00 pm

Hi Andy. My Gyro inertial integrator may need faster sample rate... :P

-K :wink:

Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest