Skip to main content

A EV3 Messaging Library for Python

Project description

ev3msg

Making Communication with the EV3 easier

ev3msg is a library for communicating with your original, unmodified EV3 Brick via Bluetooth

Features

  • Works via Bluetooth
  • Can send strings, booleans, integers and float numbers

Code Examples

  • Connect to the EV3
from ev3msg import EV3

ev3 = EV3('EV3')
# or
ev3 = EV3('00:16:53:47:27:F4')

You can connect to the EV3, by using the EV3 Class and entering the EV3 Name, or it's MAC Address

  • Send a message to the EV3
ev3.send_message('title', 'content')

You can send a message to the EV3 by calling the send_message method

  • Receive a message from the EV3
message_object = ev3.get_message('message_title')

content = message_object.value
content_type = message_object.d_type
title = message_object.title

You can also specify a Timeout Parameter, to wait for the message. Defaults to 5 Seconds

msg = ev3.get_message('please_wait_for_me', timeout=10)
  • Disconnect from the EV3 (please do this)
ev3.disconnect()

Receiving and Sending Messages from the EV3

  • Receive Incoming messages

upload
  • Send Messages back

upload

Credits

Message Encoding and Decoding, as well as some other code snippets by Jerry Nicholls
Check it out here: https://gitlab.com/Jander/ev3-mailbox-python/-/blob/master/ev3mailbox.py

Change Log

0.0.3.7 (09/01/2022)

  • Bug Fixes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ev3msg-0.0.3.7.tar.gz (18.0 kB view details)

Uploaded Source

File details

Details for the file ev3msg-0.0.3.7.tar.gz.

File metadata

  • Download URL: ev3msg-0.0.3.7.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.6

File hashes

Hashes for ev3msg-0.0.3.7.tar.gz
Algorithm Hash digest
SHA256 eb50417e4d258ceb4408c63a546bfe6ea5a9d9d29b280e3af7b8f0dd40003d48
MD5 fe5a1010438df678ed91bb7a8e452b5d
BLAKE2b-256 b431d9f8282d442fbc08b2616ce0922b2b0fa7ee34c7bccdbced3a6f5c29aada

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page