Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

45
How to free GPIO20 and GPIO21 for device tree
Post Flair (click to view more posts with a particular flair)
Post Body

I want to make a D-pad with four buttons on GPIO16, 20, 21, and 26. 16 and 26 map to keyboard directional keys using device tree without a problem, but when I try to map 20 or 21 the entire fragment fails to work. They work if I read them as an input pin with Python, but I specifically want them mapped to keyboard keys in the device tree.

I see on the pinouts that GPIO20 and 21 are mapped to PCM. Audio is not enabled in my /boot/config.txt but presumably the pins are configured somewhere else and that's why I can't assign them.

Author
Account Strength
0%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
154,990
Link Karma
17,534
Comment Karma
136,032
Profile updated: 6 months ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago