[Feature Request] GPIO support in MeshCore
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- cli, embedded-iot
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- C
- Star
- 3.9k
- Fork
- 1.5k
- Merge trung bình
- 19 giờ 9 phút
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của meshcore-dev/MeshCore
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
meshcore-dev/MeshCore#3622 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash sizeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
meshcore-dev/MeshCore#3571 · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
meshcore-dev/MeshCore#3567 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
meshcore-dev/MeshCore#3549 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
meshcore-dev/MeshCore#3513 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của meshcore-dev/MeshCore
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EchoTools/nevr-runtime#698 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FujiNetWIFI/fujinet-firmware#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ci area:runtime-vm bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InauguralSystems/EigenScript#1859 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug Official Image release/25.12 Supported Device target/kirkwood
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/archive bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DarkFlippers/qUnleashed#374 ·
Maintainer thường phản hồi trong vòng 1 ngày