Go to Post DonRotolo used COMMON SENSE. ... ... FIRST/Chief Delphi Community fainted! - PayneTrain [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 25-05-2015, 18:01
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Need help with lego NXT lejos xbox controlling

The easiest way to set up communication between the computer and the robot is to use the communication classes included in the leJOS PC library.

The computer side project (the one that reads from the controller) should be set up according to these instructions. Then you can use DataOutputStream (on the computer) and DataInputStream (on the robot) to send numbers over bluetooth. I would recommend using USB for testing as it is more reliable and faster to connect and the APIs are nearly identical. These instructions might help with setting up communications.

I also have some more complicated communication code that you can look at if you want. This provides a way for bidirectional communication that is sort of similar to I2C. There are a few intermittent threading bugs, but it might give you some idea of how to connect the computer and the robot.
Computer Code
Robot Code

Feel free to ask any other questions you have about the specifics of getting your leJOS working.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
 


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 21:11.

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