Skip to content
This repository was archived by the owner on Jun 19, 2022. It is now read-only.

Using Argos

Daniel Mader edited this page Nov 24, 2020 · 2 revisions

Usage

As we now have everything installed, now comes the fun part ...

Package preparation

Put the powered-on XDK (yellow light should be blinking) inside the box and put some other not-so-valuable items you want to deliver in there. You can tape the XDK to the inside of the box, if you don't want it to be shaken around too much.

New channel

Make sure the backend is running, as well as an instance of streams-decoder and an instance of streams-http-gateway (it doesn't matter if you have them on your local network or hosted somewhere in the cloud).

Go to the frontend and refresh the page. Wait a few seconds and a new Channel ID should be displayed in the field.

Scan QR code

  1. Connect to your Raspberry Pi via ssh and run python3 scanner.py 192.168.1.2 where you specify the IP of the computer that runs your Argos backend.

  2. After a short camera warm-up period you should see messages like these: > Sending video frame ... and your Argos backend should print out messages like Received binary message [11025 bytes].

  3. Your Raspberry now streams the video to the Argos backend which will pass it on to the frontend via websockets for you to see.

  4. Position the camera to scan the QR code on your package.

  5. After a successful QR code detection, refresh the frontend again. A message should appear that registers your delivery as active.

Go crazy!

Now handle the package with care ... or don't! ;-)

As asynchronous data polling is currently not implemented, you need to refresh the frontend from time to time to fetch the latest data from the Tangle via the Streams Decoder. Be aware that this can take some seconds (Argos is currently not supporting Keepy yet, but might in the future).

Debug hint: if you take a look inside the package and see the red light is active on the XDK, it means that at least one drop has been registered and everything is working as expected.

Registered Drops

In the frontend you should now see at least one drop of the package along with a timestamp and a geolocation (which is currently a fake location in our scenario as the XDK doesn't have a GPS sensor on board). We would need additional sensors to track the actual GPS location.

Your screen should now look something like this:

You can verify the data being displayed by the frontend by clicking VIEW ON TANGLE.

Complete the delivery

If you haven't damaged the package too hard, the QR code should still be readable, so scan it again to complete the delivery.

Clone this wiki locally