Page 1 of 1

write and running python programs on windows

Posted: Sat Dec 14, 2019 5:31 pm
by Luelaes
Hello @ all! ;)

I started programming for my Raspberry Pi but I don't want to write the programs always on my Raspberry Pi directly.

I want to write and test my programs on my windows computer and when the program is running properly I only want to copy them on my Pi.

The challenge is that I want to use the GPIOs of my Pi, I tried to work with "Atom" but when I started testing the program, "Atom" tells me that it doesn't know the GPIOs that I want to address.

Can you tell me if there is a program to write and test python software?
Or if there are add-ons for "Atom" to test the programs properly.


Thank you very much in advance. :)

Cheers,
Luelaes

Re: write and running python programs on windows

Posted: Sun Dec 15, 2019 8:22 am
by paddyg
Yes I think there are a few and I would suggest googling. The first one I found was called fake_pi

Re: write and running python programs on windows

Posted: Sun Dec 15, 2019 9:23 am
by joan
Both gpiozero and pigpio are Python modules which will run on a Windows machine and allow control of the GPIO on a networked Pi.

https://gpiozero.readthedocs.io/en/stable/

http://abyz.me.uk/rpi/pigpio/python.html

Re: write and running python programs on windows

Posted: Sun Dec 15, 2019 11:28 am
by GlowInTheDark
The obvious question here is: Why?

I'm guessing that the reason OP wants to work on the Windows PC is because his favorite editor runs on Windows.

In that case, it may be easier to just setup a (Samba) share between the two machines.

For example, setup a share on the Windows PC, store/edit the program there, then, to test, login to the Pi (say, via PUtty from the Windows PC) and run/test the program via a SMB connection to the PC's shared directory.

Re: write and running python programs on windows

Posted: Tue Dec 17, 2019 4:14 pm
by Luelaes
Hello!

Thank you for your help, I will try your suggestions.

The reason for that is, that I spend a lot of time in the train and I want to work a little bit in the train. ;-)

Thank you,
Luelaes