PiDog printing debug messages continuously

Did someone just push something to the repo that turns i2c debug on? I’ve been reloading many times over the last few days and no problems, but now it prints continuous debug messages so I can’t see any output.

bouchier@pidog:~ $ cd ~/pidog/examples
sudo python3 2_function_demonstration.py
config_file: /home/bouchier/.config/pidog/pidog.conf
robot_hat init … done
imu_sh3001 init … 2024-03-14 18:09:59,070 [DEBUG] Set logging level to [debug]
2024-03-14 18:09:59,095 [DEBUG] Conneceted i2c device: [‘0x14’, ‘0x36’, ‘0x74’]
2024-03-14 18:09:59,097 [DEBUG] _read_i2c_block_data: [0x0F] [‘0x61’]
2024-03-14 18:09:59,097 [DEBUG] _write_i2c_block_data: [0x36] [‘0x73’]
2024-03-14 18:09:59,147 [DEBUG] _write_i2c_block_data: [0x36] [‘0x02’]
2024-03-14 18:09:59,148 [DEBUG] _write_i2c_block_data: [0x36] [‘0xC1’]
2024-03-14 18:09:59,149 [DEBUG] _write_i2c_block_data: [0x36] [‘0xC2’]
2024-03-14 18:09:59,149 [DEBUG] _write_i2c_block_data: [0x36] [‘0x00’]
2024-03-14 18:09:59,150 [DEBUG] _write_i2c_block_data: [0x36] [‘0x18’]
2024-03-14 18:09:59,150 [DEBUG] _write_i2c_block_data: [0x36] [‘0x00’]
2024-03-14 18:09:59,161 [DEBUG] _read_i2c_block_data: [0x22] [‘0x01’]
2024-03-14 18:09:59,162 [DEBUG] _write_i2c_block_data: [0x22] [‘0x01’]
2024-03-14 18:09:59,162 [DEBUG] _write_i2c_block_data: [0x23] [‘0x01’]
2024-03-14 18:09:59,163 [DEBUG] _write_i2c_block_data: [0x25] [‘0x05’]
2024-03-14 18:09:59,164 [DEBUG] _read_i2c_block_data: [0x25] [‘0x05’]
2024-03-14 18:09:59,164 [DEBUG] _read_i2c_block_data: [0x26] [‘0x20’]
2024-03-14 18:09:59,165 [DEBUG] _write_i2c_block_data: [0x26] [‘0x20’]
2024-03-14 18:09:59,166 [DEBUG] _read_i2c_block_data: [0x28] [‘0x01’]
2024-03-14 18:09:59,166 [DEBUG] _write_i2c_block_data: [0x28] [‘0x01’]
2024-03-14 18:09:59,166 [DEBUG] _write_i2c_block_data: [0x29] [‘0x01’]
2024-03-14 18:09:59,167 [DEBUG] _write_i2c_block_data: [0x8F] [‘0x06’]
2024-03-14 18:09:59,167 [DEBUG] _write_i2c_block_data: [0x9F] [‘0x06’]
2024-03-14 18:09:59,168 [DEBUG] _write_i2c_block_data: [0xAF] [‘0x06’]
2024-03-14 18:09:59,169 [DEBUG] _read_i2c_block_data: [0x2B] [‘0x01’]
2024-03-14 18:09:59,169 [DEBUG] _write_i2c_block_data: [0x2B] [‘0x01’]
2024-03-14 18:09:59,170 [DEBUG] _read_i2c_block_data: [0x20] [‘0xB8’]
2024-03-14 18:09:59,170 [DEBUG] _write_i2c_block_data: [0x20] [‘0xB8’]
2024-03-14 18:09:59,171 [DEBUG] _read_i2c_block_data: [0x20] [‘0xB8’]
done
rgb_strip init … done
dual_touch init … done
sound_direction init … done
sound_effect init … done
2024-03-14 18:10:00,666 [DEBUG] _read_i2c_block_data: [0x00] [‘0xC0’, ‘0x9C’, ‘0x0B’, ‘0xFC’, ‘0xA4’, ‘0xFF’, ‘0xBD’, ‘0xFF’, ‘0x19’, ‘0xFF’, ‘0x23’, ‘0x00’]
ultrasonic init … done
2024-03-14 18:10:00,770 [DEBUG] _read_i2c_block_data: [0x00] [‘0xD6’, ‘0x9C’, ‘0xF0’, ‘0xFB’, ‘0xC7’, ‘0xFF’, ‘0xB6’, ‘0xFF’, ‘0x14’, ‘0xFF’, ‘0x22’, ‘0x00’]
2024-03-14 18:10:00,874 [DEBUG] _read_i2c_block_data: [0x00] [‘0x9A’, ‘0x9C’, ‘0xE1’, ‘0xFB’, ‘0xFB’, ‘0xFF’, ‘0xB9’, ‘0xFF’, ‘0x16’, ‘0xFF’, ‘0x23’, ‘0x00’]
2024-03-14 18:10:00,977 [DEBUG] _read_i2c_block_data: [0x00] [‘0xF1’, ‘0x9C’, ‘0xC1’, ‘0xFB’, ‘0xB7’, ‘0xFF’, ‘0xB7’, ‘0xFF’, ‘0x19’, ‘0xFF’, ‘0x21’, ‘0x00’]

On 3/13 Lovmong committed a change to pidog/sh3001.py in the pidog repo. In this change he set the debug_level for the SH3001 to debug. This has the effect of putting I2C into debug mode which makes all example programs unusable, because the Pidog class instantiates self.imu as an instance of Sh3001, which puts I2C into debug mode. See the gitk image below for the line in error.

Please fix this urgently because the Pidog repo now breaks pidog because the PiDog() class is unusable.

I will post an issue on github as well.

We’re very sorry to have caused you problems with your work.
We have fixed the problem now. Go ahead and update the codebase and run the example again to see how it works.
cd ~/robot-hat
git pull
sudo python3 setup.py install

cd ~/vilib
git pull
sudo python3 install.py

cd ~/pidog
git pull
sudo python3 setup.py install

Thank you for the quick fix. I have tested it and the problem is fixed.

1 Like