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

LCDSmartie control using external buttons?

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
gomthaus
Posts: 3
Joined: April 12th, 2006, 7:06 pm

LCDSmartie control using external buttons?

Post by gomthaus »

Hi there,
I'm not very familiar with this software, but i see it's the best solution to run LCD indicator screen on your computer. I have a 16x2 lcd screen - i would like to add two buttons somewhere in each side of the screen. One should turn the screen in LCDSmartie backward, and another one - forward.

Is it possible? How do I do that? I suppose i should connect these buttons to the COM port?

Thanks.
fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

Post by fishthecat »

Here are some hotkeys http://lcdsmartie.sourceforge.net/parameters.html But they are only good when smartie window is in focus.

What might be good is some 'universal' hot keys that work even when Smartie is in the system tray.
EDIT: THEY EXIST http://www.lansley.co.uk/forum/phpBB2/v ... .php?t=193

Can anyone else help?
Last edited by fishthecat on April 12th, 2006, 11:38 pm, edited 2 times in total.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

It can be done easily with a bit of external hardware using a microcontroller and TTL->RS232 converter. How good are you with electronics (i.e. understanding and soldering)?

J
fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

Post by fishthecat »

Here's an idea.
I use a plugin for winamp called com-port http://diba.hotbox.ru/comctrl/index.html
It's great, you can wire up up to 15 external buttons on your serial port, leaving your parallel port free for LCDSmartie.
As well as controling winamp with it, you can set any of these buttons up to do almost any keyboard button/s press.
Image
As you can see above, you could have an external button that, when pressed, does a SHIFT+ALT+CTRL+a say. If Smartie accepted weird hotkeys like that when it's minimised to the system tray, we've got a useful combination. One set of external buttons that controls both winamp and Smartie.

Does that make sense?
gomthaus
Posts: 3
Joined: April 12th, 2006, 7:06 pm

Post by gomthaus »

My understanding, well, isn't completely novice, but i'm no expert at these things also, i don't have too much experience. I suppose the fastest way to realize this thing is just to do some programming and write a plugin for LCDSmartie, which would gather information received from com port and act in some way, i'm really better at these things. Though it's a shame there's nothing done about it already, i wouldn't like much software in my computer for something as, seems simple, as this.
fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

Post by fishthecat »

jonny wrote:i know this isn't exaclty what you are looking for, but there is a global hotkey plugin:

Hotkey plugin
Above is from this post http://www.lansley.co.uk/forum/phpBB2/v ... php?p=9610

---------------------------------------
This should be a work around good enough to get what you want gomthaus, two external buttons that move Smartie to next and previous screens.

1) Download and install COM-port for winamp. I don't actually need winamp installed. http://diba.hotbox.ru/comctrl/index.html
2) Download and install hotkey.dll plugin for LCDSmartie. http://www.lansley.co.uk/forum/phpBB2/v ... .php?t=193
3) Set up two actions in Smartie for hotkeys 1 and 2, one for next screen, and one for previous. (See readme that comes with hotkey.dll)
4) Set up COM-port to send out a ctrl-F10 when button 1 is pressed and ctrl-F11 for button 2.
5) Create external buttons 1 and 2 on your serial port as per COM-port's instruction. (Wiring guide is included with it) The 4 Button version is the easiest to do. It's basicly just shorting a couple of pins on your serial port when you press a button. You can even test that it works by (carefully) using a paperclip to short the correct pins on your serial port.

Here's the wiring guide from COM-port. I hope they don't mind me posting it, but it does show how easy the wiring is. You don't need the LEDs. It's a great winamp plugin.
Image

That should do the job.
When you press button 1, COM-port does a ctrl-F10. hotkey.dll detects the ctrl-F10 and moves on a screen.

I've just tested it and it works with a 'goto screen' action, so there no reason yours shouldn't work either.
Last edited by fishthecat on April 13th, 2006, 9:24 am, edited 1 time in total.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

gomthaus, what kind of LCD do you have? If its serial, as far as I know, you cannot share the Com port with two applications (i.e. smartie and the comport winamp).

J
fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

Post by fishthecat »

