Putting robotics at your service™

Free shipping on orders over $200

Phoenix code running on an Arduino Mega with an SSC-32

Print view Share :
Previous topicNext topic

Page 10 of 14 [ 206 posts ]

1 ... 7, 8, 9, 10, 11, 12, 13, 14
Rookie ( offline )
Posts: 10
Posted: 2012-04-09 04:02 
Hello, can you tell me which file to use to upload to an arduino uno code for Phoenix with SSC32 and PS2 controller?

Thanks
Dimos


User avatar
Guru ( offline )
Posts: 4869
Posted: 2012-04-09 09:01 
I need to look to see what versions are up here now... IE, did I upload a version yet that runs on Arduino 1.0? I have been working on a cleaned up/stripped down version for the BotBoardDuino, that only has the files in it to using the SSC-32 plus PS2. The version I have been testing it on is configured for a CHR-3, but can be configured for Phoenix by changing the configuration information. I have been doing some cleanup in this version of the code that I would then like to merge back into my master version that also has XBEE and on Mega's or Chipkits can also run the servos on the actual processor. But that may be a little while before I upload that version...

So hopefully soon will have a full setup up here again.

Kurt


Rookie ( offline )
Posts: 10
Posted: 2012-04-09 15:30 
Thank you very much kurte, I will wait for your code.


User avatar
Guru ( offline )
Posts: 4869
Posted: 2012-04-13 10:28 
I am still doing some cleanup and rearranging code. Things like trying to add more scoping of variables into the code. Creating classes for the Input controllers and for the Servo Drivers... Still very much a WIP.

I split off the code to start this off, where it is specific to the BotBoardDuino, Using an SSC-32, with a PS2 controller and is configured for a CH3-R type Hex. For other Round Hex robots, you will probably simply need to play with the configuration file (Hex_Cfg.h) and probably update the sections:
Code:
//--------------------------------------------------------------------
//[LEG DIMENSIONS]
//Universal dimensions for each leg in mm
#define cXXCoxaLength     29    // This is for CH3-R with Type 3 legs
#define cXXFemurLength    57
#define cXXTibiaLength    141
#define cXXTarsLength     85    // 4DOF only...

And the Initial position:
Code:
//[START POSITIONS FEET]
#define cHexInitXZ    80
#define CHexInitXZCos60  40        // COS(60) = .5
#define CHexInitXZSin60  69    // sin(60) = .866
#define CHexInitY   80 //30


You can get some pretty good estimates for the Leg information from an output file generated by Powerpod...
Code:
;****************************************************
; 3DOF-A Leg Dimensions      (TibiaAngle constant = 0)
;HipV_HipH    con 38    ;1.50" = 38mm (1.50 * 25.4)
;Femur_Length con 57    ;2.25" = 57mm (2.25 * 25.4)
;Tibia_Length con 124   ;4.875" = 124mm (4.875 * 25.4)

; 3DOF-B Leg Dimensions      (TibiaAngle constant = 0)
;HipV_HipH    con 29    ;1.14" = 29mm (1.14 * 25.4)
;Femur_Length con 57    ;2.25" = 57mm (2.25 * 25.4)
;Tibia_Length con 108   ;4.25" = 108mm (4.25 * 25.4)

; 3DOF-C Leg Dimensions      (TibiaAngle constant = 20)
;HipV_HipH    con 29    ;1.14" = 29mm (1.14 * 25.4)
;Femur_Length con 57    ;2.25" = 57mm (2.25 * 25.4)
;Tibia_Length con 141   ;5.55" = 141mm (5.55 * 25.4)

; 3DOF-(Old) Leg Dimensions   (TibiaAngle constant = 0)
;HipV_HipH    con 32    ;1.25" = 32mm (1.25 * 25.4)
;Femur_Length con 70    ;2.75" = 70mm (2.75 * 25.4)
;Tibia_Length con 108   ;4.25" = 108mm (4.25 * 25.4)
;****************************************************


