Jump to content

Flynntestpage

From Stanford SSI Wiki
Revision as of 00:39, 27 October 2020 by Flynnd (talk | contribs) (Sort of works?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Dataplicity Tutorial 1: Getting Access, Online Interface, and Unix Tools

We use Dataplicity to remotely manage Raspberry Pi’s and access to flight hardware such as PyCubed. First, ask Langston, Moritz, or Flynn for access to Dataplicity.

https://www.dataplicity.com

Head over to the devices page:

Devices
Devices

Select the Sequoia Raspberry Pi:

PyCubed
PyCubed

The PyCubed drive is mounted at /media/PYCUBED. In the web view here, there are a number of software tools available to you, such as the ability to reboot, in the right column. All of the unix tools installed on the Raspberry Pi are somewhat accessble to you–for example, you can use the nano text editor to edit files but you can’t use the scp command to copy files from your computer to the Raspberry Pi in this interface.

Editing files on the PyCubed drive

Let’s edit a file on the PyCubed drive with nano!

<source lang="bash">nano main.py</source>

Nano main
Nano main

Enter to edit the file. Once you make your edits, type ctrl-o to “write” the file. Then, do ctrl-x to exit.

Nano main save
Nano main save

Copying files to the PyCubed drive

Make a file and put some stuff in it.

Temp test
Temp test

This time, let’s save the file with ctrl-s (same as ctrl-o but it does not prompt for a file name). Then ctrl-x to exit.

Nano save
Nano save

Make sure you saved the file with the cat command (cat is technically for concatenating (combining) files, but works fine for printing them in the terminal!)

Cat image
Cat image

Now, we will move the file to the PyCubed with the cp (“copy”) command. Syntax for this is

<source lang="bash">cp SOURCE DESTINATION</source> For you, this would be:

<source lang="bash">cp tmp/test /media/PYCUBED/</source>

Copied
Copied

Print the file in your terminal with:

<source lang="bash">cat /media/PYCUBED/test</source> And then delete the file with:

<source lang="bash">rm /media/PYCUBED/test</source> Despite all of these cool things, we don’t recommend using the web interface because it crashes fairly often.



Next Steps

Checkout the next tutorial to learn how to access Dataplicity enabled Raspbery Pi’s with Porthole in your desired terminal—-on your computer, not in a browser!