engineeringintern
Posts: 1
Joined: Tue Jun 12, 2018 2:49 pm

How to Use Raspberry Pi to start a program on a external Computer

Tue Jun 12, 2018 2:55 pm

I'm currently working on a project that requires a raspberry pi using python to start at a given time and start and possibly control another program on a windows pc. I know its possible to start a command at a given time, but is this possible?

User avatar
mark3112
Posts: 46
Joined: Mon Apr 09, 2018 10:39 am

Re: How to Use Raspberry Pi to start a program on a external Computer

Tue Jun 12, 2018 5:44 pm

Possible? Don’t see why not. How much finesse do you want?
What sort of control? What other program?
Quick and dirty solution. Have a PowerShell script on the PC that occasionally pings the Pi.
When it responds.... (PowerShell gives you .NET and a relatively simple interface)
You can make a real CPU in a FPGA, but you can’t make a real FPGA in a CPU.

User avatar
thagrol
Posts: 4257
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: How to Use Raspberry Pi to start a program on a external Computer

Tue Jun 12, 2018 10:05 pm

mark3112 wrote: Possible? Don’t see why not. How much finesse do you want?
What sort of control? What other program?
Quick and dirty solution. Have a PowerShell script on the PC that occasionally pings the Pi.
When it responds.... (PowerShell gives you .NET and a relatively simple interface)
Nope, that'll start the remote process whenever the Pi is up*. OP used "possibly" which suggests the remote process isn't always required.

*Well with the default network settings on the Pi.
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

User avatar
thagrol
Posts: 4257
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: How to Use Raspberry Pi to start a program on a external Computer

Tue Jun 12, 2018 10:15 pm

Can't give more guidence on how to start vthe remote process without knowing more about both it and the model Pi you're using.

However a couple of vague suggestions:
1. Write your own python client on the PC that you can comuunicate with from the Pi.
2. If using a Pi Zero/ZeroW configure it as a USB keyboard gadget and send keypresses to the windows machine.
3. Google suggests this: https://lxadm.com/Accessing_Windows_con ... from_Linux but I've not used it so can't comment on it's availabilty and functionality.
4. Install cygwin and its openssh package. You can then run remote commands like this:

Code: Select all

ssh user@windowspc 'command.exe'
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

Return to “Advanced users”