Would also like to get a configuration file set up for Phoenix, (But I don't want to mess with my Arc32 phoenix... ).

But if anyone else starts to play with this and sets up a good configuration, it would be great if you shared :D.

In this cleanup of code, I believe I have removed many of the external library references I was using before. Some of it made it nicer to code, but thought I should reduce it. However this code is still very much reliant on the PS2X library (http://www.billporter.info/playstation- ... rary-v1-0/)

Note: While maybe not necessary, there were some fixes/enhancements that went into the PS2x code this week, that you may want to get. You can download from GitHub (https://github.com/madsci1016/Arduino-PS2X).

Kurt

P.S - Again this is a WIP so expect things to change. I will now work on merging this back into my older version such that I have the Non-SSC-32 version, Plus XBee, plus...


Attachment:
File comment: WIP - Code is still very much in flux - Use at your own risk...
BotBoardDuino_CHR3_PS2-120413a.zip [29.05 KiB]
Downloaded 110 times
Expert ( offline )
Posts: 447
Posted: 2012-04-19 21:47 
Do you think this code would work on a Teensy? .... since its tiny!?

I'd totally buy another teensy if thats the case... or is it missing a key feature some of the larger arduinos requires?


--Trouble maker...err Aaron.

_________________
Is the warranty voided yet? ... and why not?


User avatar
Guru ( offline )
Posts: 4869
Posted: 2012-04-19 22:23 
Maybe... I assume you are talking about: http://www.pjrc.com/teensy/ The ++ has lots of memory, the non ++ may still work...

But not sure what libraries and the like are for it. It looks like it has about the same processing of the Atmega328 in the Botboarduino...


User avatar
Guru ( offline )
Posts: 4869
Posted: 2012-04-20 10:06 
I forgot to mention. If you are looking for power in small package... You might try one of these:
http://www.sparkfun.com/products/9713

It is a Pic32MX795 - 80mhz, 512K program space, 128K data... Once I get back to testing my Chipkit code, I will probably also try it on one of these as I purchased one with my last Sparkfun order...

Kurt


Rookie ( offline )
Posts: 19
Posted: 2012-04-20 15:23 
Is there an opportunity to do a demo mode, or make better use of Serial Data loger?


User avatar
Guru ( offline )
Posts: 4869
Posted: 2012-04-20 18:28 
Vintikas wrote:
Is there an opportunity to do a demo mode, or make better use of Serial Data loger?
??? I am not sure what you are asking here.

Kurt


Rookie ( offline )
Posts: 19
Posted: 2012-04-21 00:12 
kurte wrote:
Vintikas wrote:
Is there an opportunity to do a demo mode, or make better use of Serial Data loger?
??? I am not sure what you are asking here.

Kurt

I mean. demo mode so you can demonstrate what and how the hexapod can run automatically. press the button, and he runs a short period of time. in all modes


Rookie ( offline )
Posts: 10
Posted: 2012-04-22 17:06 
Can use this for my Phoenix? http://www.sparkfun.com/products/11113 Has very small size and can be hidden inside the robot.


Rookie ( offline )
Posts: 19
Posted: 2012-04-22 17:11 
dikos wrote:
Can use this for my Phoenix? http://www.sparkfun.com/products/11113 Has very small size and can be hidden inside the robot.

Yes


Rookie ( offline )
Posts: 10
Posted: 2012-04-22 17:17 
Vintikas wrote:
dikos wrote:
Can use this for my Phoenix? http://www.sparkfun.com/products/11113 Has very small size and can be hidden inside the robot.

Yes


Ok, thanks. We expect the first code ready for Phoenix to try


My Phoenix Hexapod Robot http://www.grobot.gr/index.php?option=c ... &Itemid=82


Rookie ( offline )
Posts: 19
Posted: 2012-04-22 17:21 
dikos wrote:
Vintikas wrote:
dikos wrote:
Can use this for my Phoenix? http://www.sparkfun.com/products/11113 Has very small size and can be hidden inside the robot.

Yes


Ok, thanks. We expect the first code ready for Phoenix to try


My Phoenix Hexapod Robot http://www.grobot.gr/index.php?option=c ... &Itemid=82


http://www.youtube.com/watch?v=BfyhbcKKhbE
working with the Arduino Nano + ps2


Rookie ( offline )
Posts: 10
Posted: 2012-04-22 17:34 
Really wonderful, what you have onto your robot?
Can you share your code?


1 ... 7, 8, 9, 10, 11, 12, 13, 14

All times are UTC - 5 hours [ DST ]. It is currently 2014-07-24 11:24
Feedback Form
Feedback Form