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 hashes)

Uploaded Source

Supported by

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