_X7JAY7X_ wrote:gomthaus, what kind of LCD do you have? If its serial, as far as I know, you cannot share the Com port with two applications (i.e. smartie and the comport winamp).

J
If you have more than one com port, you can set COM-port up to use COM2 say. Would that work?
Last edited by fishthecat on April 13th, 2006, 12:25 am, edited 1 time in total.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Yes, two would work.

J
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

I had created this button command two years ago!

It's a top plugin for winmap with great features!!
jonny
Posts: 48
Joined: December 18th, 2005, 5:50 am

Post by jonny »

does anyone know if the winamp com-control can control relays? It would have to be able to write high or low to a pin on the com port.


If not, does anyone know of a utility to control relays from the serial port? I am trying to do a bit of home automation.
gomthaus
Posts: 3
Joined: April 12th, 2006, 7:06 pm

Post by gomthaus »

Thanks for help guys. I'll definitely try out fishthecat's idea.
I'm using 16x2 HD44780 controlled lcd on lpt port. I have only one COM port available on my motherboard, but it's free.
fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

Post by fishthecat »

jonny wrote:does anyone know if the winamp com-control can control relays? It would have to be able to write high or low to a pin on the com port.


If not, does anyone know of a utility to control relays from the serial port? I am trying to do a bit of home automation.
You can control an LED on and off with COM-port. See wiring diagram above. Maybe you can put a relay there instead? I'm no electrician though.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

fishthecat wrote:
jonny wrote:does anyone know if the winamp com-control can control relays? It would have to be able to write high or low to a pin on the com port.


If not, does anyone know of a utility to control relays from the serial port? I am trying to do a bit of home automation.
You can control an LED on and off with COM-port. See wiring diagram above. Maybe you can put a relay there instead? I'm no electrician though.
You have to drive the relay with this signal but you have to some some optocoupler circuit not directly from you port. You cant just replace the LEDs with a relay.
Last edited by limbo on August 29th, 2006, 6:38 am, edited 1 time in total.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

First you would need to know how much voltage the Serial Port puts out. Usually (from a desktop) is about 15v.

No, you cant just replace a LED with a relay. You need something to drive it like a transistor. Next though, as limbo stated, you would most likely (and logically) use a optocoupler to protect the computers com port in case something went wrong. When a coil de-energizes it sends a negative voltage spike back to whatever is attached, this is why most relays have diodes built in. However, most small 5v-9v relays do not have this diode, one has to be added.

J
teemue
Posts: 5
Joined: August 26th, 2006, 10:14 am

Post by teemue »

You can use one LPT for both LCD and external buttons. With LPT's 'status-pins' you can have up to 5 buttons.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

teemue wrote:You can use one LPT for both LCD and external buttons. With LPT's 'status-pins' you can have up to 5 buttons.
Sure but there is no code for this in smartie :cry: . Only a plugin or an external application could get this status... (or the implementation of this function in next version).

But until now it's not supported.
teemue
Posts: 5
Joined: August 26th, 2006, 10:14 am

Post by teemue »

Yeah. I didn't find suitable plugin anywhere. So I made it myself.
jonny
Posts: 48
Joined: December 18th, 2005, 5:50 am

Post by jonny »

teemue wrote:Yeah. I didn't find suitable plugin anywhere. So I made it myself.
i would be interested in trying it out, if you would publish your plugin...
teemue
Posts: 5
Joined: August 26th, 2006, 10:14 am

Post by teemue »

There you go

Please tell me how it works! Unfortunately (and for unknown reason) it didn't work with newest beta version of Smartie (it accepted action only once).
EvylRat
Posts: 53
Joined: September 26th, 2007, 5:33 pm
Contact:

Post by EvylRat »

Using the 4 button - 1 led serial wiring, and the Com - winamp software, how can you light the LED from LCDSmartie, like the Matrix Orbital. I'm going to make a very small 4 button keypad to sit next to my 20x4 lpt lcd. Hopefully, I can wire in an extra LED to illuminate my buttons when the backlight to LCD is on. Just going to have UP/DOWN/BACK/ENTER style pad.

Also, is there a way to trick the software into thinking Winamp is running?
Post Reply