0

With a button connected to GND and PIN_D on a V2 AIY Voice Bonnet and code:

from gpiozero import Button
from signal import pause
from aiy.pins import PIN_D

button = Button(PIN_D)
button.wait_for_press()
print("The button was pressed.")
pause()

I get messages:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/AIY-projects-python/src/aiy/pins.py", line 475, in _poll
    callback()
TypeError: _pin_changed() missing 2 required positional arguments: 'ticks' and 'state'

Any suggestions for what to try next would be much appreciated.

  • Can you try the same code and circuit with this image : https://github.com/google/aiyprojects-raspbian/releases/tag/v20181116 ? – Manoj Sep 11 '20 at 02:36
  • I tried this without success, the led flickered, and brightened slightly when the button was pressed, but other things didn't work as expected, so I'm back to a vanilla install of the aiyprojects-2019-11-13.img.xz which seems fine, except for the problem described above which persists. – Roger Koenker Oct 02 '20 at 15:27

0 Answers0