seraph0x wrote:nilcum wrote:Wow that editor looks GREAT! There was obviously a lot of time and hard work put into it. Good on ya!!!
Thanks!
nilcum wrote:I'd rather go with option two. I think it would be easier to get others involved if there is a direct association with Milovana. However, I feel very strongly that whatever is developed be decoupled from any specific program or system. Meaning, there will be a well defined interface for both software and hardware interop but that interface will be available for anyone to use with any system. I think we are on the same page with this but I wanted to make sure.
Exactly. We are absolutely on the same page. If the software doesn't run as smoothly as expected or someone else comes up with a better/different one, we don't want to reprogram the integration. That's why we're interested in a good interface. Also, we want to see the interface being established as an industry standard, a goal for which openness is paramount. In a market niche as small as ours there is no room for cannibalism. We either work together or we all suffer.
Seeing that we 100% agree on both conditions, I'll put up a vote on admitting you to the Team. These votes run three days and I'll let you know about the outcome then.
nilcum wrote:Now that we have that laid out lets talk some tech.
I really like your idea of using HTTP on a local port for this. I think it fits this problem perfectly. I'm planning to write the initial daemon over the next couple days. Do you have a preference on a development language. I am very good in Python and C but should be able to use whatever... so long as it will have good support for serial communications.
It's your decision. Cross-platform compatibility normally would be important to me, but since the interface is open, we can always write a Mac version of the client further down the road. Speed and "niceness" of the client would be more important. Users should not have any disadvantages from installing it and it should take as little resources as possible. I think C/C++ might fit the bill best. Not so sure about .NET. I associate it with buggy, amateurish and slow programs for which you first need to download a huge .NET runtime library which then screws up your already crappy Windows OS. But you know, I might be biased a *little*.
Seriously though, I leave it up to you. I've laid out our interest: We want a nice little program that does as little as necessary, runs fast, doesn't bug people, has few prerequisites, an easy installation and Just Works. Use whatever technology you would use to achieve these goals.
nilcum wrote:Which brings me to the next thing. For most of the hardware control I was planning to use a serial device. I can use one that automatically does USB but that makes the initial cost of the hardware slightly more expensive. There are also bluetooth implementations that do the same thing in a black box type of format... but then the cost goes up to about $50 just to get the wireless going. I can look for cheaper options if you feel strongly about bluetooth. For now, I think USB is the way to go.
Next, when starting any hardware project the first thing to address is power. The USB port provides 3v automatically. We can use a cable that pulls power from 2 and get 6v power right off the USB port. This will be fine for a small shock or maybe even an electromagnet but when you start getting into the motorized side of things we are going to need a motor that can move a decent load and I think that it will need more than what the USB port can offer. So, I'm thinking external power supply as a standard design.
I'm definitely not for Bluetooth and I agree about the advantages of USB.
One piece of advice I can give though is: Make a plan where the first payout is as early as possible. In our case that would probably mean using some USB vibrator that is already being produced in the Teledildonics scene and getting it to run with the client. Then we can get it to run with the FlashTease viewer, release it and check user reaction. If we manage to get that far, then we can think about the next step. It's just: If we start out too ambitious right away, there is a much higher risk we will never get anything done.
nilcum wrote:The next design choice is how to break things out. I was planning to do Computer -> Control Unit -> Several modules (likely 4 to start with). Each module would have a standard pyhsical interface. Likely a stereo input. The modules would all implement a basic set of command: On, Off, and Level. I want to flush these out a little bit more. One problem I can see right away is that the modules can't provide any feedback to the control unit. This is not a problem for the simple devices but I could see things getting more advanced... such has a hand attached accelerometer that would count the number of strokes and the strength of each one. As you can see I haven't quite worked out all the details yet.
Normally you would have some input and some output channels. It's very hard to do a interface that is flexible enough. I think you would at least need one form of input from each device, if only to confirm it's identity. You don't want the TENS unit electrocuting you, because you plugged it into the dildo slot.
Also I wonder if it wouldn't be easier to just plug each individual device into a USB slot directly? Trying to define a good standardized interface between the controller box and the devices kinda feels like reinventing what USB already is. If we gave every device a very simple chip to do the serial <-> parallel processing and then plug them into the USB port, then I think we would solve a lot of problems all at once.
nilcum wrote:The microcontroller I am thinking of using is the from Atmel's. The ATMega168 is basically an 8-Bit Processor. You get 16K of program space and 23 I/O lines. It will runs at about 20MHz. Best part is the cost $5.00 per unit. That may change if I think we need a beefier chip. The ARM stuff is generally more powerful, but also more expensive, and MUCH more difficult to deal with. There is an open source project called Arduino that uses this microcontroller that I think we would do well to base this stuff off of.
Sounds good. I also project that we might need a chip with a little more punch eventually.
nilcum wrote:Also, there is no reason to limit the daemon to only controlling hardware. It could very easily do other jobs like peer-to-peer networking and control, text-to-speech, microphone and webcam interactions (though flash also offers this), automatic-updates, anything else you can think of that would be a pain to do in flash or a browser?
Yes, it *could* do these things, but I'd rather be careful with adding too many features. Don't really see what you would need P2P for, since we have a server to take care of all communication needs, text-to-speech can be done through a webservice. And Microphone/webcam etc. are much, much better handled by Flash anyway. (Flash has very optimized video encoding/decoding and streaming capability as well as the corresponding server software, stuff that we can't even remotely dream of coming close to.)
I don't like the fact that we need a client. It's going to come at a high price. We have about 5000 daily visitors. Right now only about 0.2% of them ever have technical problems. That is because Flash is such a marvelous platform. It runs the same on all systems and it's very hard to screw it up. But the one thing it can't do is control
custom hardware. And that's what we need the client for. There are just a lot of pitfalls on the way that we have to look out for.
nilcum wrote:Anyway, I know that was a long response. It was kind of a brain dump. For the short term, I want to iron out what the daemon should do, the language of choice, and implement a basic architecture and some of the simple feature.
Ok, I've responded to your comments, so I guess it's my time to brain dump.
First a list of components the base client should have and what they should be able to do:
Installer
Simple, quick, no hassle. Should install as a service, but there should be an entry in the Start menu, where you can start/stop/restart and uninstall it. Of course we can use a free installer package like
NSIS for the installation and uninstallation and simple .LNKs to control the application.
Server
Super simple webserver, only accept local connections. And by simple I mean
that simple. And that server even has authentication which we don't even need.
Module Interface
The best plugin system under Windows that I've ever seen is that of
Foobar. You just download dll files and put them into the plugins directory. (We can always create a fancy plugin manager later, but for now this solution would save us the trouble of writing one while still being super-easy to use. I can elaborate more on the advantages of this plugin system if you would like me to.)
And that's it really. First module would be some kind of hello world, displayed by the client and triggered from a FlashTease, then we can move right on to the first hardware module.
The hottest candidate for a first hardware module would probably be
this little fella. You can buy it online (sold out, but soon to return) and there is open source example C++ code where you can see exactly how to control it. And we can actually use their board design as a starting point for other toys in the future.
I think everything is pointing towards a minimalistic C++ program. We would come out somewhere in the <500 KB ballpark, which would be awesome. And it's pretty nondiscriminatory regarding what the modules contain since they are independent little DLLs, so if you want to do a module that uses .NET and text-to-speech and whatnot - you can. What I also find very charming about this plan is that we don't have to do any major development ourselves, we just have to take that webserver class, that vibrator class, wire it all up, turn it into a service and voila. - Trust me that's going to take long enough.
Other advantages of the C++ minimalistic solution include:
- Few dependencies means people are gonna have fewer problems.
- Simple plugin system means other developers are more likely to write their own modules. Every C++ developer knows what a dll is. If you give them the API and a few instructions they should be set to go. Plus we can look at the foobar2000 SDK for inspiration on how our SDK might look.
Regarding TENS: I just checked my TENS unit's manual. It's putting out
0 - 80 mA (at 0-70 V in a "modified rectangular pulse" with an impulse duration of 250 μs +/- 10% and frequency of 1-100 Hz.) The 500 mA that a USB port is putting out should be way more than enough. (I think 600 mA through the heart will kill you. I know - I watch too much CSI.

) The problem is more in the area of safety. I remember reading that TENS units are legally required to be battery-powered, because otherwise a surge in the power line could kill you. (Hmm, then again, I think the E212 is mains powered, right?) In any case, TENS is probably something we should take a loooooong time to plan carefully. One dead guy and we get a lot of time to think about the next revision in prison.
Regarding doing a controller box: Let's start with the simple USB vibe. Then we decide what to do next on the basis of all the stuff that we have learned by then. Maybe we'll decide to do a box, maybe something else, we'll see. Agreed?
There you go, brain dump complete.
PS: Requesting permission to post this discussion in the Team Forum as well. That ok with you?