View unanswered posts | View active topics It is currently Wed Jul 30, 2014 9:26 am






Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Andriod phone 
Author Message
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Andriod phone
i read something somewhere about someone who got their robot and andriod phone to communicate with each other to a point that the guy could use his android phone to control his robot...i would like some kind bored soul to post ths line of code and instructions becuase i have searched forever and i cant find anything on the matter...THANK YOU!


Mon Nov 05, 2012 4:33 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3165
Location: Rotterdam, The Netherlands
Post Re: Andriod phone
There are several programs that allow you to do this:
http://code.google.com/p/nxt-remote-control/
http://mindstorms.lego.com/en-us/News/R ... ?id=227417
http://www.androidzoom.com/android_appl ... bdova.html

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Nov 06, 2012 1:43 am
Profile WWW
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
okay, so i succesfully got my NXT to recignize and connect to my phone that uses an app and enterd all the data correctly (i hope) and it still isnt working...also what is the signifigance of bluetooth compatability on the NXT? i always thught a bluetooth is something you talk into for a phone call but its looking more liek anyhting that is remotly used is bluetooth...can someone elaborate please?


Tue Nov 20, 2012 4:46 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
Here is a very simplified explanation. There is something call Bluetooth profile. Bluetooth provides a low bandwidth communication channel at short distance. The profile specifies high level protocol that is using this communication channel. There is the hand-free profile for using with cell phones. There is also a serial port profile. That's what NXT is using.


Tue Nov 20, 2012 5:27 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
and is that file defaulted and already loaded into the nxt?


Mon Nov 26, 2012 5:20 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
royalthemaster wrote:
and is that file defaulted and already loaded into the nxt?

Profile is not a "file". See http://en.wikipedia.org/wiki/Bluetooth_profile for an explanation. I believe the NXT supports the serial port profile (SPP). In the simplest term, the NXT Bluetooth reports itself as a serial port. When the Bluetooth driver on the PC sees a Bluetooth serial port, it creates a COM port for it. Applications such as RobotC can then open the "serial port" and communicates with it using serial protocol.


Mon Nov 26, 2012 5:30 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
i already have a program on my andriod phone to connect and control the robot. I can connect my phone to robot and vice versa and i hear a beep in recignision, and i try to use the buttons but nothing is working, can i use the default tank remote control program to make my phone connect and use that layout or something? plz help


Mon Nov 26, 2012 5:48 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
royalthemaster wrote:
i already have a program on my andriod phone to connect and control the robot. I can connect my phone to robot and vice versa and i hear a beep in recignision, and i try to use the buttons but nothing is working, can i use the default tank remote control program to make my phone connect and use that layout or something? plz help

First, how do you use your phone to control the robot? Do you have a phone app for it? Connecting to the robot does nothing until some app sends joystick events to the robot. If you don't have a specific NXT Bluetooth phone app, that could be your problem.


Mon Nov 26, 2012 5:54 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
yes, the app is called "NXT Remote Control" i found it on the google play store
what i have done so far is turn on bluetooth on my phone and the NXT, i know for a fact that i am able to connect to the NXT because when i try to connect, i hear a beep on the phone as soon as i click "connect" on my phone


Mon Dec 03, 2012 3:27 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
in order to control the robot with bluetooth do i need it to work with remote control and connect to the wifi?

and i assume that the codes we have for remote control will also work with the bluetooth thing?


Mon Dec 03, 2012 3:32 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
Yes, you can do teleop remote controlling the robot either via Bluetooth or WiFi. Our team uses Bluetooth when testing and practicing with the robot. There is no difference in the code whether you are using Bluetooth or WiFi.


Mon Dec 03, 2012 3:35 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
so then about the app...how do i get the thing to work?
do i start up the tele-op code, then try to make it go forward and stuff?
(on the app it only have forward left/right and backwards arrows for movement)


Mon Dec 03, 2012 3:40 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
I do not have an Android phone and I have never tried the app you mentioned. So it would be a little difficult for me to know how to make that app work with the NXT. Is your robot program written with the FTC competition template? If so, your problem may be in the waitForStart statement. This makes the robot wait for FCS (Field Control System) to send the "Start" signal to all the robots in the field. If you are controlling it using your android phone, I suspect it doesn't send the "start" signal. If that's really the case, you can remove the waitForStart line from you code and it should allow you robot to receive joystick messages from your phone.


Mon Dec 03, 2012 3:45 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: Andriod phone
so then where and what should i put into the code to use the joystick values i use (it goes at the speed i want to to based on how far i push the joystick)


Mon Dec 03, 2012 5:06 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Andriod phone
Are you still talking about using the Android phone or are you talking about a real joystick (or game controller) that hooks to your laptop and your laptop is communicating with the NXT via Bluetooth?


Mon Dec 03, 2012 5:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.