Narzędzia użytkownika

Narzędzia witryny


nanopi_neo

Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Poprzednia rewizja po obu stronachPoprzednia wersja
Nowa wersja
Poprzednia wersja
nanopi_neo [2020/12/18 09:51] kamilnanopi_neo [2020/12/18 09:57] (aktualna) – [Dioda RGB] kamil
Linia 586: Linia 586:
 Czyli: Czyli:
   * pin 1 - 3,3V   * pin 1 - 3,3V
-  * pin 11 GPIO0+  * pin 12 GPIO1
   * pin 13 - GPIO2   * pin 13 - GPIO2
   * pin 15 - GPIO3   * pin 15 - GPIO3
Linia 596: Linia 596:
 #include <stdio.h> #include <stdio.h>
  
-#define LedPinRed    0+#define LedPinRed    1
 #define LedPinGreen  2 #define LedPinGreen  2
 #define LedPinBlue   3 #define LedPinBlue   3
Linia 652: Linia 652:
 </file> </file>
  
 +Gdzie linie:
 +<file>
 +#define LedPinRed    1
 +#define LedPinGreen  2
 +#define LedPinBlue   3
 +</file>
 +
 +Są to nr portów w WiringPI. Można odczytać je za pomocą polecenia: "gpio readall" - u mnie akurat podłączone do pinów nr 12, 13, 15 (kolumna Physical) - co daje nr 1, 2, 3 (kolumna wPi).
 +
 +Kompilujemy:
 +<file>
 +gcc -Wall ./diodergb.c -o ./diodergb -lwiringPi -lpthread
 +</file>
 +
 +Po uruchomieniu dioda powinna migać na różne kolory.
nanopi_neo.1608281496.txt.gz · ostatnio zmienione: 2020/12/18 09:51 przez kamil