Closed ZiTAL closed 1 year ago
Looking the orange-pi4-lts pinout:
And the orange-pi5 pinout
the pinout are the same, but the opposite column, well:
changing the build file:
elif [[ -f /etc/armbian-release ]]; then
source /etc/armbian-release
[[ $BOARD == orangepi-r1 ]] && BOARD=orangepir1
[[ $BOARD == orangepi-rk3399 ]] && BOARD=orangepirk3399
[[ $BOARD == orangepizeroplus2-h3 ]] && BOARD=orangepizeroplus2h3
[[ $BOARD == orangepizeroplus2-h5 ]] && BOARD=orangepizeroplus2h5
BOARD="orangepi4-lts"
export BOARD="orangepi4-lts"
./build clean
./build
it compiles ok
root@opi5:/opt/wiringOP# gpio readall
+------+-----+----------+------+---+OPi 4 LTS +---+---+--+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+------+---+----++----+---+------+----------+-----+------+
| | | 3.3V | | | 1 || 2 | | | 5V | | |
| 64 | 0 | I2C8_SDA | ALT4 | 1 | 3 || 4 | | | 5V | | |
| 65 | 1 | I2C8_SCL | ALT4 | 1 | 5 || 6 | | | GND | | |
| 150 | 2 | PWM1 | ALT4 | 1 | 7 || 8 | 1 | ALT4 | I2C3_SCL | 3 | 145 |
| | | GND | | | 9 || 10 | 1 | ALT4 | I2C3_SDA | 4 | 144 |
| 33 | 5 | GPIO1_A1 | ALT4 | 1 | 11 || 12 | 1 | ALT4 | GPIO1_C2 | 6 | 50 |
| 35 | 7 | GPIO1_A3 | ALT4 | 1 | 13 || 14 | | | GND | | |
| 92 | 8 | GPIO2_D4 | ALT4 | 1 | 15 || 16 | 1 | ALT4 | GPIO1_C6 | 9 | 54 |
| | | 3.3V | | | 17 || 18 | 1 | ALT4 | GPIO1_C7 | 10 | 55 |
| 40 | 11 | SPI1_TXD | ALT4 | 1 | 19 || 20 | | | GND | | |
| 39 | 12 | SPI1_RXD | ALT4 | 1 | 21 || 22 | 1 | ALT4 | GPIO1_D0 | 13 | 56 |
| 41 | 14 | SPI1_CLK | ALT4 | 1 | 23 || 24 | 1 | ALT4 | SPI1_CS | 15 | 42 |
| | | GND | | | 25 || 26 | 1 | ALT4 | GPIO4_C5 | 16 | 149 |
+------+-----+----------+------+---+----++----+---+------+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+------+---+OPi 4 LTS +---+---+--+----------+-----+------+
officially this is the orangepi4-lts pinout, and my orange-pi5 has connected in the:
GPIOD2_D4 the VIN of the fan and in GND the GND of the fan.
Well, the connection is 13, but the opposite way is 12:
gpio export 12 out
gpio write 12 1
fan is not wortking...
gpio export 13 out
gpio write 13 1
and this way neither...
I will try again in another way
Please use next branch.
thank you :)
armbian uname -a