Open Source All-in-One Instrumentation

Jul 19, 2019

Project update 5 of 12

Taking Measurements Remotely

by Dejan Priversek

ScopeFun allows you to control its hardware and take remote measurements from nearly anywhere. In this update we will look into the client-server architecture that makes this possible.

ScopeFun Client-Server Setup

To setup a remote connection, we will run a server application on the computer connected to ScopeFun.

On the client side, the ScopeFun software must be setup to connect through that server application.

After you select the client-server option, your client will search for a server application on the configured IP address and port. Once a connection is established, the server works as a bridge and transparently handles all communication between connected clients and the ScopeFun hardware. The server allows multiple connections simultaneously, so all connected clients can control the hardware and receive data from it.

Using the Python API to Create a ScopeFun Server

The Python API provides another way to connect to ScopeFun. By creating a simple Python server, we can extract data using a Web browser.

On the server side, we have implemented a Python script that reads samples from the ScopeFun oscilloscope and formats the samples into a JSON array. This allow a simple exchange of data between the server and a Web browser. On the client side, we have incorporated JavaScript code into an HTML page that polls data from the server and displays them in a browser.

The following image shows how those data are rendered:

Sign up to receive future updates for ScopeFun.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects