Flynntestpage
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.
Head over to the devices
page:
Select the Sequoia
Raspberry Pi:
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>
Enter
to edit the file. Once you make your edits, type ctrl-o
to “write” the file. Then, do ctrl-x
to exit.
Copying files to the PyCubed drive
Make a file and put some stuff in it.
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.
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!)
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>
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!