Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feature Request] GPIO support in MeshCore

オープン
#3,522 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

meshcore-dev/MeshCore のほかの issue

meshcore-dev/MeshCore の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。