Hello,
I was just wondering if someone else could run a simple test to verify if this is a bug or my system behave differently.
Test file: pidog/basic_examples/11_sound_direction_read.py
When I run this script, I always get one direction detected as console log below:
config_file: /home/sia/.config/pidog/pidog.conf
robot_hat init … done
imu_sh3001 init … done
rgb_strip init … done
dual_touch init … done
sound_direction init … done
sound_effect init … done
sound direction: 250
ultrasonic init … done
This by itself is quite strange because no sound should be detected at all. So it has a first time false positive.
Now, if I add:
my_dog.rgb_strip.set_mode(“breath”, “blue”, bps=0.2)
before while loop
from pidog import Pidog
my_dog = Pidog()
my_dog.rgb_strip.set_mode("breath", "blue", bps=0.2)
try:
while True:
if my_dog.ears.isdetected():
direction = my_dog.ears.read()
print(f"sound direction: {direction}")
finally:
my_dog.close()
I get false reading in every read.
Here is a sample of console log:
config_file: /home/sia/.config/pidog/pidog.conf
robot_hat init … done
imu_sh3001 init … done
rgb_strip init … done
dual_touch init … done
sound_direction init … done
sound_effect init … done
sound direction: 71
ultrasonic init … done
sound direction: 130
sound direction: 129
sound direction: 129
sound direction: 129
sound direction: 129
sound direction: 129
sound direction: 129
sound direction: 129
It keeps detecting false sound/reading.( terminated the program manually)
Just want to know if this is a known problem or there is something wrong in my setup.
By the way, there are two LED on the back of sound direction sensor. One is green and the other is red. Anyone knows what they indicate? D2 is green, D1 is red
Thank you