[Feature Request] GPIO support in MeshCore
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- cli, embedded-iot
調査の方向性
Start by reading src/MeshCore.h, especially the existing MainBoard GPIO methods, then trace the common CLI and board subclasses for the roles and board types mentioned in the proposal. The issue proposes GPIO defines, analog and digital access, and new CLI commands, but leaves compatibility and implementation details open; done would mean agreeing on the interface and supporting the requested pin operations across board roles.
索引モデルが issue の本文から書いたものです。
説明
I need to access GPIO pins on my meshcore nodes. I guess that this is something that others also want, and I can write an implementation of this if the proposal is acceptable. The idea is that we expose new CLI commands that lets you set/retieve the values of a GPIO-pin. This is something that I want to implement on all roles.
I want to make some new defines:
GPIO_IN
GPIO_OUT
GPIO_DAC
GPIO_ADC
These defines is a comma-separated list of GPIO-pins that is accessible using the CLI. If a define is not present, then there will be no corresponding GPIO for that type.
Then I want to extend mesh::MainBoard in src/MeshCore.h with some new member functions. These should be overridden at the board type (ESP32 etc).
class MainBoard {
public:
virtual bool setGPIO(int pin, bool newState) = 0; // returns true if the pin was set
virtual bool setDAC(int pin, float value) = 0; // returns true if the pin was set
virtual bool getGPIO(int pin); // return the value, or false if the pin does not exist
virutal float getADC(int pin); // returns the value, or 0
}
I know that getGpio() and setGpio() is defined in MainBoard already, and probably it would be a good idea to use them. I just don't know the consequence yet of using these.
I have not a GPIO-init function here. I think that can be handled by the MainBoard subclass own setup/begin() function.
Then change the common CLI, add some new commands.
set gpio 1 1
get gpio 1
set gpio 2 3.43
If the GPIO is analog, use float values, for digital use 0 or 1.
Any thoughts?
- 主要言語
- C
- スター
- 3.9k
- フォーク
- 1.5k
- 平均マージ
- 18時間 59分
- マージ済み PR(30日)
- 28
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
meshcore-dev/MeshCore のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
meshcore-dev/MeshCore#3622 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash sizeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
meshcore-dev/MeshCore#3571 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
meshcore-dev/MeshCore#3567 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
meshcore-dev/MeshCore#3549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
meshcore-dev/MeshCore#3513 ·
メンテナーはふだん 1 日以内に返信
meshcore-dev/MeshCore の issue をすべて見る
似ている issue
-
os:linux
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mpv-player/mpv#18649 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
facebookincubator/muse-gadget-sdk#249 ·
メンテナーはふだん 1 日以内に返信
-
docs: nng_dial / nng_dialer_start can return NNG_ECONNSHUT and NNG_ECRYPTO, which are not documentedオープン
難易度 1/5 1〜3時間 初心者へのやさしさ 89/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
micropython/micropython#19786 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
vercel-labs/zerolang#442 ·