RVR sphero + Raspberry pi + Python SDK + events

In Sphero Edu app we have some events like on color, on collision…etc, are there any similar api available for the python SDK?

1 Like

Hello @malavikak,

Just like in the Sphero EDU app, you can listen for events like in the example below:
https://github.com/sphero-inc/sphero-sdk-raspberrypi-python/blob/master/getting_started/asyncio/infrared/listen_for_and_send_ir.py

In this case, you can define a handler routine called:
async def infrared_message_received_handler(infrared_message):

There are handlers for many events. Feel free to explore the getting started examples in the repo!

Quentin

1 Like