SakeTami
tempestvr
tempestvr

patreon


T-Code Serial Controller v1.2

This is an update to the T-Code Serial Controller that addresses a previous issue with double-digit COM ports (ie COM10 and higher).

Downloadable file is attached.

Or else download link: https://mega.nz/#!xB0miaJR!OYVrnZnUAtJCXePGQqBPOtzhBqvxKMONYLufoY6ZYS8

Enjoy!

-----------------------------

The T-Code Serial Controller plugin allows direct control of an Arduino controlled robot sex toy (eg OSR3) via a USB serial connection. The Robot Sex Machine (RSM) is also supported.

There are three main parts:

  1. VaM plugin (.cs)
  2. Arduino sketch (.ino)
  3. VaM demo scene (.json)

The plugin communicates with the Arduino using a simple alphanumeric protocol called T-code, which is generic and intended for Arduino toy innovation. The plugin also supports the RSM, ie direct control of two servos via a Pololu Maestro servo controller.

The VaM plugin features:

The Arduino sketch features:

Put simply, the above is everything you need to link your own Arduino controlled device to VaM.

The demo scene showcases serial output controlled by a hand animation.

The serial controller plugin is installed in the black sphere on the bed. You’ll have to open it to activate the serial connection. Also check that the target point is set to the right hand.

Comments

Time to get coding. You can say you aren’t a programmer, but then neither am I. This plugin is actually my first go at C#. Following up an idea is how you learn. :)

TempestVR

After a short search, it looks like After Effects has some of this type of motion tracking built in. The question then, is how to output the positional information.

TDK

I can't help but wonder if the same principle couldn't be a stand alone reader for 2D video...perhaps by assigning a stick figure skeleton to recorded points on the video, for instance 2 horizontal points across the pelvis or 2 points on top and bottom of a closed hand. The software would have to recognize those points as defining x,y and then translate the position to the bot. It might be possible to create a z position via perspective...meaning that the software records the distance across the initial point skeleton, then assumes z axis value according to wider = closer and narrower = farther away. Unfortunately, I'm not a programmer. So, this is just an idea of how it might be approached. I don't know if a program exists that might already be able to read these values. But, I can't help but think that something as simple as those goofy phone video apps that add spectacles or horns to a moving face, are already doing just that.

TDK

Somehow I completely missed that there were a ton of new features in addition to double digit COM ports, as I haven't had time to spend more than 5 minutes tinkering with VaM in over a month. *sheepish facepalm* I've been able to put the changes I added in to the v1 plugin into the new version (defaulting to RSM,9600 on COM5, and using StartSerial() at the end of the try before the exception catch for "load and go" zero setup functionality in any scene. I now see you also addressed two of the things I never got around to looking into. * A way to limit Z so it's not capable of moving to some crazy angle. Found where I can set a smaller default value, too. Thanks for that! * Adjusting Z so it's always centered around a value of 0 (Z Trim does the same thing on a per-scene basis) I had a few scenes where I had to disable Z because the values were, like, -58 to -52 instead of -3 to +3. Trim fixes that per scene. Great update, once I figured out that I didn't need to add the plugin to the guy (the old way) in the demo scene... *grin* That just caused there to be no output at all. /sigh

TomahawkJackson

Or else, swap the servo leads over should also work.

TempestVR

The “Invert X axis” checkbox should do it?

TempestVR

Thanks for the update, Tempest! Can you add a checkbox for inverted RSMs? Upright: // Calculate reference coordinate system refLineX = refB - refA; Inverted: // Calculate reference coordinate system refLineX = refA - refB; I just haven't been able to figure out the C# syntax to get it working with a checkbox and IF statement...

Jonathon Barton

thanks for the update

Clayfacer


More Creators