Go to Post Note that these comments are based on the 2006 FRC game rules, and they may or may not apply to the 2007 game. Your mileage may vary. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-02-2011, 18:20
JamieSimonson JamieSimonson is offline
Registered User
FRC #1389
 
Join Date: Feb 2011
Location: Bethesda
Posts: 1
JamieSimonson is an unknown quantity at this point
Smile Lego Programming?!

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   Spotlight this post!  
Unread 01-02-2011, 18:23
EthanMiller EthanMiller is offline
Lead Programmer
AKA: Socks
FTC #4356 (The Zip Ties)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clayton, NY
Posts: 121
EthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura about
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.
__________________
When all else fails, read the manual.

FRC 1713 K Island Gears 2009, 2010 (Not 2011 due to budget, hopefully 2012!) - Fingerlakes Regional

FTC 4356 The Zip Ties 2010-2011 Season - NNYRC (2010 9th seed).

Last edited by EthanMiller : 01-02-2011 at 19:27.
  #3   Spotlight this post!  
Unread 01-02-2011, 18:28
RoboDesigners's Avatar
RoboDesigners RoboDesigners is offline
Registered User
VRC #2190 (RoboDesigners)
Team Role: Leadership
 
Join Date: Jun 2010
Rookie Year: 2006
Location: Virginia
Posts: 361
RoboDesigners will become famous soon enoughRoboDesigners will become famous soon enough
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?
__________________
Visit my website! www.RoboDesigners.com

VRC Team #2190

Twitter: @RoboDesigners

Last edited by RoboDesigners : 01-02-2011 at 18:29. Reason: added a question
  #4   Spotlight this post!  
Unread 02-02-2011, 02:18
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
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   Spotlight this post!  
Unread 02-02-2011, 09:54
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Lego Programming?!

Quote:
Originally Posted by WizenedEE View Post
There is a port for LEGO sensors on the digital sidecar. We program in labview, but it should be easy enough to use it.
The NXT port on the digital sidecar is for I2C NXT sensors. The touch sensor is simply a switch and so should be connected to the digital IO, just like any other switch. Making an interface cable might be a pain.

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   Spotlight this post!  
Unread 02-02-2011, 10:17
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
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?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi