|
I manage to make it work. If you issue readall command, you will get something like that:
- +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+
- | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
- +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
- | | | 3.3v | | | 1 || 2 | | | 5v | | |
- | | | SDA.0 | | | 3 || 4 | | | 5V | | |
- | | | SCL.0 | | | 5 || 6 | | | 0v | | |
- | 6 | 6 | IO6 PA06 | ALT3 | 0 | 7 || 8 | | | TxD3 | | |
- | | | 0v | | | 9 || 10 | | | RxD3 | | |
- | | | RxD2 | | | 11 || 12 | 0 | ALT3 | IO1 PD14 | 1 | 110 |
- | | | TxD2 | | | 13 || 14 | | | 0v | | |
- | | | CTS2 | | | 15 || 16 | 0 | ALT3 | IO4 PC04 | 4 | 68 |
- | | | 3.3v | | | 17 || 18 | 0 | ALT3 | IO5 PC07 | 5 | 71 |
- | | | MOSI | | | 19 || 20 | | | 0v | | |
- | | | MISO | | | 21 || 22 | | | RTS2 | | |
- | | | SCLK | | | 23 || 24 | | | SPI-CE0 | | |
- | | | 0v | | | 25 || 26 | | | CE1 | | |
- | | | SDA.1 | | | 27 || 28 | | | SCL.1 | | |
- | 7 | 7 | IO7 PA7 | ALT3 | 0 | 29 || 30 | | | 0v | | |
- | 8 | 8 | IO8 PA8 | ALT3 | 0 | 31 || 32 | 0 | ALT3 | IO9 PG08 | 9 | 200 |
- | 9 | 10 | IO10 PA9 | ALT3 | 0 | 33 || 34 | | | 0v | | |
- | 10 | 12 | IO12PA10 | ALT3 | 0 | 35 || 36 | 0 | ALT3 | IO13PG09 | 13 | 201 |
- | 20 | 14 | IO14PA20 | ALT3 | 0 | 37 || 38 | 0 | ALT3 | IO15PG06 | 15 | 198 |
- | | | 0v | | | 39 || 40 | 0 | ALT3 | IO16PG07 | 16 | 199 |
- +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
- | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
- +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+
Copy code
Now, you must select pin appropriatelly. For ordinary gpio functionality, you can only use pins under "wPi" column on both side. For example, lets use physical pin 40, which coresponds to wPi 16. First we have to set direction. This is easily done by:After that you can switch between 3.3V and 0V by using commandor, respectively.
Is this all you wanted or do you want to use PWM for precision fan regulation?
|
|