1

I want to connect the Adafruit I2S 3W Class D Amplifier Breakout Board and an 2.2" TFT Display (ILI9341) to a Raspberry Pi Zero.

However, it seems that by default both components use the GPIO 18 (the Amplifier for the bit clock and the display for the backlight).

So I would like to change the connection of one of the components to another PWM-Pin (e.g. GPIO 12).

But i could not find where to change the GPIOs. In all the tutorials I read so far, there is no mentioning where the used GPIOs are defined.

Does anyone know how to change the Pin-Configuration for either one of the components so I can use them both with the Pi?

| improve this question | | | | |
0

The solution is pretty obvious:

I just put this in /etc/rc.local:

gpio -g mode 12 pwm
gpio -g pwm 12 1024
| improve this answer | | | | |
  • It may work at the moment but it is likely that you run into trouble in the future. Please take note that using /etc/rc.local has limitations due to Compatibility with SysV. We have seen many problems here on this site using it. Following the recommendation of the developers from systemd you should avoid using it. – Ingo Oct 15 '19 at 7:21
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Mar 13 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.