As far as I remember there was some other constraints preventing the use of higher speed comms not clear from just that table. It may have involved some errata and possibly the combination of interfaces or something like that.
The ĀµC concerns aside that rate of speed will full duplex lines was most likely problematic due to other constraints (electrical/interface). At higher speeds the cabling, traces, interfaces, etc. I think were also a problem?
A liitle bit of column A, a little bit of column B.
Guessing out-laud wondering if there is some transitions of how the TX pins on the servo work when they are outputting a response?
For example do they switch from something like OpenDrain to something like Push Pole? Could there be a instruction or two (or more) break of when the mode is set and the proper new state for that mode is set, that if an interrupt comes in during that time frame could end up with small drops of signal?
Again just guessingā¦ But that would be something I would look at if I were debugging the servos.
Note: I have seen on several different query functions. Like I had one run where a couple of QAR commands failed Which I would assume would be a quick query, unless potentially at times it has to read in from EEPROM or the like?
I am thinking about doing a diversion in here, and maybe see about adapting your code to run on one or more of my PhantomX hexapods. Probably for sure the AX-12 based one, but maybe also the one built with the XL430-W250 servos.
But the main first thing I want to do is to change out your Input controller, as your controller is unique. Yes I have the earlier one from Jim Frye which I adapted to run a Teensy and XBee and displayā¦ And I even have a partially working with with pots on topā¦ But that makes 2 or 3 of us that have something in that ballpark.
The easiest is probably Arbotix Commander, but that has similar issues. I believe it is discontinued by Trossen Robotics. Could easily design and build a new oneā¦ Either still as shield or simple board, with two thumb josticks
And they had 8 buttons. Should have had 10 but did not route wires to switches in thumb josticksā¦
But instead I am planning to go USB Joystick probably start with PS3 and/or PS4.
Again I wonāt have as many knobs ans sliders like you were using but am thinking of a cross of your stuff with what I was doing with Commander.
That is for Knobs and sliders we have the left and right joysticks. Plus L2 and R2 buttons are more analog inputsā¦
With the Commander I reserved one of the buttons like L1, to say if it is pressed and use that for things like setting body height and position, maybe speed, maybe back forwardā¦
You are using the remote controls 16 button keypad for things. I am thinking to start off with, I might cheat with a 12 button keypad mounted on Robot. Again if fix my screw up of which Qwiic connector is on the board, you can simply plug in one of these:
Your code also sends strings back to remote to displayā¦ Again I will optionally install a small QWIIC display on robot to display things: I already have the Adafruit version:
And arriving Monday I have a larger 128x128:
Again these all will be optional. The initial code can see if these devices exist and use them else notā¦
But Zenta, again wondering if you have had thoughts on the best mapping of axis, buttons and the like that would work reasonably well for you?
Doing this exercise now makes it easier to come up with a standard setup, while we get a better understanding of how to use the LSS servos.
Also gives times for those here who wish to revise/rework/rewrite the code, to for example change the coordinate systems and the like.
Going for a standard PS4 remote is probably the easiest way to make it available for most people. Or maybe the phone/app Madmax posted about, using bluetooth (would be fun to play and test out one day).
My preferable way to control a hex is to use 3-axis joysticks. 2 axis work to though but you loose some abilities.
By default Iām using the left joystick to control walking: up/down = forward/backward, left/right = walk sideways, 3.axis top pot = turning.
At the same time I can by default use the right joystick for rotation along all 3 axis: up/down = pitch, right/left = roll, 3.axis top pot = yaw.
In an additional function I can control translation with either the left or right joystick depending on what combination of motion I want.
Iām using the keypad to choose between the walking gaits 1-4, and selecting leg lift height (A-D). Iām also using the keypad for other functions, but some buttons are vacant, so a 12 button keypad should be ok too. On Morphex Iām using all buttons, but that is a very different beast to controlā¦
The additional 8 knobs Iām using them for selecting different modes and functions. Like Terrain mode, different balance mode, some experimental stuff, joystick functions (left stick: walking/translation, right stick: rotation/translation), select single leg mode, canāt recall all right now. Iām using 4 slider pots with a centering lock, two for different speed/timing settings and one for setting a fixed initial body height and one for forward/backward translation.
When decided what kind of remote to go for we can then agree how to map the buttons I think.
I am figuring on standardizing on PS4 with probable support for PS3.
I have one Sony PS4 that my PJRC friend and usual cohort in crime have code to work with these on T3.6 and T4.x. So far I have only tested on Sony brand ones. We have done several PS3 clones.
So I just ordered a couple of PS4 clones from Amazon, which should arrive next week. Will see if our code will connect to them or not or if I will need to do some more reverse engineering.
For sure will not have as many axis we can control simultaneously, but my guess is we will be able to do a lot with the 2 2axis ones plus the L2/R2 buttons which are more analog, plus maybe with the tilt and rotate of the controller itselfā¦
As far as I can remember, once the ĀµCās UART is initialized it is never changed (i.e. its pins stay the same). The only change I know of would be the tri-state buffers (2, one on TX, one on RX) turning on and off its output (i.e. matching the external line and MCU pin together or not.
I think the easiest way to see if something weird is happening with that TX line would be to connect the logic analyzer on both sides of the signal (MCU<>buffer side and buffer<>bus side) and see if it is different. At a high enough sample rate I should be able to see both the issue youāve seen and also the difference in transition between the two sides (maybe?)ā¦ Not sure how Iāll attach that thoughā¦
What about those cheap wireless Switch controllers (act as XBox360 clones when wired) ones? Iām just asking, heuā¦ for a friend!
Our USB host code especially the Bluetooth stuff was done by us (mostly me) listening to the USB packets that were sent and received and then try to figure out which packets we needed to listen too and understand and which responses we needed to give backā¦
The BT spec I have is over 2800 pages long and we only scratched as much of it as we needed to. We were able to get several BT Mike, Keyboards, joysticks to work, using mostly (HCI and L2CAP parts). However some of them, use some higher level protocols, like SDP and ā¦ We were in the process of figuring out how much we needed to implement to get some of these to work, and then other things grabbed our attention, like T4.x development, support for plug in drivesā¦
But sometime we will likely get back to them.
But as I mentioned I and now friend up on PJRC both ordered cheap PS4 controllers like:
Which should arrive Mid week.
I also ordered a second clone: https://smile.amazon.com/gp/product/B08ZHFM4B5
Hopefully these will work without needing code changes But, I would not be surprised at a minimum may have to add
some detection stuff for them.
But as I mentioned I and now friend up on PJRC both ordered cheap PS4 controllers likeā¦
Yep - I am the other guy that ordered the TERIOS PS4 controller. Looks like it will get here tomorrow for testing.
However some of them, use some higher level protocols, like SDP and ā¦ We were in the process of figuring out how much we needed to implement to get some of these to work, and then other things grabbed our attention, like T4.x development, support for plug in drivesā¦
If I remember right controllers that we tested with the issue with SDP were the XBOX360 (works wired) and the Switchā¦ but its been awhile since we played with these.
kurte - Regarding the LSS servoās I have the KitchenSink board on order from PCBway and have a order in for one of the HSS servos and a couple of other parts - probably should have gotten 2 servos. DigiKey has the order for all the piece parts so hopefully by the end of next week I can start playing. Seems like I have a lot of catching up to do on the thread.
It still has TTL translations for the servos, and I still have two others, which I did not setup to use with XBee as both Teensy and XBee are 3.3vā¦ But the ones labeled 24* and 25* are the ones that were translated. For most part I probably wonāt use the XBee most of the timeā¦ But USB and maybe try out the RC on those pins. I decided on those two pins as, they can be a hardware USART and likewise I2Cā¦ So could try doing some LEDS (DotStar I think)ā¦
On the servos, one of the main pages I refer to is:
There are also pages on the electrical, mechanical and the like you can easily navigate to as well.
@kurte - yep was just going through the wiki a little while ago. Actually printed a copy of the protocol to read over coffee.
Now just have to wait for parts to come in and then familiarize myself with the protocol. Probably start with 1 servo then go to 2 just to see the differences.
@cyberpalin Welcome back to the community! kurte indicates youāre interested in the Hexapod BETA and it would be great to have you on. If youād like us to add you to the BETA GitHub, you can PM me with your contact and weāll add you.
First with Phone appā¦ Not sure of what all in the bluetooth code we would need to talk to something like that.
I thought I would mention, I just pushed up a WIP non-building version of your code (actually just the part with your code builds).
What I have done so far, is to rename most of the .h files to be .cpp files. They were .h files when they were in Arduino libraries as a way to be able to be able to compile the code and have that build influenced by the contents of a header file, like hex_cfg.h But right now all files building in same directory so it makes it easier to cleanup some things (like knowing the inter-dependencies)
I so far made the Controller class to be a pure virtual class, and then created a sub-class of your version of it. So far I left that in the main header file. And most all of the globals in that source file as globalsā¦
I then made it buildableā¦
Then copied your controller class to a new class for USB/BT PSx Joysticks, and put the class definition in a .h file and the code into a .cpp file. I then moved most of the global variables for the controller to be member variables of that classā¦ Had that buildingā¦
But now I am removing the commander code and added USB/BT code plus (optional Sparkfun keypad) and I am in the process of a preliminary mapping of some of the functionality to what controls I have (buttons, Axis)ā¦
I am not done with that part yet so compile fails where it is still mapping to your controls, but making some progress.
Then I will probably hook this up to a PhantomX and see if it moves at allā¦
Then will do similar to Motor controller code and create sub-classes for different typesā¦ Not hard, the code was mostly that, just you only had one sub-class and it assumed thisā¦
Great!
What BT adapter do you use on the T4.1 or do you use USB cable from the controller directly.
Iām still waiting for the board, Iāll get back to see if there is some testing I can do.
Itās mostly the servo library stuff I struggle with.
Looking forward to hear if it movesā¦
As I mentioned, I ordered a couple of PS4 clones which are a lot cheaper. They have not arrived, but @cyberpalin ( mjs513 of PJRC forum) received one of them and looks like the two of us will be busy figuring out how to get it to bind.
I finally got the board too!
Nice board btw! @kurte did you post the pcb file somewhere, itās convenient to use Diptrace to get an overview of every connections. This thread start to get a bit overwhelming and itās hard to get all info.
Also it would be nice to know how to connect everything correctly.
Cut the USB trace on the T4.1 , just place a jumper on J5V if you want to power the T4.1 through USB, right?
Solder 7-center on J9SEL to make XBee on the LSS board work?
The 3-pos switch on the LSS board, I assume you use the Arduino position?
The cell batt on bottom I assume isnāt necessary at the moment?
Are there other jumper settings I need to be aware of on both boards?
Where do I find the current test program?
Iām sorry, but currently my brain is occupied with lots of other things in life so I just need it simple to start with. (Sidenote: A couple of months ago my doctor said I got a disease that will probably last for a couple of years, Iām ok but sometimes not everything is as it should.)
I donāt think it requires any extensive knowledge of the stack. The phone pairs to BT dongle and the communication happens through Serial Profile protocol so its pretty much serial communication just over BT. I still have to play with it a fair bit moreā¦
Niceā¦!! that is the company I used to work for (Cambridge Silicon Radio)
I agreeā¦ I have started putting up some info on a word doc for my own reference. I think it might be worth it if we start having some shared wiki or someplace with just useful infoā¦ guides etcā¦ so that anyone starting off has the knowhow of necessary thingsā¦
oohā¦ I hope everything is fineā¦ Do take care!! If you need any helpā¦ feel free to ask!
I should have the break out board tomorrow or by Friday at the leastā¦