Click windows icon to switch relay

Hi,
I'm working on a pc mod and want to control external hdd via a mouse click

Is there a way where I can click an icon (path set in command line), and have a relay activate (will control a hdd)

If at all possible to run only when clicked. ie:
not run program to switch relay until icon/shortcut is clicked

Does Arduino s/ware need to be running ?
cheers,
Adrian

you can try making a cmd file that starts up

echo command>com1

course change com1 to whatever com port your arduino is, then you can send a text command (replace the word command in the above command) to the arduino over serial to trigger your event

(its been a couple years since I tried this)

[edit]just tried it in 7, it still works, had to enable a serial port in bios lol [/edit]

hi,
thanks a bunch, but my limited know how doesn't help ..

What does the command line need to see for Arduino over serial ?

no idea

thanks

Maybe the following will give yiou answers to some parts of your questions...

don't be put off by the "Delphi" aspects... The Delphi bits are simple, and should be possible to duplicate in any decent Windows, Linux, Mac programming language....

In fact I would WELCOME (and provide links to) other people's "answers" to doing what is shown in the tutorial with other languages in the Master device. Please make your code work as the Delphi code does, and with exactly the same code running in the Arduino.

For the right readers, that "challenge" would be a trivial, and I hope fun, exercise. All you need to get the PC to do is to interact with the Arduino over a continually polled serial link, and sned "do it" messages when a button is clicked on the PC, and respond (in the PC) to simple messages from the Arduino.

The whole thing is just a "get you started" shell, on which many things could be built, if kind experts would help the newbies past the "getting started" bits.

Thats all well & good, but..

all that to control a relay ?

thanks

You probably do what you want to do just using a two line batch file on your desktop. You would have to double click the batch file. If you want a web page control (single click), load apache on your computer and let it run the batch file.

I figured it out..finally

thanks for helping everyone, its kinda starting to make sense now

regards

Tell us more!!! What solution have you been getting the bugs out of?

What does the command line need to see for Arduino over serial ?

sorry, just saw your question and it may be too late but nothing

echo is a ms-dos / windows command to print something

echo bob will print bob on your screen echo bob>com1 sends the text bob to whatever is listening on com 1

so you just make a *.cmd file or a *.bat file to echo whatever command your arduino is listening for on whatever com port its connected to and change its icon to whatever you want

Hi,
every suggestion has its +

I was hoping for super simple design but oh well, that's technology

Well after much thinking I decided to use a NAS router instead..

The HDD can be switched on in the software, and also plug in an Arduino as a network device.

cool

thanks guys for the help along the way

regards,
Adrian