9. Workflow Test Drive


parallel development environments

In this class we will work across two environments to complete prototypes:

  1. a laptop: your primary work space, you should always start exploring/testing your idea by writing code on your laptop to confirm general functionality
  2. a Raspberry Pi: move your generally-functional code to your Raspberry Pi for platform-specific tests and, eventually, deployment.

In other words, I recommend doing most of your programming on your laptop and moving to the pi only after you have confirmed basic functionality.


To Test Drive this workflow process let's assume we have already tested a file on our laptop and now want to send it to our Raspberry Pi. We will then rename the file and send it back to our Laptop. Prior to beginning, remember that the general format for scp is as follows:

  1. On your laptop create an empty text file: touch test.txt
  2. Now send it over to your user's home directory: scp test.txt pi@creativetech.local:/home/pi
  3. Enter the password for the user. After a moment the file transfer should finish.
  4. On your Raspberry Pi verify that the file is where it should be with ls
  5. On your Raspberry Pi rename that file to something different: mv test.txt sendback.txt
  6. On your laptop run the following command to get your IP Address: ipconfig getifaddr en0
  7. On your laptop select and copy the address to your clipboard
  8. Back on your Raspberry Pi format your scp line to send the renamed file back to your laptop: scp sendback.txt [USERNAME]@[IP ADDRESS]:/Users/[USERNAME]
  9. Enter the password for your user. After a moment the file transfer should finish.
  10. Confirm that sendback.txt made it back to the right place on your laptop.