DIY arduino 2 axis toy

i want to make a DIY toy based on arduino (2 vibro rn) and i need to change config so it sends 2 different outputs on serial port - L and R (i use T-code)
i have almost 0 experience in json and coding (changing AI written code is not coding i think)

this is my dumb config what is good only for not breaking intiface central and making 2 different sliders in IC

{

    "version": {

        "major": 3,

        "minor": 0

    },

    "user-configs": {

        "protocols": {

            "tcode-v03": {

                "communication": [

                    {

                        "serial": {

                            "baud-rate": 250000,

                            "data-bits": 8,

                            "stop-bits": 1,

                            "parity": "N",

                            "port": "COM3"

                        }

                    }

                ],

                "configurations": []

            }

        },

        "devices": [

            {

                "identifier": {

                    "protocol": "tcode-v03",

                    "identifier": "COM3",

                    "address": "COM3"

                },

                "config": {

                    "name": "TCode v0.3 (Single Linear Axis)",

                    "features": [

                        {

                            "description": "",

                            "feature-type": "Vibrate",

                            "actuator": {

                                "step-range": [

                                    0,

                                    255

                                ],

                                "step-limit": [

                                    0,

                                    255

                                ],

                                "messages": [

                                    "ScalarCmd"

                                ]

                            }

                        },

                        {

                            "description": "",

                            "feature-type": "Vibrate",

                            "actuator": {

                                "step-range": [

                                    0,

                                    255

                                ],

                                "step-limit": [

                                    0,

                                    255

                                ],

                                "messages": [

                                    "ScalarCmd"

                                ]

                            }

                        }

                    ],

                    "user-config": {

                        "display-name": "",

                        "allow": false,

                        "deny": false,

                        "index": 0

                    }

                }

            }

        ]

    }

}

The Buttplug TCode implementation only supports 1 linear axis. It does supportsl multiple vibrators (as in your example - be aware that the config format has changed in IC3)

The reason for the single axis support is that that’s all anything is ever coded to handle. The tilt control that devices like the OSR2/SR6 offers are only available in maybe 4 devices. Software written specific for those devices (VaM’s integration and specific video sync tools) are able to make use of that functionality, but ~90% of Buttplug integrations don’t even make use of single axis linear devices: they often just call vibrate when some game event happens.

Thank you, but how do i make 2 vibrators work on one device independently? Its possible if i understand. And where i can find documentation about T-code and ic configs? I searched and didn’t find anything but official dev guide what is difficult to find information i want

It’s not clear to me what you have working at this point. If you’re hardware is accepting TCode Toy code ("T-code") | buttplug.io commands, and it’s working with some of the TCode specific clients (I don’t have links to any), then we can look into what’s needed to make Intiface talk to the device. But we’re not the place for DIY hardware and won’t provide support for that side of things. You might want to take a look at the T-Vibe though: https://www.patreon.com/posts/introducing-t-58307604

so - i have 2 ripped off from random smart watches vibro motors and i want to make them work with buttplug via arduino listening serial port.
i need to make IC send different channel ID as i read. what i need to add in the config file?
and thank you for clarify many thing about buttplug io for me

You need to get the hardware working first. There’s no point me helping you with your config if you haven’t got the hardware working properly: we will not be able to see which part isn’t working and we will not debug your hardware.

hardware already working with different config of only one axis

{
    "version": {
        "major": 3,
        "minor": 0
    },
    "user-configs": {
        "protocols": {
            "tcode-v03": {
                "communication": [
                    {
                        "serial": {
                            "baud-rate": 250000,
                            "data-bits": 8,
                            "stop-bits": 1,
                            "parity": "N",
                            "port": "COM3"
                        }
                    }
                ],
                "configurations": []
            }
        },
        "devices": [
            {
                "identifier": {
                    "protocol": "tcode-v03",
                    "identifier": "COM3",
                    "address": "COM3"
                },
                "config": {
                    "name": "TCode v0.3 (Single Linear Axis)",
                    "features": [
                        {
                            "description": "",
                            "feature-type": "Vibrate",
                            "actuator": {
                                "step-range": [
                                    0,
                                    255
                                ],
                                "step-limit": [
                                    0,
                                    255
                                ],
                                "messages": [
                                    "ScalarCmd"
                                ]
                            }
                        }
                    ],
                    "user-config": {
                        "allow": false,
                        "deny": false,
                        "index": 0
                    }
                }
            }
        ]
    }
}

so all i need is to add index part and read first number of value after V?
i did not fully debug first config i pinned so probably its just me being a silly not fully understanding guy

This is an IC2.6 config which will break when you upgrade to IC3.

What have you tested your hardware with so far? Is it able to control the vibes independently?

oh i saw i was using IC 2.6.8 but its working fine so should i update IC or not?
i tested it with heat (game) multifunplayer, music-vibes and all of this worked pretty well
no, it does not work independently and in IC it appears as a single slider with last config. (also, vibes means vibrators right?)

i think the problem is in way my code interpreters t-code commands
logic is if V then take numbers and map it to 0-255 for PWM controlling BOTH vibrators (and if S - stop) and when in config you didn’t assign index it uses 0 so its mapping 0{pwm} and work good but when i tried with index 1 its broke and did some silly numbers (255)
am i right with index 0 for not assign and the format of V(index)(PWM)

i have no clue how to do serial sniffing to watch what exactly coming from IC so i was “programming” almost blind with AI written code as a reference xd

So. This is what I was saying about getting your hardware working first. You have not tested with an actual TCode client (MFP could do this for you): testing with Intiface is NOT going to help you debug your TCode support on the hardware side.

Go get some help from a DIY hardware community first.

1 Like