G470: Difference between revisions
| Line 16: | Line 16: | ||
==User Manual== | ==User Manual== | ||
===PCF8591=== | |||
Test image version: 2022-04-04-raspios-bullseye-armhf.img Raspberry pi 4B | |||
Enable I2C | |||
sudo nano /boot/config.txt | |||
[[File: Pi-sensor-board-01.png|400px]] | |||
Ensure that I2C is on, and then restart the system. | |||
sudo reboot | |||
After restart, address 48 can be detected by I2C address detection command. | |||
i2cdetect -y 1 | |||
[[File: Pi-sensor-board-02.png|400px]] | |||
Ensure that jumper caps are connected to PCF. | |||
[[File:Rpi-all-gpio-test-board-b-03.jpg|400px]] | |||
Download sample codepcf8591 | |||
run command | |||
cd pcf8591/ | |||
sudo python pcf8591_adc.py | |||
[[File: Pi-sensor-board-04.png|400px]] | |||
Phenomenon: | |||
4-channel print AD value | |||
DAC | |||
run command | |||
sudo python pcf8591_dac.py | |||
[[File: Pi-sensor-board-05.png|400px]] | |||
Phenomenon: | |||
The LED lamp changes with the output value of DAC, and the brightness changes. | |||
===LED=== | |||
Make sure that the jumper caps are connected to the LED. | |||
[[File: Rpi-all-gpio-test-board-b-06.jpg|400px]] | |||
Download GPIO_Test.py to raspberry pi. | |||
run command | |||
sudo python GPIO_Test.py | |||
Phenomenon: | |||
The power indicator LED is always on, and the GPIO connection LED is turned on in turn, and then turned off in turn, continuously circulating | |||
==FAQ== | ==FAQ== | ||