[Feature Request] GPIO support in MeshCore
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- cli, embedded-iot
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- C
- Stelle
- 3.9k
- Fork
- 1.5k
- Merge medio
- 1g 1h
- PR unite (30g)
- 26
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di meshcore-dev/MeshCore
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
meshcore-dev/MeshCore#3622 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash sizeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
meshcore-dev/MeshCore#3571 · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
meshcore-dev/MeshCore#3567 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
RTC_RX8130CE writes and reads the one-hot WEEK register as a numberForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
meshcore-dev/MeshCore#3549 ·
I maintainer di solito rispondono entro 1 giorno
-
Repeater: CLI reply to 'setperm <key> 0' is lost when the removed ACL entry sits before the requester (stale ClientInfo* after array shift)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
meshcore-dev/MeshCore#3513 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di meshcore-dev/MeshCore
Issue simili
-
v9.6.0: CMake incorrectly enforces presence of libevdevForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug Component component: net
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RT-Thread/rt-thread#11913 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
contiki-ng/contiki-ng#3289 ·
I maintainer di solito rispondono entro 3 giorni
-
area:docs help wanted type:enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno