Jump to content

Serial port switch (Com1)


ajit
 Share

Recommended Posts

Hi:

I am having a foot operated switch connected to the serial port (Com1)

Is it possible to read the switch logic using Serial port (com port) UDF by martin.

If possible, please give me to some clues to go about it.

Regards

Ajit

Edited by ajit
Link to comment
Share on other sites

Hi:

I am having a foot operated switch connected to the serial port (Com1)

Is it possible to read the switch logic using Serial port (com port) UDF by martin.

If possible, please give me to some clues to go about it.

Regards

Ajit

It is possible but I would recommend that you buy a serial port mouse (Very cheap) and connect your foot switch across the left button. Then you will get a proper character to read from the serial port which will tell you the state of the switch. You can also have more than one foot switch.

If you want to get carried away you could connect a wind vane sensor to the mouse wheel circuit and display the wind speed at the same time.

A serial mouse uses 1200 baud, 8 data bits one stop bit and no parity.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

If you want to get carried away you could connect a wind vane sensor to the mouse wheel circuit and display the wind speed at the same time.

Is that in mph or km/h? JK

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Is that in mph or km/h? JK

I would prefer an internationally acceptable unit for wind measured this way like Scroll Wheel Optical Orbital Segments per Hour. (SWOOSH)

Of course this would be a Mouse Anenometer Device idea.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

@martin:

Thanks very much for your suggestions.

But, would a mouse-like switch not interfere when one is doing other work on the comp such as typing.

I had an idea of making something like Express Scribe like software by NCH (freeware); but add some features which I require.

Thanks again.

Regards

Ajit

Edited by ajit
Link to comment
Share on other sites

@martin:

Thanks very much for your suggestions.

But, would a mouse-like switch not interfere when one is doing other work on the comp such as typing.

I had an idea of making something like Express Scribe like software by NCH (freeware); but add some features which I require.

Thanks again.

Regards

Ajit

A serial mouse will not interfere with your normal mouse or anything else because it's just sending data to a com port. For it to act like a mouse you would have to install a serial port mouse driver and select the correct port for the driver. Without that driver set to the port then windows will do nothing with it and you can make your program do what you want. Otherwise any data coming into any com port would cause havoc.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...