artificial-intelligence-class / spherov2.py

Unofficial Python API for all Sphero toys
MIT License
64 stars 24 forks source link

Ir communication [BOLT] #30

Open Dlawlet opened 1 year ago

Dlawlet commented 1 year ago

hello, has IR communication been implemented for sphero in general and bolt in particular? because it doesn't look like it has, I've been digging through the library files and I can't seem to find a way to operate the duo start_ir_broadcast(0,1) on one bolt and start_ir_follow(0,1) on another.

superfashi commented 1 year ago

Similar to #22. Without a BOLT I cannot quite debug this, and a BOLT is somewhat expensive...

jeffyjeffy1023 commented 1 year ago

I mean hey, I got windows 10 and a bolt of my own, buuuut no second bolt/RVR to receive/send IR stuff from/to the bolt. We'd technically need two robots to truly test out the IR..

Dlawlet commented 1 year ago

By changing some methods into partial methods and reversing some arguments, I was able to correct some of the communication IR: Broadcasting, follow and evade work. But I still have difficulties to make the message sending work. I think the problem is at this level: @staticmethod def send_robot_to_robot_infrared_message(toy, s, s2, s3, s4, s5, proc=None): # Untested / Unknown param names toy._execute(Sensor._encode(toy, 42, proc, [s, s2, s3, s4, s5])) [in Sensor.py]

for the moment I put this : @staticmethod def send_robot_to_robot_infrared_message(toy, channel, intensity, proc=None): toy._execute(Sensor._encode(toy, 42, proc, [channel, intensity]))

but it doesn't work.