I hadnÃ¢â‚¬â„¢t had a lot of time this weekend so I was surprised to see the amount of activity
I used a scoop and another Basic Atom Pro to measure a port (I used P15).
Snip from code: (This example measures how long time it takes to read all RC channels)
Thanks for letting me know how you measured the timing. I was thinking of buying a scoop or logic analyser. A second hand scoop is easy to get for a decent price. Logic analysers are a better measuring tool for this but its hard to get a logic analyser for a good price. But I bought myself a new (second hand) car so this has to wait for a little while
IÃ¢â‚¬â„¢m looking forward to see your balance system working in realtime! I bet it look Awesome!!
I see in this video http://www.youtube.com/watch?v=NMtifBKX3kE
You have a gait implemented with Wii control, thought i'd ask if you could post that code revision before i work through adding the bluesmirf code into the Phoenix PS2 Code.
I want to get the new revision (1.2) ready as soon as possible. But itÃ¢â‚¬â„¢s been very busy for the last week and the next one. IÃ¢â‚¬â„¢ll try to get it done as soon as possible but I canÃ¢â‚¬â„¢t promise anything.
But this doesnÃ¢â‚¬â„¢t have to hold you back from using the current version and get the BlueSmirf to work with it. The code is made using subparts, if youÃ¢â‚¬â„¢ve got it ready you can easy take it out and put it in the new release. You can find the BlueSmirf Wii code on my project page
. You should add some code to read in more buttons since the new version uses more buttons. IÃ¢â‚¬â„¢m sure youÃ¢â‚¬â„¢ll figure it out by looking at the other buttons.
Ok, today I finally got my hex back in one piece. I swapped in a BB2, the SSC32 was updated to an ATMEGA128 and I installed a new Lynxmotion PS2 controller and cable... I used the newer tutorial to make sure I had everything back on properly (http://www.lynxmotion.com/images/html/build99c.htm
. At first my PS2 controller did not work properly, but I found I plugged in the cable backwords (p12-15). I was temporarily confussed by Figure 7 in the tutorial as I think the picture may be wrong... But this is a different issue. Now It is working.
I used the same tutorial without any problems. The Phoenix tutorial
shows the same direction The only thing that I know is that the colours of the wires changed a bit between the current and a older version of the remote. But IÃ¢â‚¬â„¢m glad that youÃ¢â‚¬â„¢ve got it working!
I probably still need to update the angles min/max. I probably need to look through the code to figure out what they are used for and what they are referenced off of. For example are the angles based off of the center of the robot or the actual values for the servos...
The min/max angles are not used in the calculations. Just before the positions will be send to the SSC there is a check. The check will limit the position to be sure that the servo wound be forced into a position that is mechanically not possible.
Then the fun is to figure out more how the code is working and hopefully integrate with your stuff. Also maybe integrate more of the other capabilities from the powerpod...
Sounds great! IÃ¢â‚¬â„¢m curious to see what will come up. I hope you will share your findings.
This evening after diner I had some more fun and I merged all Three of Xan's programs into one. I can probably optimize it more later, but it was not difficult. I simply extracted out the three different Gait functions and renamed them (RipGait, TriGait, QuadGait) and then extracted out the sequences of code that called these and put them into an if then else logic. I then added some simple code that when you press the X button on the Ps2 controller it would cycle through the different Gates. Currently I think I like the Quad Ripple the best.
ThatÃ¢â‚¬â„¢s the fast way that IÃ¢â‚¬â„¢ve used to check them out quickly. The new version (1.2) will have a single gait sub which covers all. More coming upÃ¢â‚¬Â¦
Xan, your code is a lot of fun to play with!
Thanks, IÃ¢â‚¬â„¢m glad to hear that you enjoy it!!
I just wanted to ask if I could use your Atom pro code with PC? Your code is meant to communicate with either Wii or PS2, but unfortunately I dont have either
I was wondering if there could be some way to map the keyboard keys in-place of PS2 section in the code and communicate via BlueSmirf over blutooth connection. Does this sound logical? or I dont have any other option than getting either a PS2 or RC?
Off course it is possible to work with something else. I think if somebody has got enough time and the necessary resources the can build almost anything!
The Wii version works like this. I connect a Wii remote to my PC using Bluetooth. Then IÃ¢â‚¬â„¢ve got a small program that IÃ¢â‚¬â„¢ve written myself to read out the data of the wii remote. I convert this data that it can be send using the serial port (BlueSmirf connection). I did add a checksum byte to filter the incorrect frames.
The frame that I use looks like this:
<Startbyte $FF> <WiiMoteX> <WiiMoteY> <WiiMoteZ> <NunChukX> <NunChukY> <NunChukZ> <JoyX> <JoyY> <Butt1> <Butt2> <Checksum>
They are all bytes. You can check out the receiver part by looking out at the Wii remote code that IÃ¢â‚¬â„¢ve mentioned earlier in this post. You will need to write a program on your pc to convert the keyboard hits to the frame that you can send to the serial port.
If you donÃ¢â‚¬â„¢t have any programming skills you can do it the easy way and use hyperterminal. You can send keys using hyperterminal and let the code react on that. This isnÃ¢â‚¬â„¢t pretty but it should workÃ¢â‚¬Â¦