View unanswered posts | View active topics It is currently Mon Jul 28, 2014 2:11 pm






Reply to topic  [ 3 posts ] 
Problem with Xbox controller coding with NXT 
Author Message
Rookie

Joined: Wed Oct 23, 2013 3:01 pm
Posts: 4
Post Problem with Xbox controller coding with NXT
so i was watching some of the RobotC programming tutorials for NXT robots, especially the remote control ones. On the site it posts this code

#include “JoystickDriver.c”
task main()
{
while(1 == 1)
{
getJoystickSettings(joystick);
motor[motorC] = joystick.joy1_y1;
motor[motorB] = joystick.joy1_y2;
}
}


I am using an xbox controller but every time i try to download the program it gives me the error message
Code generation not performed. Errors during compilation.

My 1st, 6th, 7th and 8th lines x'ed out on the left hand side and i cannot find a solution

PS-on the tutorial site that uses this code, it uses a logitech usb controller, whereas i am using a XBox Controller

Link to the tutorial
-http://www.education.rec.ri.cmu.edu/previews/robot_c_products/teaching_rc_lego_v2_preview/engineeringlabs/remote_control_buttons_lab.pdf


Wed Oct 23, 2013 3:06 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: Problem with Xbox controller coding with NXT
The PDF has a typographic error, and I think you copy-pasted the code and therefore inherited the error. When the PDF was created, straight quotes " were converted into angle quotes “”, which would be appropriate for English, but not ROBOTC code. Try retyping them manually, and the code should compile.

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Wed Oct 23, 2013 3:19 pm
Profile
Rookie

Joined: Wed Oct 23, 2013 3:01 pm
Posts: 4
Post Re: Problem with Xbox controller coding with NXT
Thank You!! It works now. Cant wait to have some fun with this.

:D :D :D


Wed Oct 23, 2013 3:35 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

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.