📺Conference Assistant

This project aims to make Misty a conference assistant.

This is a basic interpretation but her code can be enriched with many actions and sentences that can assist the speaker at a conference. This code will allow the speaker to control the presentation triggering Misty's bump sensors. If the rear right sensor is triggered Misty will move to the next slide, if the rear left sensor is triggered Misty will move to the previous slide. After you run the Python code from your computer open your presentation and wait for the magic to happen.

We have also added another command: if you press the front left sensor all the events will be stopped and your program can finish under your control.

We will utilize the Python pyautogui library for this purpose, which enables our code to control the keyboard. To install pyautogui, use the following command line in your terminal: "pip install pyautogui". Press enter and wait for the installation of all the required packages.

It can only be used in a desktop environment and is not compatible with the Misty Studio Python Interface, so ensure you have all the necessary resources for the task before initiating.

from mistyPy.Robot import Robot
from mistyPy.Events import Events
import pyautogui
import time

misty = Robot("YOUR_IP_ADDRESS") #your Robot IP Address

time.sleep(2)
def bumped(event):
    if(event["message"]["sensorId"] == "brr" and event["message"]["isContacted"] == True):
        misty.change_led(0, 255, 255)
        pyautogui.press("right")
        print("next")

    if(event["message"]["sensorId"] == "brl" and event["message"]["isContacted"] == True):
        misty.change_led(255, 0, 255)
        pyautogui.press('left')
        print("previous")

    if(event["message"]["sensorId"] == "bfl" and event["message"]["isContacted"] == True):
        misty.unregister_all_events()
        print("finished")

misty.register_event(event_name='bump_event', event_type=Events.BumpSensor, callback_function=bumped, keep_alive=True)
misty.keep_alive()

Last updated