j98221
USA
Asked
— Edited
hi
i just purchased the pan tilt hat. i know it works because i tried the python examples.
But how can i get ARC to recognize it?
I do have the ez server installed on the rpi with a camera, it connects, i tried the camera control example and the video works. i added the vertical servo, tried to set it up as D0, D1 and D2. neither will control the pan and tilt hat. i believe the pan and tilt works of of i2C but i am not certain.
information on the pan and tilt hat can be found at https://pimoroni.com/pantilthat
please help, Thank you in advance.
Related Hardware (view all EZB hardware)
Raspberry Pi
by Pi Foundation
Run Synthiam ARC on Raspberry Pi 4+ with Windows 11 for robot control; use external EZB/Arduino for reliable I/O, SSD/USB storage recommended
Wi-Fi
Servos
✕
Camera
Audio
UART
✕
I2C
ADC
✕
Digital
✕
Related Robot Skills (view all robot skills)
Vertical Servo
by Synthiam
Drag vertically to control a servo within set min/max limits; center, release, invert, and mirror to other servos. For 3-wire GVS servos.
Horizontal Servo
by Synthiam
Mouse-drag horizontal servo control with configurable min/max limits, center/release functions, multi-servo mirroring and direction invert.
PWM Servo Feedback (I2c)
by Synthiam
Real-time servo position input via Arduino ADC over I2C; supports Nano (6 channels) or Mega (16), configurable I2C address and scalable chaining.
Requires ARC
v7

you need to install the pyaudio module:
fyi, i just tried to run both in the same terminal session, and i received the same error.
i install pyaudio, i now received the following error
pi@saripi:/BlueberryServer/Blueberry.Server.Python $ sudo python3 Main.py & [3] 1268 pi@saripi:/BlueberryServer/Blueberry.Server.Python $ 1273-root-INFO-Starting... platform=linux hostname=saripi Traceback (most recent call last): File "Main.py", line 178, in main() File "Main.py", line 139, in main setup_PyAudioPlayerController() File "Main.py", line 132, in setup_PyAudioPlayerController com.start() File "/usr/lib/python3.7/contextlib.py", line 239, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.7/contextlib.py", line 82, in init self.gen = func(*args, **kwds) File "/home/pi/BlueberryServer/Blueberry.Server.Python/PyAudioPlayerController.py", line 82, in start start=False) File "/usr/lib/python3/dist-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/pyaudio.py", line 441, in init self._stream = pa.open(**arguments) OSError: [Errno -9997] Invalid sample rate
my python version is 3.7.3-1
There is an issue with Buster and portaudio library you will need to edit your shell script:
add the following line to the end:
you can reboot or reload the shell (previous changes):
if you want audio through the audio jack:
i now get the following error
pi@saripi:/BlueberryServer/Blueberry.Server.Python $ sudo python3 Main.py 1272-root-INFO-Starting... platform=linux hostname=saripi Traceback (most recent call last): File "Main.py", line 178, in main() File "Main.py", line 139, in main setup_PyAudioPlayerController() File "Main.py", line 132, in setup_PyAudioPlayerController com.start() File "/usr/lib/python3.7/contextlib.py", line 239, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.7/contextlib.py", line 82, in init self.gen = func(*args, **kwds) File "/home/pi/BlueberryServer/Blueberry.Server.Python/PyAudioPlayerController.py", line 82, in start start=False) File "/usr/lib/python3/dist-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/pyaudio.py", line 441, in init self._stream = pa.open(**arguments) OSError: [Errno -9997] Invalid sample rate pi@saripi:/BlueberryServer/Blueberry.Server.Python $
i did make the changes as you illustrated. i also just for fun added a horiz servo. tried D0 and D1- as expected the servo did not respond. also just wanted to say thanks for your effort!
can i connect the servo directly to the rpi?
if yes which gpio pin coresponds to D0?