Jump to content

gyom

Basic Member
  • Posts

    17
  • Joined

  • Last visited

About gyom

  • Birthday 06/18/1981

Retained

  • HyperNewbie

gyom's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Thanks for the code.. not the first time I say this but making code open source is the only way to make thinks better for all of us! Just look at VP and all the progress it made since it was release open source! As for the vp events problems.. I'm about to open up VP and VPM and implement it directly into the software. I've already compiled the code in my VS2010 Express (that was quite an feat lol). The only problem is that I've not touch C++ since school 10 years ago, and code look like a mess with almost no comments.. Wouldn't be great to have a "Force Feedback" checkbox directly in VP with a choice to select either LedWiz or Arduino, and be able so bind the events directly in the object properties in the VP table editor? lol..!
  2. My work is at a stand still right now since I switched into cabinet building mode! I will be easier to test the outputs if I actually have outputs to tests.. lol (and I have still no way to grab events from pinmame)! And it takes time to received my components. I buy everything on ebay from China and it takes 3 weeks each time. I'm also taking pictures and I'll post a blog soon for those interested in my "arduipin" build. I'm thinking if I could switch my Arduino into an HID joystick. It would make it easier in one way since it wouldn't require the "vJoy" since it would be recognized as an actual joystick, but would make it harder to code and test since it require to flash back and forth each time you want to update the code (flash to "arduino mode" to update the code, flash to "HID device" to test the code).
  3. I've updated my code in my github project: https://github.com/gui999/ArduiPin (visual studio 2010) REMEMBER, this should only be considered only as a proof of concept right now.. while I've tried to remove it, there's still hardcoding involved. The best example are the pin #. I've uploaded the code for the curious out there that want to know how I've managed to link my Arduino with vJoy to interact with VP. A LOT of things not implemented yet in the C# code.. like outputs (I have no way to test right now), analog inputs, etc. So a LOT of TODO. The "digital/button" inputs work great. ZERO lag between a button push and the resulting event in VP. Hope the code is readable enough!
  4. Exactly! The voltage spike should read more or less depending on the force the strike! Cheap and easy (piezo are like what, 25-50 cents?). The easy setup would only require an 'L' braket and a piezo while the "complex max feeling setup" would require some kind of small wood track with the piezzo at the end, and an actual pinball. Now I just need to find a plunger to test both ways.. lol!
  5. No, I was thinking of putting only the piezo without the led, and reading the piezo with one of Arduino's analog pin. Depeding on the force (how for you pull the plunger), the Arduino code should be able to tell the difference in velocity since the piezo reacts like an variable resistance. I'm not sure how VP works with analog plunger tho since I've never . I know it's working with the 'Z' axis, so I was thinking that I could translate the voltage difference (impact) and translate it into z-axis data on the vJoy.
  6. Thanks maxx! That's exactly what I've beeing looking for in the last couple of days! And it's pretty cheap, 4$ free shipping on ebay.. with the Arduino, will be pretty easy to convert the data into vJoy XY axis. As for the nudging.. I think I'll try the piezo! And I've think of an other option.. for more "real feeling" of hitting a ball with the plunger: Add a real ball! The way I see it, at the end of the plunger, I could add a real ball with a small track of about maybe 5-6 inches and add at the piezo at the end of that track, once again protected by foam/plate combo like a virtual drum (think rockband drum lol). So you would hit the ball and the ball hit the piezo. It would add a little lag between the strock and the actual input, but I'm pretty sure it would be quite small for the amount of feel it would add. The really thing, would be to be able to see the ball behind the glass and see it "continue" it's way of the table. But that would require changing the tables to hide the plunger.. too complicated for now lol. If people are interested in my code, I can add it to my project on github. It's still a "test/hardcoded" project, but if some of you are interested on how to implement the Arduino/vJoy.. I'll gladly share it!
  7. As for my "problem" with my input conversion of the Arduino's data to something VP can understand.. I found a nice solution. So far I was using a dll that injected keypresses directly into the DirectX input buffer with a mechanism that made sure VP was always the active window. It was working great, but only working for emulating a keyboard or a mouse, which doesn't help for my analog plunger and nudge. After a lot of research, I found a nice little software: vJoy. It's a virtual joystick driver that windows recognize as a real joystick (and so does VP). It comes with an SDK (dll) that allow to control it from code. So I changed my test code to implement it and it works great! And it's so much easier.. no need to inject keys or setfocus to VP thru weird complicated code. Just acquire the joystick and change the buttons status. The bonus? Since a joystick, it as XYZ axis (even more with rotation and POV). Problem solved!
  8. Thanks for the reply maxx! The thing is that I'm trying to get both inputs and outputs with my Arduino, so the 2nd board option is not good for now. But I might have found a better idea to my plunger, once again based on my megadrum project: piezzo. It would be so easy.. a plunger, an 'L' bracket, a piezzo and a bit of foam so the rod don't strike the piezzo directly. It would be exactly like a stick strike on a drum!
  9. Well since I'm working on an Arduino controller, I'll be able to hook the plunger on it! The hardware and Arduino part will be the easiest I think. The led circuit is pretty standard and you just have to hook it on one of the Arduino's analog pin. Since the plunger is a big spring, the sliding mecanism is already present, it's just a matter of figuring out the best way to hide/show the leds. The easy way would be to put the plunger in a box with 2 holes (for both leds) at an angle where when the plunger is at "rest", the rod blocks the way (so no light from the led to the receiver), and when the spring is fully pull, the rod is not blocking any light (full light from led to receiver). A bit like that Reading the value is almost the same thing I've already did so far. The hardest part (as always with Visual pinball), is how I'm gonna convert the inputs into something VP can understand. I'll have to find what VP can handle actually accept as plunger input, I haven't had the time so far. But the easiest would be to emulate a mouse movement (or mouse wheel up/down).
  10. For those who might be interested in my current work, I've put my code on GitHub. PLEASE READ THE README! https://github.com/gui999/ArduiPin/ It's only my "UNTESTED" Arduino code since I'm curently redoing my C# interface. I'm looking to maybe switch to WPF over standard Windows Form, mainly for it's databinding and commands cabability. I want to create an Arduino object with a visual representation of the board, with clickable pins to link them visually to events, keys (for inputs) or toys with a way to manually launch a command to test the toys (a test mode). Also, I'm looking for a way to build my own analog plunger and implement it in my Arduino code. It's an idea I took from the DIY hi-hat I've planned to build for my megadrum: http://www.megadrum.info/forums/viewtopic.php?f=3&t=422 All you need is a plunger, and one of these: http://www.radioshack.com/product/index.jsp?productId=2049723 Since the plunger is one big spring.. it should be fairly easy to build.
  11. Hi shifters! Well for what I've read so far (I'm no VP/VPM expert), but I think there will always be a problem the ways things work right now between those 2. There is no "master of the key".. by that I mean that everything must daisy chained because the COM object as to be created in the tables script and there is no other way since VBScript doesn't support any other way to interact with dlls. So since VP is the only owner/creator of the VPM object (the famous CreateObject("VPinMAME.Controller")), if you want to access the VPM object you have to "hook" to it by placing yourself in the middle to be the creator/owner of the VPM object. Like I said I'm no expert, but I'm pretty sure it's the way BS2 or UVP works.. they replicate the same interface as the VPM Com interface (so it's the same signature) and create their own COM so VP don't see the difference (that's why you just change to something like CreateObject("B2S.Server")). Even if we run VPM directly in VP with direct dll access, you still have the problem that things like B2S won't work.. Like I said, as long as things will work that way, things gonna be messy with all the daisy chaining. VP can't be the owner of VPM (or any other soft). VPM should be on is own allowing anyone who want to listen to it. So the main problem to attack for me is that. I've read so much stuff this week to try find a solution that my head gonna explode.. but there's a couple of solution path I think (once again, I'm no expert..), like running VPM in a COM server .exe (out-of-proc) and turning it in a "Singleton" so everytime someone try to instanciate it (createobject), it return the same object (pointer). Or having a dedicated dll that create the VPM object and have 1 function to return it, so once again anyone who want to have access to VPM call that dll. But that would mean to change VP since like I said VBScript doesn't support dll calling other than COM. Example, you want do develop your Arduino driver, you call that dll that return you the pointer to the unique VPM object. After that you could just ping it to see the states of the led/sol and translate it in outputs for the arduino. Meanwhile VP still does it's thing. The only consern would be making that dll safe so people could just listen (read) the object and not change it.
  12. Hi, I've been working on my Arduino Mega for the last couples of days. My goal is to both replace the LedWiz and the Ipac. So far the Arduino code is done (still it will need modifications later if I use shift registers).. it's sending inputs to a C# program that translate the message into keypresses. So far so good, there's is no lag between the push of the buttons and VP. Almost no hardcoding to make it easy to configure. You just have to change 2 arrays in the code with the pin # used for I/O. The next step is to interface that C# program with VP and VPM to send commands to the Arduino (again the arduino code is done).
×
×
  • Create New...