Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Action plugin - Buttons

Place your requests for plugins here

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Jahntassa
Posts: 5
Joined: June 7th, 2005, 11:38 pm

Action plugin - Buttons

Post by Jahntassa »

Alright, going nuts here and hoping someone can help out.

I have a display I ripped out of a defunct display unit which works with Smartie. Now, i'm going to use this in my CarPC project..which isn't the problem.

I'd like to set up some buttons around it that'll be able to trigger the Actions (next screen, etc). I know I can use the keyboard for it, but Smartie won't be in the foreground. So, i'm wondering if it's possible to make a plugin that'll 'watch' the PS/2 port for a keyboard input, or at least snag the key when it's not in focus.. Or even create a hotkey that'll wake it up to pay attention..or something..

Basically, I want to be able to hit a button (contact closure), and switch to the next screen without bringing Smartie into focus. Even if I can't do the 'hacking the keyboard' method, anyone have any easy ideas? Or rather, cheap?

Or am I just crazy?
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I have made a serial interface for this, but there wasnt much interest and it is kind of involved of what it does.

I now have moved on to adding buttons using the gameport, kind of like a joystick input. I have got this working on my home PC that created the software but it will not work on any other computers without erroring out. I successfully can control 4 buttons so far and hope to take this number up around 8, maybe more.

Let me know if your interested.

J
maltone
Posts: 17
Joined: May 22nd, 2005, 6:45 am

Post by maltone »

"Let me know if your interested."

i am interested.....sounds good :)
Jahntassa
Posts: 5
Joined: June 7th, 2005, 11:38 pm

Post by Jahntassa »

I'd also be interested.. it'd be a lot simpler through the gameport, right?
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Yes, through the gameport the hardware is alot easier.

I will let you know what a beta version is available, hopefully by the end of the week.

J
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I have a beta version of the new gameport buttons plugin available. Those who want to test it let me know. I have not had a chance to work on the hardware for it, so if you want to test it you will need to use a joystick or gamepad.

I should be able to have a schematic for the hardware available within the next week.

J
Jahntassa
Posts: 5
Joined: June 7th, 2005, 11:38 pm

Post by Jahntassa »

Cool, just let me know when you have something together and i'll see about trying it out!
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I am very busy right now and I probably will not get around to this project for another week or two. If anyone has any electronics or computer hardware experience let me know. Any help would be greatly appreciated in developing the buttons interface.

Thanks
Jason
penjuin
Hardware Genie - Plugin Author
Posts: 42
Joined: June 28th, 2005, 3:42 am
Location: Australia

I think i can help

Post by penjuin »

Hello, im new around here. I just built my first lcd, but i think i may be able to help. I know a bit of c++, VB6 (and php, but thats no use here) and have an interest in electronics. I was thinking that you could make a keyboard style thing by using a resistor chain on the analog joystick port. If you are trying to get anything from the gameport, you are best looking at directx or SDL, but you may have a better solution i haven't heard of.


Image
1 + 5 Vdc + 5 Vdc
2 Joystick A, Button 1 Joystick A, Button 1
3 Joystick A, X Axis Joystick A, X Axis <--- Resistor chain here
4 Ground Ground*
5 Ground Ground
6 Joystick A, Y Axis Joystick A, Y Axis <--- Resistor chain here
7 Joystick A, Button 2 Joystick A, Button 2
8 + 5 Vdc + 5 Vdc*
9 + 5 Vdc + 5 Vdc
10 Joystick B, Button 1 Joystick B, Button 1
11 Joystick B, X Axis Joystick B, X Axis <--- Resistor chain here
12 Ground MIDI RxD
13 Joystick B, Y Axis Joystick B, Y Axis <--- Resistor chain here
14 Joystick B, Button 2 Joystick B, Button 2
15 + 5 Vdc MIDI TxD

*could be used to power an lcd :wink:
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

The plugin is done, it could use some cleanup and testing but it is mostily done. It does use directx. It actually uses a VB6 activex dll for the joystick input, and a VB.Net dll for the smartie end of it.

I can get it to read in presses on joysticks I have laying around and I have a good idea on how to make the hardware, but I do not have the time right now.

If you are interested in messing with it I can send you the plugin.

J
penjuin
Hardware Genie - Plugin Author
Posts: 42
Joined: June 28th, 2005, 3:42 am
Location: Australia

Post by penjuin »

Could you please? that would be great (and the source too if you can)! :D
nbw
Posts: 4
Joined: July 5th, 2005, 12:51 am

Post by nbw »

I think this would be a great idea if you can do it. I'm very interested in this. If unused pins on the 25-pin parallel socket could be used, that'd be neat. Mind you, most PCs have a joystick port sitting around. Looking forward to seeing how the plug-in comes along!! thanks
penjuin
Hardware Genie - Plugin Author
Posts: 42
Joined: June 28th, 2005, 3:42 am
Location: Australia

Post by penjuin »

Im still waiting for _X7JAY7X_ to upload it, but as soon as i get a working copy of it i will contact and/or send you it.

Oh and also, the pins 18-25 on a parallel port are all ground, so that is why a lot of the pins can't be used
nbw
Posts: 4
Joined: July 5th, 2005, 12:51 am

Post by nbw »

much appreciated!! Just like waiting for Santa but without screaming kids and long shopping queues........!!
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Here is the link to the completed plugin. I will have to find the sources for you later, it is a complete mess on my computer...... I barely found this.


http://www.geocities.com/jjacobs20/Buttons.zip

Once you unzip the .dll's to the smartie plugins directory run the .bat to register the .dll (THIS IS VERY IMPORTANT, IT WILL NOT WORK IF YOU DO NOT REGISTER THE .DLL)

The joystick MUST BE installed through the control panel gaming options. If it is not installed in windows this plugin will not work.

As for a simple schematic, I had this for a two button joystick.

http://www.geocities.com/jjacobs20/sample.gif

You should not need the two resistors shown, try taking them out, it should work.

This is as far as I got. With a little hardware, maybe even making a new windows driver for you hardware, you should get 8 buttons to work successfully.

If anyone has question please email or pm me. I try to check this site once a day but sometimes it is not possible.

J[/img]
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

BTW, sorry it took so long to post the plugin.

J
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I dont know alot about programming, but I do not think it is possible to "share" the parallel port. For example, if smartie is using it and you try using it with a plugin as well. This is the main reason I went with the gameport.

J
moosey
Posts: 1
Joined: October 28th, 2005, 10:14 pm
Location: Sweden

Post by moosey »

would it be possible to use this plugin with any available gamepad (even USB)?
if so it would be really easy to just take apart an existing pad and modify the buttons etc to fit your needs.
penjuin
Hardware Genie - Plugin Author
Posts: 42
Joined: June 28th, 2005, 3:42 am
Location: Australia

Post by penjuin »

It depends on how _X7JAY7X_ programmed it. If it draws the buttons from directx, then yes, you can use any joystick. If it's hard coded to the gameport then you can't.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I believe its Direct X. The joystick has to be installed in the control panel/gaming options first before it will work. So I dont think it matters if the joystick is USB or not. My original plan was to start with a 2 button joystick and expand on that(eventually 8 buttons). This project has been set aside right now, but please post what you come up with.

Thanks
J
Post Reply