robotics company robot company  

Go Back   Trossen Robotics Community > Robotics > I/O Boards and Controllers

I/O Boards and Controllers Hardware-related questions regarding I/O boards or motor/stepper controllers.

» Navigation Menu
Homepage
Forums
TRC Tutorials
Member Blogs
Data Center
Image Galleries
Links Directory
Contact Us

Shop Robotics
» Join our Chatroom!


You'll need an IRC Client
» Introduction Tutorials

» Robot Parts!
» Find Us on Facebook!
» Arbotix
» RoboGames
» Data Center Entries
DX series 3D Drawing...
By Alex
07-28-2008 11:14 AM
roboBASIC_v25e(...
By Droid Works
04-20-2008 06:28 PM
Dance.RCB
By Droid Works
04-16-2008 05:25 PM
R Turn.RCB
By Droid Works
04-16-2008 05:08 PM
91dofeverything@512
By trey3670
06-27-2008 04:47 PM
» ComBots
» Turrets!
» Trossen Robotics Blog
Trossen Robotics DIY Project Contest...
Like Us! Like Us!...
Interlink FSRs now with Female Connector...
InterbotiX Robot Turrets...
RFID Login for Windows 7 Walk Through...
» Join Us Elsewhere!






» Bioloid Premium Kit
» Online Users: 330
16 members and 314 guests
blobbington, BMW1028, elaughlin, HyperMouse, innerbreed, italian_guy299, Jennero, kanda, lnxfergy, Rick Brooks, Robonaut, SteamAutomaton, Stobs, TOhm, Tyberius, Upgrayd
Most users ever online was 1,301, 09-11-2009 at 05:59 PM.
» Stats
Members: 4,281
Threads: 2,902
Posts: 37,199
Top Poster: Adrenalynn (5,316)
Welcome to our newest member, elitetech
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-24-2009
JadeKnight's Avatar
JadeKnight
JadeKnight is offline
Vacuum Tube
 
Join Date: Jan 2009
Posts: 21
Blog Entries: 3
Rep Power: 11
JadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really nice
Problems connecting PS2 controller to Axon

I followed the tutorial on the SoR site (cut and paste the code) (http://www.societyofrobots.com/membe...rials/node/200), however I can't seem to get it to work. It basically loops forever trying to confirm the controller is in analog mode (waiting for a 0x73 byte). The PS2 controller (genuine sony brand) does get put into analog mode (red led turns on), however the data received from the controller is always 0 causing the init loop to go on forever. I've tried different delays between the clock pulses, etc, but nothing helps.

Here's the real kicker, if I turn off the Axon, I correctly get the 0x73 byte (and the 0x5a 'ready' byte) EVERY TIME, along with a few frames of valid controller data before the telnet connection, and the Axon, die out. It does not appear to be random input pin behavior when the Axon is turned off.

Something about turning off the Axon causes the code to work, in it's last dying breaths...

Any help would be appreciated.
Reply With Quote
  #2  
Old 09-24-2009
Tyberius's Avatar
Tyberius
Tyberius is online
Mech Warmonger
 
Join Date: Dec 2007
Location: Trossen Robotics Laboratory
Posts: 2,294
Blog Entries: 12
Images: 456
Rep Power: 76
Tyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud of
Send a message via AIM to Tyberius Send a message via MSN to Tyberius
Re: Problems connecting PS2 controller to Axon

I seem to recall reading that the Axon does not run its code upon boot, rather only after a reset. Have you tried that?
__________________
Andrew Alter
Trossen Robotics
R&D Lead
Join the Robotic Combat Revolution @ Mech Warfare!
Reply With Quote
  #3  
Old 09-24-2009
JadeKnight's Avatar
JadeKnight
JadeKnight is offline
Vacuum Tube
 
Join Date: Jan 2009
Posts: 21
Blog Entries: 3
Rep Power: 11
JadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really nice
Re: Problems connecting PS2 controller to Axon

The code is running, as it posts various status messages and each failure to 'connect' to the the PS2 controller in the telnet session (along with all the bytes received from the PS2 controller). It just doesn't get anything back from the PS2 controller until I turn off the power switch.

Could turning it off, and the slow power down due to the huge capacitor, cause the speed of the processor to go down? Like normally it's running to fast to talk to the PS2 controller at 16MHz, but as it slows down/powers down, it finds a good speed to connect? I've tried increasing the delays at various points during the TX/RX to the controller, but it didn't help, so I am not sure of this theory.

Has anyone else successfully connected a PS2 controller to an Axon, or other AVR MCU (Using C/C++)?

(Oh, and it does immediately run the program after uploading a new .hex or turning on the power. I've added a 10 second countdown at startup so I could connect a telnet session before things get going.)

Last edited by JadeKnight; 09-24-2009 at 12:49 PM.
Reply With Quote
  #4  
Old 09-24-2009
Tyberius's Avatar
Tyberius
Tyberius is online
Mech Warmonger
 
Join Date: Dec 2007
Location: Trossen Robotics Laboratory
Posts: 2,294
Blog Entries: 12
Images: 456
Rep Power: 76
Tyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud of
Send a message via AIM to Tyberius Send a message via MSN to Tyberius
Re: Problems connecting PS2 controller to Axon

Ah okay, was worth a shot. I'll get John from SoC over here and have him take a shot at this. I haven't had time to dive into the Axon platform yet, so I'm sort of shooting in the dark.
__________________
Andrew Alter
Trossen Robotics
R&D Lead
Join the Robotic Combat Revolution @ Mech Warfare!
Reply With Quote
  #5  
Old 09-24-2009
LinuxGuy's Avatar
LinuxGuy
LinuxGuy is offline
HAL
 
Join Date: Mar 2008
Location: Beaverton, OR
Posts: 823
Blog Entries: 17
Images: 20
Rep Power: 27
LinuxGuy will become famous soon enough
Send a message via Yahoo to LinuxGuy
Re: Problems connecting PS2 controller to Axon

Quote:
Originally Posted by Tyberius View Post
I seem to recall reading that the Axon does not run its code upon boot, rather only after a reset. Have you tried that?
The default is to require pressing the user button before code starts to execute. I commented that out in Axon.c (mine is called walter.c) and now code starts at power up.

Code:
    /*********ADD YOUR CODE BELOW THIS LINE **********/

    //wait until user pushes button
    while(!button_pressed());  // <--- comment this line out to autostart code

    //reset all timers to zero
    reset_timer0();
    reset_timer1();
    reset_timer2();
    reset_timer3();
    reset_timer4();
    reset_timer5();

    while(1)
        {
        control();//uncomment this for your code (and use control.c only to program)

        //servo_controller();

       delay_cycles(100);//an optional small delay to prevent crazy oscillations
        }
    /*********ADD YOUR CODE ABOVE THIS LINE **********/
8-Dale
__________________
I can handle complexity. It's the simple things that confound me.
Do everything in moderation, ESPECIALLY, moderation..
Sometimes the only way to win, is not to play.. -- Stephen Falken
Reply With Quote
  #6  
Old 09-24-2009
Tyberius's Avatar
Tyberius
Tyberius is online
Mech Warmonger
 
Join Date: Dec 2007
Location: Trossen Robotics Laboratory
Posts: 2,294
Blog Entries: 12
Images: 456
Rep Power: 76
Tyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud of
Send a message via AIM to Tyberius Send a message via MSN to Tyberius
Re: Problems connecting PS2 controller to Axon

Quote:
Originally Posted by LinuxGuy View Post
The default is to require pressing the user button before code starts to execute. I commented that out in Axon.c (mine is called walter.c) and now code starts at power up.

8-Dale
Thanks for the clarification! I couldn't find that post for the life of me.
__________________
Andrew Alter
Trossen Robotics
R&D Lead
Join the Robotic Combat Revolution @ Mech Warfare!
Reply With Quote
  #7  
Old 09-24-2009
societyofrobots
societyofrobots is offline
Neuron
 
Join Date: Jul 2008
Posts: 117
Rep Power: 13
societyofrobots is a jewel in the roughsocietyofrobots is a jewel in the roughsocietyofrobots is a jewel in the rough
Re: Problems connecting PS2 controller to Axon

I call this multi-forum double posting
http://www.societyofrobots.com/robot...p?topic=9155.0
(linked for cross-reference)

Last edited by societyofrobots; 09-24-2009 at 09:39 PM.
Reply With Quote
  #8  
Old 09-24-2009
Tyberius's Avatar
Tyberius
Tyberius is online
Mech Warmonger
 
Join Date: Dec 2007
Location: Trossen Robotics Laboratory
Posts: 2,294
Blog Entries: 12
Images: 456
Rep Power: 76
Tyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud ofTyberius has much to be proud of
Send a message via AIM to Tyberius Send a message via MSN to Tyberius
Re: Problems connecting PS2 controller to Axon

Quote:
Originally Posted by societyofrobots View Post
I call this multi-forum double posting
http://forums.trossenrobotics.com/showthread.php?t=3579
(linked for cross-reference)
Uhh? Wrong link? :P
__________________
Andrew Alter
Trossen Robotics
R&D Lead
Join the Robotic Combat Revolution @ Mech Warfare!
Reply With Quote
  #9  
Old 09-24-2009
societyofrobots
societyofrobots is offline
Neuron
 
Join Date: Jul 2008
Posts: 117
Rep Power: 13
societyofrobots is a jewel in the roughsocietyofrobots is a jewel in the roughsocietyofrobots is a jewel in the rough
Re: Problems connecting PS2 controller to Axon

oops . . . lol

http://www.societyofrobots.com/robot...p?topic=9155.0
Reply With Quote
  #10  
Old 09-26-2009
JadeKnight's Avatar
JadeKnight
JadeKnight is offline
Vacuum Tube
 
Join Date: Jan 2009
Posts: 21
Blog Entries: 3
Rep Power: 11
JadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really niceJadeKnight is just really nice
Re: Problems connecting PS2 controller to Axon

Problem solved!

http://www.societyofrobots.com/robot...71284#msg71284
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question(s) Axon Programming Questions WGhost9 Brains of my Robot 20 07-06-2009 05:15 PM
Control Solutions MSpurk Mech Warfare 25 03-15-2009 09:33 AM
PS2 controller StuartL Mech Warfare 16 01-12-2009 07:59 PM
RC & Serial Servo Controller Kit Al1970 Garage Sale 0 01-10-2009 12:39 AM
Question(s) Motor controller ?'s sthmck I/O Boards and Controllers 4 11-06-2008 03:29 PM

Powered by vBadvanced CMPS v3.2.0

All times are GMT -5. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.