View unanswered posts | View active topics It is currently Mon Sep 01, 2014 9:55 am






Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next
remote control 
Author Message
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post remote control
my class and i are having THE WORST TIME with figuering this thing out...we found this video that supposidly "explains everything" but so far it left out some important technical stuff, such as what happens after the "flash" process and all of the samantha light start flashing


Fri Nov 16, 2012 2:02 am
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
also idk what code to use for remote control, so can some kind hearted person PLEASE write a basic moving forward code for the joystick plz?....PLEASE AND THANK YOU!


Fri Nov 16, 2012 2:12 am
Profile
Novice

Joined: Sun Oct 21, 2012 10:01 pm
Posts: 76
Post Re: remote control
A lot of this depends on your robot's setup. Which ports are your motor controllers plugged into? In what order? Which motors are wired into which controller ports?


Fri Nov 16, 2012 3:25 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: remote control
royalthemaster wrote:
also idk what code to use for remote control, so can some kind hearted person PLEASE write a basic moving forward code for the joystick plz?....PLEASE AND THANK YOU!

Have you look at the FTC sample code TankArcade.c?


Fri Nov 16, 2012 9:20 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 566
Post Re: remote control
For setting up the Samantha Module, I would suggest taking a look at our Samantha Module set-up guide on our wiki, here.

The actual coding of the robot gets a bit trickier, because as amcerbu has stated the code you will use depends very, very heavily on your specific robot build. I would suggest taking a look through our video trainer curriculum for the TETRIX system which walks through all of the basic coding principles, including how to write autonomous and tele-op code. This way you will not only gain a very nice knowledge base to build your robotics experience off of, you will also be able to create code that is custom built for your robot.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Last edited by JohnWatson on Mon Nov 19, 2012 5:36 pm, edited 1 time in total.



Fri Nov 16, 2012 10:02 am
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
the tnak arcade thing isnt working, i tried using the remote control that we got with our kits, with robot virtual worlds and it still wont work...also whats with the butotn that lights up when i push mode....and the button in middle that says logitech on it, what happens if i push it and such...


Mon Nov 19, 2012 5:31 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 566
Post Re: remote control
To set up the joystick controllers, take a look out our wiki guide, NXT Using Joysticks. It will walk you through step-by-step on how to setup and use the joysticks in ROBOTC.

As far as the 'Mode' button and 'D/X' switch on the joystick itself, "The Mode button on your Gamepad F310 swaps the functionality of the directional pad (D-pad) with the left thumbstick"

The D and X switch on the back switches between 'DirectInput and XInput' (more information found on Logitech's site)

Again, I recommend taking a look through the video trainer curriculum as it covers most of the principles needed for remote control of a TETRIX bot and can teach you how to make code that is customized for your robot.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Mon Nov 19, 2012 5:46 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
i have already gone over the website:

http://www.education.rec.ri.cmu.edu/pre ... /index.htm

several times and repeated all the steps i can think of, and yet our fricken robot still wont work...i have succesfully connected the samantha to the wifi, but evne when i try a sample program and try to get it to work on robot virtual worlds...it still doesnt work, can someone send me a code that works directly for the robot virtual worlds ring it up! level please? so that when the code sucessfully works, i have something to compare to for our custom code...i have spent a solid 3 weeks attempting to connect samantha-->wifi then NXT-->samantha and now im having the WORST time even trying to get a control test for our fricken remot control...the only possible thing i can think of that can be wrong is that the drivers of the controller need to be updated, but other than that i dont know...im sorry that im making such a big fuss of this if i am, i just really want to learn this so i can teach my fellow classmates and start a chain reaciton of learning and fun ;D


Mon Nov 19, 2012 8:56 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: remote control
It sounds like you have multiple problems. But I am not sure which one you are tackling first. Are you having problems with wireless connectivity or are you having problems getting some simple code to work? If you are trying to work with the virtual robot in Virtual World, I am assuming you have some simple code that you can download to the virtual robot. Were you able to compile the code without error? Were you able to download the code to the virtual robot without problem? Assuming you are able to downloaded the code to the virtual robot, was it not doing what you want it to do? If so, please describe the problem. "our fricken robot still wont work" doesn't tell me anything useful.

Here is the simplest TeleOp driving code using tank drive for the GripperBot used in the Ring It Up virtual world. However, if you have problems with getting your joystick to work properly, it may not help you until you solve that problem first.
Code:
#pragma config(Hubs,  S1, HTMotor,  HTMotor,  none,     none)
#pragma config(Sensor, S2,     gyroSensor,     sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3,     lightSensor,    sensorLightActive)
#pragma config(Sensor, S4,     sonarSensor,    sensorSONAR)
#pragma config(Motor,  motorA,          gripperMotor,  tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  motorB,          wristMotor,    tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C1_1,     rightMotor,    tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S1_C1_2,     leftMotor,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_1,     armMotor,      tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S1_C2_2,     motorG,        tmotorTetrix, openLoop, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"

task main()
{
    while (true)
    {
        getJoystickSettings(joystick);
        motor[leftMotor] = joystick.joy1_y1;
        motor[rightMotor] = joystick.joy1_y2;
        wait1Msec(50);
    }
}


Mon Nov 19, 2012 9:50 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
i will try it, but if it still fails should i just reinstalling the drivers and should i try a new remote control all together?


Tue Nov 20, 2012 4:34 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
so if your saying sir, then if i were to load that exact code into rvw, then the gripper-bot will work and stuff to the remote control?


Tue Nov 20, 2012 4:47 pm
Profile
Novice
User avatar

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
also in what order to i start the samantha field control system and NXT code?


Tue Nov 20, 2012 5:05 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: remote control
Samantha WiFi is only relevant for the real robot. In the Virtual World, you don't need Samantha. So if you are just trying to see if the code works, you can certainly develop and test most of the code in the Virtual World and figure out how to make it work in the real robot later. Open and compile the code I have above and make sure the compile target is "Virtual World" and select the "Ring It Up world". Then compile and download to the Virtual World. Once that's downloaded, then you can click "RobotC->Debug Windows->Joystick competition" to open up the joystick control dialog (assuming you already have a joystick plugged into your computer). Then, click Start, Start Activity in the Virtual World and start driving the robot around with the joystick. Once that's working, then you can add more complicated code to it.


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

Joined: Mon Oct 22, 2012 2:14 pm
Posts: 51
Post Re: remote control
thank you i really appreciate all your guys's work in helping me, turns out it worked all along, we were jsut using the wrong controller?....it had the buttons of an xbox 360 controller...well anyways thank you for all your help!

but our real robot still isnt working, and our samantha wifi light is blinking fast and im thinking im going to have a hard time trying to get the proper router info from my various classmates...i will get back soon
hope you all had a happy thanksgiving!


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

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: remote control
Configuring your own FCS with WiFi is tricky. If you are short on time, I would recommend using Bluetooth instead. We have been testing our code with Bluetooth and only use WiFi during competition.


Mon Nov 26, 2012 5:40 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 45 posts ]  Go to page 1, 2, 3  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.