vinicius Posted August 13, 2022 Share Posted August 13, 2022 Hi. I'm trying to use GPIO's of OrangePi PC+ and after install WiringOP, when I run the gpio readall, all my GPIO's Mode are showing OFF. I tryed enable in armbian-config, but I have only pps-gpio and w1-gpio, I tryed enable both but doesn't work too. Someone knows some solution? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted August 13, 2022 Share Posted August 13, 2022 You don't need to install anything. This is a script I use on a very similar device: #!/bin/bash task(){ gp=$1 [[ ! -d /sys/class/gpio/gpio${gp} ]] && echo ${gp} > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio${gp}/direction echo "0" > /sys/class/gpio/gpio${gp}/value sleep 10 echo "1" > /sys/class/gpio/gpio${gp}/value } task "$1" doing this. More info: https://www.google.com/search?q=sunxi+gpio 0 Quote Link to comment Share on other sites More sharing options...
vinicius Posted August 15, 2022 Author Share Posted August 15, 2022 (edited) Hi Igor, thanks for your answer, but I tried it too (not your script yet, but commands export, direction, value in /sys/class/gpio). I don't know why doesn't work. Edited August 15, 2022 by vinicius 0 Quote Link to comment Share on other sites More sharing options...
vinicius Posted August 15, 2022 Author Share Posted August 15, 2022 (edited) +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 12 | 0 | SDA.0 | OFF | 0 | 3 || 4 | | | 5V | | | | 11 | 1 | SCL.0 | OFF | 0 | 5 || 6 | | | GND | | | | 6 | 2 | PA6 | OFF | 0 | 7 || 8 | 0 | OFF | TXD.3 | 3 | 13 | | | | GND | | | 9 || 10 | 0 | OFF | RXD.3 | 4 | 14 | | 1 | 5 | RXD.2 | OFF | 0 | 11 || 12 | 0 | IN | PD14 | 6 | 110 | | 0 | 7 | TXD.2 | OFF | 0 | 13 || 14 | | | GND | | | | 3 | 8 | CTS.2 | OFF | 0 | 15 || 16 | 0 | OFF | PC04 | 9 | 68 | | | | 3.3V | | | 17 || 18 | 0 | OFF | PC07 | 10 | 71 | | 64 | 11 | MOSI.0 | OFF | 0 | 19 || 20 | | | GND | | | | 65 | 12 | MISO.0 | OFF | 0 | 21 || 22 | 0 | OFF | RTS.2 | 13 | 2 | | 66 | 14 | SCLK.0 | OFF | 0 | 23 || 24 | 0 | OFF | CE.0 | 15 | 67 | | | | GND | | | 25 || 26 | 0 | OFF | PA21 | 16 | 21 | | 19 | 17 | SDA.1 | OFF | 0 | 27 || 28 | 0 | OFF | SCL.1 | 18 | 18 | | 7 | 19 | PA07 | OFF | 0 | 29 || 30 | | | GND | | | | 8 | 20 | PA08 | OFF | 0 | 31 || 32 | 0 | OFF | RTS.1 | 21 | 200 | | 9 | 22 | PA09 | OFF | 0 | 33 || 34 | | | GND | | | | 10 | 23 | PA10 | OFF | 0 | 35 || 36 | 0 | OFF | CTS.1 | 24 | 201 | | 20 | 25 | PA20 | OFF | 0 | 37 || 38 | 0 | OFF | TXD.1 | 26 | 198 | | | | GND | | | 39 || 40 | 0 | OFF | RXD.1 | 27 | 199 | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+ The physical pin is 16, GPIO 68. Running the script, nothing happens passing with params 68. Edited August 15, 2022 by vinicius 0 Quote Link to comment Share on other sites More sharing options...
vinicius Posted August 26, 2022 Author Share Posted August 26, 2022 (edited) Solved! With BC547 transistor... Edited August 26, 2022 by vinicius 0 Quote Link to comment Share on other sites More sharing options...
bjorns Posted February 10, 2023 Share Posted February 10, 2023 what do you mean? On 8/26/2022 at 9:47 PM, vinicius said: Solved! With BC547 transistor... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.