A-Star - RPi comms does not work

Hi

When I load the example code on RPi - blink.py I get following tracebacks:

Traceback (most recent call last):
File “beep.py”, line 6, in
a_star.play_notes(“o4l16ceg>c8”)
File “/home/pi/pololu-rpi-slave-arduino-library/pi/a_star.py”, line 31, in play_notes
self.write_pack(24, ‘B15s’, 1, notes.encode(“ascii”))
File “/home/pi/pololu-rpi-slave-arduino-library/pi/a_star.py”, line 25, in write_pack
self.bus.write_i2c_block_data(20, address, data_array)
TypeError: Third argument must be a list of at least one, but not more than 32 integers

In the same time I can read from the board (ie pushbutton readings work correctly)

This is likely because you are using python 2 and the latest revision of the library supports python 3 only. I have submitted a pull request to get the astar.py file to be compatible with both versions of python. You can simply run the blink.py example using python 3. If you need to use python 2, you can check the modifications I made to the astar.py file here.

Hope this helps.

Hello

The communication after using the a_star.py you uploaded, goes both ways now (RPi reads and write).
In some cases the write operation is blocked completely when reading is still possible. This happens usually when I run the beep.py. The script is executed correctly, then writing is not possible). In such case I need to reboot both ie the controller and the RPi.
Ps I use the Python 3

Thank you

Adam