BTSEND motor control

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

BTSEND motor control

Postby treeface99 » Fri Jan 27, 2012 1:59 pm

hi all,

I am trying to modify the Btsend.java class to send motor controls to the robot. dos.writeInt((i*30000)); sends an int to the brick but how do you send a motor control?

Does anyone have any examples? I cant find any examples in the samples either.

Thanks!
treeface99
Novice
 
Posts: 30
Joined: Thu Nov 24, 2011 10:07 am

Re: BTSEND motor control

Postby treeface99 » Fri Jan 27, 2012 2:49 pm

I have found the tachoCount sample but cant get it to run. I have BTrecieve running on the brick. Is there a similar program that needs to run on the brick for tachoCount to run?

Cheers
treeface99
Novice
 
Posts: 30
Joined: Thu Nov 24, 2011 10:07 am

Re: BTSEND motor control

Postby gloomyandy » Fri Jan 27, 2012 2:57 pm

The tacho count sample makes use of the leJOS remote NXT pc side API which ultimately makes use of LCP, there is an LCP listener built into the standard leJOS menu program, so all you need to do to run this program is turn on the NX and ensure you can connect to it...

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

Re: BTSEND motor control

Postby treeface99 » Fri Jan 27, 2012 4:18 pm

ok, what i will try to do it include my motor commands in the BTreceive file and try to trigger them by passing and int from the BTSEND.

Thanks andy
treeface99
Novice
 
Posts: 30
Joined: Thu Nov 24, 2011 10:07 am

Re: BTSEND motor control

Postby treeface99 » Fri Jan 27, 2012 4:49 pm

works a treat :D
treeface99
Novice
 
Posts: 30
Joined: Thu Nov 24, 2011 10:07 am


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff