Are you a faster hacker today then you were last year?   Probably. 🙂  One of the things that makes hacking interesting is the constant search for quick, efficient ways of making and creating stuff!   And even for the hobbyist hacker, there is always a deadline.    For me, the deadline is often a new swell arriving 🙂  or the end of a weekend.  We could always delay the hack until the next set of free time, but we all like to finish things up and get on to the next project.   So I’m always looking to streamline my development flow in the house lab.   When programming an IOT device like the Raspberry Pi Zero,   I wanted a quick way to program the device remotely, allowing for quick updates and design iterations.    In the past, I used programs like filezilla and Notepad++ from my windows laptop, both good and capable platforms, but in the flow I used, required quite a few mouse clicks between iterations.   I wanted a faster design iteration method with fewer mouse clicks and programs.    In addition, instead of windows, I wanted to use my ancient (circa 2006) Fujitsu lab computer running the Lubutu desktop.   With the help of two popular Linux programs, gedit and sftp, I found a super quick flow for Raspberry Pi Zero IOT projects.    In this post, I’ll show you how I streamlined the programming of the Raspberry Pi for a Nixie Tube Clock project.   I would love your thoughts or comparison to other methods you may have or are using.

The method simply uses the lap computer’s gedit program to remotely modify the Raspberry Pi python files using SFTP and then verifying the design iterations with gedit‘s built-in terminal program and ssh.      After listing the software you need for the base or lab computer,   the steps for connecting to the Raspberry Pi system are then shown.


The base computer setup:

  • Operating system: Lubuntu 17.10
  • File Manager :   PCManFM
  • File Editor: gedit
    • Setup gedit to show the python script and a terminal windows on the bottom pane.  Both are default gedit plugins when installing gedit using the Lubuntu Software center.

Raspberry Pi Zero Setup:

The Rasberry Pi is operated as a headless system.    It was set up to automatically connect to the local Wi-Fi network.   Adjust the broadcast name to easily show up on your local routers DNS server.      From your router, you need to get and record the IP address of your Raspberry Pi.   From my Synology router iPhone app, I can quickly find if the Raspberry Pi is on and active.     It is also a good idea to update the operating system of the Raspberry Pi to the latest version.

  • Operating system: Rasbian
  • Network Connection:   Via Wi-Fi

Steps to connect the two systems:

  1. Power the Raspberry PI and confirm the IP address from your local router
  2. Inside the Lubuntu PCManFM file manager , type in sftp://IP.address.of.Raspberry.Ri  in the address toolbox.
  3. When a window pops up, enter the username and password of the default user (i.e. username: pi )
  4. Go to the directory where your code is located.
  5. Left click on the file and choose Text Editor.
  6. Inside gedit‘s terminal window log onto the Raspberry Pi using ssh pi@IP.Address.

Here are screenshots of the above steps.

Screenshot from 2018-02-19 17-57-39
type sftp://ipaddress to log onto the Raspberry Pi machine

Navigate to the file you want to edit and choose Text Editor

In gedit terminal window, use SSH to log onto Raspberry

Design Iteration Flow:

With the above setup, the design flow steps are super simple.   After editing the file using gedit, press the big Save button.  Then run the program in the terminal window (i.e. python  to see how it went.

Here is a short video showing an example design iteration using this method.


Design Code Backups:

It is a good practice to backup your work.   There are several ways to do this.   Because this Raspberry Pi code is just a portion of the complete design,    using SFTP and the PCManFM file manager, I simply copy all the python code from the Raspberry Pi to the lab computer at periodic intervals (maybe a script could do this automatically?) and then use git to keep track of the complete project iterations.     When completed, the project (i.e. code, Ki-Cad Schematics and Layout, Spice simulations, BOM) will be published on github.

Next Steps:

I would love to hear how your design flow setup is compared to what I outlined above.   Please leave a comment below or on Instagram or Twitter.