Getting Started with Devices

Pictorus currently supports code deployment to Linux single-board computers and a selection of embedded STM32 boards. We can directly deploy software to a single board computer, and manage software deployments to embedded boards connected to your laptop/desktop or a single board computer. In this section we'll go through the setup for these two use cases.

Overview

There are 4 basic steps that must be completed to deploy software to a connected device from Pictorus:

  1. Connect a device (laptop, desktop, single-board computer) to the internet
  2. Install the Pictorus manager on your device
  3. Register your device with Pictorus
  4. Configure your device to deploy software to an appropriate target (either Linux process or embedded board)

Connecting Your Device to Wifi

In order to interact with your device in the Pictorus UI, you'll need to ensure it's connected to the internet. These instructions vary from device to device, so you should follow the setup instructions associated with your hardware. Here are some links to network setup instructions for some common single-board computers.

Registering your device with Pictorus

(You can also read our Blog post on setting up devices for more details.)

In order to deploy software to your device, we need to install our device manager, and register the device with Pictorus cloud.

Install Pictorus on device

In a terminal on your device, simply run the following to install the Pictorus device manager locally:

sudo pip3 install pictorus

Register device with Pictorus

Next, run the CLI to register the device. A prompt you to verify your Pictorus login credentials, before asking you to name the device. Note: if your account was created with a Google/Github sign in, you will need a token to configure the device. Click the toggle button above the listed commands to generate a token for authentication.

sudo pictorus-cli configure

Authenticating with a token (for accounts set up with Google/Github):

Get authentication token

Registering your device

Once this is done, you should be able to select your device from the deployment drop down menu in the upper-right hand corner of the app builder.

Registering your device

For single board computers, you can deploy software immediately after following the above steps, using Pictorus's default configuration settings. You have the ability to push software to your device as long as it remained online, using the Deploy button just to the right of the device selection drop-down. Apps deployed to devices do not automatically start running (for safety), so you must hit the Play button to the right to start the app. At any time, you can hit Stop to stop the app. A note of caution: Your device must retain a stable internet connection to Start/Stop reliably!

For embedded boards or to manage multiple apps on one device, see the below section.

Embedded Boards

Currently, Pictorus can deploy software to an embedded board connected to a laptop, desktop or single board computer with an installed device manager. An additional configuration step is necessary to deploy software to an embedded target. After completing the above steps for registering a device, click on the three dots to the right of the device name in the deployment drop down menu. This will take you to the device configuration menu, where you can manage device deployment targets.

You will see a process target titled 'Main', which is the default configuration for single board, Linux-based computers. Click on the 'Add Embedded Target' button to create a new embedded target, add a name, and select the appropriate platform and target type. The newly created target will now appear in the deployment dropdown, nested under a device name. Select the target to deploy your app to it. Multiple embedded boards can be added to a single device, and will appear as a list in this section. A green circle will appear next to connected hardware.

Device targets

Note: You may also need to make sure you select the correct platform and target type in the app settings menu.

Build targets

This can also be setup on app creation in the 'Advanced' settings dropdown menu.

Target on app creation

Running Multiple Process Targets

In the device configuration menu, you can also add multiple process targets. This allows you to run multiple Pictorus apps on a single-board computer. Simply choose 'Add Process Target' and name the target as you wish. Remember to select the correct target name when deploying.

Create multiple processes