Luelaes
Posts: 2
Joined: Sat Nov 30, 2019 7:53 pm

write and running python programs on windows

Sat Dec 14, 2019 5:31 pm

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

User avatar
paddyg
Posts: 2501
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: write and running python programs on windows

Sun Dec 15, 2019 8:22 am

Yes I think there are a few and I would suggest googling. The first one I found was called fake_pi
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
joan
Posts: 14759
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: write and running python programs on windows

Sun Dec 15, 2019 9:23 am

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

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: write and running python programs on windows

Sun Dec 15, 2019 11:28 am

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.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

Luelaes
Posts: 2
Joined: Sat Nov 30, 2019 7:53 pm

Re: write and running python programs on windows

Tue Dec 17, 2019 4:14 pm

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

Return to “Python”