OpenStickCommunity / OpenStickCommunity/GP2040-CE

resistor (voltage) ladder input for button assigned functions

Open
#1,501 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
2.5k
Forks
666
Avg merge
1d 19h
Merged PRs (30d)
7

Description

I searched discord and docs but could not find this functionality.

Problem

Add resistor ladder (key1 in car stereos) button input

Besides using a single wire for multiple buttons in DIY projects, resistive ladder, known as key1 wire, is commonly used with steering wheel controls which could be used for wireless/wired gaming wheels
https://electronics.stackexchange.com/questions/99417/what-resistors-to-use-to-read-several-buttons-with-a-single-analog-pin

Solution

Assign ADC value (plus/minus threshold) to a function (button)

Do you plan to work on this feature yourself?

I'm trying to but I'm not a programmer to help with official code. From what I can tell, functions already exist to init and read ADC (analog addon) as well as to add inputs (io expander) that can be used to create voltage ladder addon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing ADC (analog addon) initialization and reading functions, then review the input-assignment paths and io expander support mentioned in the issue. Define how ADC values and thresholds map to button functions, and verify that each mapped button is reported correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.