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

Hi Kurt,

No problem!

“contributed libraries of their HTML documents”?

I just googled them. Haven’t had time to see what they are doing.

I tried to use the Metro library in my MicroMoose, but couldn’t get it working. I ended up simply implementing my non-blocking “wait” delays from my other C projects.

Alan KM6VV

hello kurt :slight_smile:

I tried to compile on arduino 0022 and I got error
imageshack.us/photo/my-images/199/errorzoc.jpg/
whats wrong :frowning:

thanks

What Arduino are you configured for?

Kurt

I use arduino uno,
just like you I want to make hexapod use ssc-32 with arduino uno :slight_smile:

thanks

Looks like you are trying to compile the code version before I added support for non-megas. Try downloading the version I uploaded on April 16th (page 4). It has code in there to handle only one uart.

Kurt

hello my bro…
I’ve followed your advice to download the file above, and verify…
I have new error report :cry:

Arduino_Hex.cpp:24:23: error: Streaming.h: No such file or directory Arduino_Hex.cpp:26:27: error: NewSoftSerial.h: No such file or directory In file included from Arduino_Hex.cpp:27: /Hex_globals.h:108: error: 'NewSoftSerial' does not name a type Arduino_Hex:269: error: 'NewSoftSerial' does not name a type Arduino_Hex.cpp: In function 'void setup()': Arduino_Hex:278: error: 'SSCSerial' was not declared in this scope Arduino_Hex.cpp: In function 'boolean FIsSSCGPEnabled()': Arduino_Hex:601: error: 'SSCSerial' was not declared in this scope Arduino_Hex.cpp: In function 'void GPPlayer()': Arduino_Hex:637: error: 'SSCSerial' was not declared in this scope Arduino_Hex:637: error: '_DEC' was not declared in this scope Arduino_Hex:645: error: no match for 'operator<<' in 'Serial << "GP: "' Arduino_Hex.cpp: In function 'void FreeServos()': Arduino_Hex:1443: error: 'SSCSerial' was not declared in this scope Arduino_Hex:1443: error: '_DEC' was not declared in this scope Arduino_Hex:1445: error: 'SSCSerial' was not declared in this scope Arduino_Hex.cpp: In function 'void SSCWrite(byte*, int)': Arduino_Hex:1514: error: 'SSCSerial' was not declared in this scope Arduino_Hex.cpp: In function 'int SSCRead(byte*, int, word, word)': Arduino_Hex:1528: error: 'SSCSerial' was not declared in this scope Arduino_Hex:1535: error: 'SSCSerial' was not declared in this scope Arduino_Hex.cpp: In function 'void SSCForwarder()': Arduino_Hex:1758: error: 'SSCSerial' was not declared in this scope Arduino_Hex:1765: error: 'SSCSerial' was not declared in this scope

where I can download the file Streaming.h and NewSoftSerial.h
sorry troublesome :blush:

many thank

No Problem, If you are in the Arduino environment you should go to the help menu and select reference. From the web page that comes up, you can select libraries. You will find these two libraries listed here or may be on user contributed page. These pages have links to where you can download these libraries.

Once you download them you will need to move them into your Arduino Library folder and then in your sketch you need to go to the sketch menu and import those libraries into your sketch.

Kurt

waw many thank kurte
success verify :slight_smile:

hello again kurte,
Im forget to ask something =p
your hexapod can controling with PS2 wireless (I see the source)
right?

my dump question is, how to connect PS2 wireless to uno >,<

thanks kurte

What I have done is either use the servo cable set: store.curiousinventor.com/guides/ps2 shows the which wire is which. What I do is to:
Cable 1: Black->DAT(1), RED->CMD(2), Yellow->SEL/ATTN(6)
Cable 2: Black->GND(4), RED->PWR(5), Yellow->Clock(7)

Then on the UNO, I use 1 of the Male/Male connectors that come servo extenders and plug it into digital pins 10-12 and I plug the other one into 13,GND,AREF… I plug cable 1 into digital pins 10-12 with black on 10. On cable 2, I removed the Red wire (power) as well as the black wire(GND) and then I put the black wire into the center of the connector. I then plug that cable into pins 13 and GND, with the blank pin over the AREF. I then needed to find +5v to plug the red wire into. I used the power pin on the ICSP connector (I believe this is pin 2), which if you have the board situated such that the digital pins are on top, then this is the upper right pin of the ICSP header. Other times I used the power/gnd pins on the lower power connector.

Kurt

aw aw aw
very clear…
many thanks kurte
u’r really helped :mrgreen:

Is there a possibility to connect the Wii Nunchuk for Balance mode for the Assessment of the ground?

Hi Kurte,

to move your hexapod with arduino you use a home made controller based on xbee?
You use xbee + arduino for you r controller?
Can you expalin me the wiring of your project? Have you the images?

Thank you!!!

Simple answer is maybe. I may play with one of these soon for the heck of it…

Have 2 different Controller things I have tried out on Arduino Mega:

  1. PS2 - More details a couple posts ago, showing how I hook up a PS2…

  2. XBEE - I use a parallax XBEE adapter as I have had some issues with the Sparkfun one on other Atmega1280 controllers (Axon2), where the sparkfun one did not properly convert the signals. On the Mega I used one of the UARTS to connect the XBEE to the Arduino board. Simply connect the TX to the RX of the XBee adapter, RX to TX, plus find a power and ground pin…

My Arduino phoenix code did use the command formats of my DIY XBee remote control (or my VB app on the PC). So I could control it with my controller which is still BAP28 based. May soon build another controller which is Arduino based, but that is a different subject…

Hope I answered your question.

Kurt

On Arduino UNO I have only tested the PS2 (like above) so far. Keep meaning to try XBEE, but so many projects…

I mean to use the balance MCU and PCB from nunchack WII

What’s the interface to the MCU/PCB? Serial wouldn’t be hard, WiFi might be a little harder…

Actually, what’s the balance MCU?

Alan KM6VV

hacknmod.com/hack/how-to-cheap-a … -nunchuck/

I actually have a couple of the adapters from Sparkfun (forums.basicmicro.net/general-el … t=nunchuck ).

Kurt

OK, so you’re interfacing via I2C. You could have said that.

You get X & Y joystick values, and X, Y, Z accelerations.

From XYZ accelerations, you should be able to compute any pitch or roll of the body, assuming bot motion is minimal.

Y and Y joystick should be good for making the 'bot move.

You’d perhaps be missing rotation and translation, as you wouldn’t have the 2nd joystick.

Alan KM6VV

Thank you Kurte!
My goal is use xbee with Basic Atom to control my exapod!
I’ve created a controller with xbee and a home version of Arduino.