Client for EdgePi RPC Server
Project description
EdgePi RPC Client
The RPC client exposes functionality of the EdgePi Python SDK to be used over either a network connection or on local sockets, allowing for potential remote control of the EdgePi.
Since the client directly mirrors the SDK, you can take advantage of the user-friendly SDK functionality with the flexibility of different connection protocols depending on your specific use case.
You can learn more about the Python SDK here.
Using the RPC Client
Install the RPC client through the terminal:
$ python3 -m pip install edgepi-rpc-client
Once installed, you can control the modules of the EdgePi directly through the SDK's wide functionality.
For example, from a remote connection with address localhost
and port 5555
, initialize a client module as:
from edgepi_rpc_client.services.adc.client_adc_service import ClientAdcService
from edgepi_rpc_client.services.adc.adc_pb_enums import ADCChannel, ConvMode
# initialize ADC Client
adc_client = ClientAdcService('tcp://localhost:5555')
# configure ADC to sample input pin 4 (the input pins are 0-indexed)
adc_client.set_config(adc_1_analog_in=ADCChannel.AIN3, conversion_mode=ConvMode.CONTINUOUS)
# send command to start automatic conversions
adc_client.start_conversions()
# perform 10 voltage reads
for _ in range(10):
out = adc_client.read_voltage()
print(out)
# stop automatic conversions
adc_client.stop_conversions()
Once the client is initialized you can control the EdgePi exactly as you would through the SDK.
For details about available modules visit the SDK GitHub repository linked above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file edgepi-rpc-client-0.0.14.tar.gz
.
File metadata
- Download URL: edgepi-rpc-client-0.0.14.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a9cccdadbc7c4942d4a3f45344b583ddd895d9e3f55be83c325f0ba29899a9 |
|
MD5 | af24dfe23e21da182746c770765dcfa9 |
|
BLAKE2b-256 | bc952b541588f8fa0e00426ca4445f746fd4d11fafdeb9ffe6b4ba6a7b2014d0 |
File details
Details for the file edgepi_rpc_client-0.0.14-py3-none-any.whl
.
File metadata
- Download URL: edgepi_rpc_client-0.0.14-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ede1eb158fa50e6f8499aa67faffcbb52b04b7a41fc85d2265de4ded44b238 |
|
MD5 | f5caf6fde95db1a0d73412a2c449104e |
|
BLAKE2b-256 | 6a75aa1b701e3c1a1e7509d0f7d67e60cba5c74e3e40e35200bca58ca7e58e7b |