|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I was wondering if the lego
touch sensor could be programmed using C++ (windriver) or does it only work using the NXT brick and that sort of programming. Can you Help? |
|
#2
|
|||
|
|||
|
Re: Lego Programming?!
{As an FTC programmer, I can tell you that the closest to C++ and Windriver you'll get with the NXT is RobotC. If you have an FTC team in the area, they have a license. There's also a 30 day trial, if you want to test it.
I am unaware if there is a way for FRC teams to get it free/cheap without an FTC team to lend it, though.} EDIT: Wow, misread/misunderstood the question. I'm going to go away now, until I can test it out. EDIT 2: Looks like a couple of things. The default output appears to be I2C using the cables provided. So, if you can figure that out, you can probably get the cRIO talking that way. DIO would be your friend. Alternatively, you can crack the thing open, and solder on two wire leads, then close it again. How To Do It. Then it should be usable for both. Of course, if you go through the trouble of opening it, you may as well just use a momentary pushbutton, unless the enclosure is important. Last edited by EthanMiller : 01-02-2011 at 19:27. |
|
#3
|
||||
|
||||
|
Re: Lego Programming?!
A touch sensor should just be a digital signal: 1 or 0. Treat it just like any other touch sensor.
EDIT: Is the sensor connected to the NXT, or to another controller? Last edited by RoboDesigners : 01-02-2011 at 18:29. Reason: added a question |
|
#4
|
||||
|
||||
|
Re: Lego Programming?!
There is a port for LEGO sensors on the digital sidecar. We program in labview, but it should be easy enough to use it.
|
|
#5
|
||||||
|
||||||
|
Re: Lego Programming?!
Quote:
Connect pin 1 of the touch sensor to the signal pin of the DIO and pin 2 of the touch sensor to ground, and you're set. |
|
#6
|
|||
|
|||
|
Re: Lego Programming?!
Based on prior FTC and LEGO experience with these sensors, I would highly recommend buying a cheap microswitch. It would probably be easier to mount, and would definitely be easier to interface.
What is the application for this touch sensor? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|