orangepi-xunlong / wiringOP

wiringPi for Orange Pi
GNU Lesser General Public License v3.0
396 stars 188 forks source link

Not working on PC 2? #1

Closed CodeNemo closed 5 years ago

CodeNemo commented 5 years ago

After installation:

root@OrangePi:~# gpio -v gpio version: 2.46 Copyright (c) 2012-2018 Gordon Henderson This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty Device tree is enabled. --> Xunlong Orange Pi PC 2

My test code:

include

int main() { wiringPiSetup(); pinMode(5, INPUT); while(1) { delay(100); printf("%d", digitalRead(5)); } return 0; }

Compiled and ran, no any outputs.

root@OrangePi:~# gpio readall +------+-----+----------+------+---+OrangePi RK3399---+---+------+---------+-----+--+

Why RK3399 but not H5?

vatanuki commented 5 years ago

set correct PLATFORM to OrangePi_PC2 or OrangePi_H5, default is OrangePi_RK3399 - thats why