Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Method to upload Pythonista code to Raspberry Pi?
-
Pythonista seems to have some really nice built in GUI abilities. I think that it would be really nice to upload Python code to a raspberry pi (from the iPad), and use the iPad to interface with the pi. For example, writing an app to turn lights on and off... I could use a raspberry pi to control the light, and use an app to actually switch the light on and off. Is this something that can be achieved?
-
@jacobengland16 on my iPad, I use
- SFTP to transfer files from/to the PI
- SSH to execute code on the PI (ex: eject an USB key, power off, ...)
- VNC app to use my iPad as a keyboard and screen
-
I'm also interested in transferring code from Pythonista into something else and back. Something else is in my case a GitHUB or GitLAB server, which is already built-in to Raspbian. So far I was searching but haven't yet found a way to e.g. get Python projects from GitHUB into Pythonista and back, using the App Working Copy. Using the share function in Working Copy does not provide enough writing rights for Pythonista to copy files into the working directory. It also seems that Pythonista lacks a good way for integrating a source code management system.
You may consider using Node-Red on the Raspberry. It is made to turn the lights on and off and has a built-in GUI capabilities with excellent graphical programming possibilities. The Node-Red server runs under Raspbian and the programming is done in a Webbrowser, either on the Raspberry itself or via LAN or WLAN too. A Node-Red program consists of a wiring panel with debugging and configuration tools and a GUI with a slightly different URL. You may even call Python code or system commands from Node-Red programs.
-
I use github to move projects from pythonista to and from my raspberry pi.
It is easiest to simple install stash and then git push or pull from pythonista. Alternatively you can scp from stash and move files directly to or from the raspberry pi.When managing the pi I use the Termius app to ssh and manage files via bash, but you can also ssh directly from stash.
It would seem that stash is what you need. Plus using git allows for version control between pythonista and your pi.
Please know that I am no expert, but I hope this helps.
FYI: Stash is on GitHub with an easy one line installer.
-
@jacobengland16, I use a simple script that uses SSH to send the whole working directory to Raspberry Pi. It then runs the code remotely on the Pi and displays the (textual) results.
Very handy for when you develop on the iPhone, and want a very tight feedback loop for deployment and testing.
Let me know if this is relevant and I will share the script.