Search the Community
Showing results for tags 'gpio'.
Found 17 results
-
Hi, I compared GPIO access speed between RaspberryPi4 and TinkerBoard2S. After setting GPIO1 to HIGH, I processed GPIO2 to LOW immediately. I observed the waveforms with an oscilloscope. As a result, TinkerBoard2S was much slower. I think TinkerBoard2S has better performance, but why? Please let me know if there is a way to access GPIO faster with TinkerBoard2S. The software are as follows. RaspberryPi4 ・OS RaspberryPiOS 64bit ・C language with BCM2835 library TinkerBoard2S ・OS Deabian 64bit ・C language with WiringPi library best regards,
- 6 replies
-
- tinkerboard2s
- gpio
-
(and 1 more)
Tagged with:
-
Hi team, I'm trying to make pisound(https://blokas.io/pisound/) work with tinker board 2. I'm using pisound repo to get pisound.c kernel module file, and dts file: https://github.com/BlokasLabs/pisound Changes for tinker board(not 2) are available here: https://github.com/BlokasLabs/pisound/compare/master...tinkerboard, and it works: https://community.blokas.io/t/pisound-on-tinker-board/1015 I changed .dts file, so that it suits tinker board 2. Dmesg is correct(https://pastebin.com/Cfdz5ct0), it is attached lower. I can see pisound in aplay -l and arecord -l lists. But when I run "speaker-test -D hw:pisound -c 2 -r 48000", I get: Can you look at pisound.c file please, is it ok for tinker board 2 ? Should I change something in a dts file or in pisound.c file ? How can I solve this problem ? Thanks a lot! (Linux linaro-alip 4.4.194) speaker-test 1.1.8 Playback device is hw:pisound Stream parameters are 48000Hz, S16_LE, 2 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 128 to 131072 Period size range from 64 to 65536 Using max buffer size 131072 Periods = 4 was set period_size = 32768 was set buffer_size = 131072 0 - Front Left 1 - Front Right Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error /dts-v1/; /plugin/; #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pinctrl/rockchip.h> / { compatible = "rockchip,rk3399"; fragment@0 { target-path = "/spdif-sound"; __overlay__ { status = "disabled"; }; }; fragment@1 { target-path = "/hdmi-dp-sound"; __overlay__ { status = "disabled"; }; }; fragment@2 { target-path ="/i2s@ff880000"; __overlay__ { #sound-dai-cells = <0>; status = "okay"; }; }; fragment@3 { target = <&spi2>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; spidev@0 { status="okay"; }; spidev@1 { status="okay"; }; pisound_spi: pisound_spi@0{ compatible = "blokaslabs,pisound-spi"; reg = <0>; spi-max-frequency = <100000>; }; }; }; fragment@4 { target-path = "/"; __overlay__ { pcm5102a-codec { #sound-dai-cells = <0>; compatible = "ti,pcm5102a"; status = "okay"; }; }; }; fragment@5 { target = <&pinctrl>; __overlay__ { pisound_pins: pisound_pins { rockchip,pins = <&gpio4 22 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio4 21 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio2 18 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio4 18 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio2 23 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio3 28 RK_FUNC_GPIO &pcfg_pull_none>, <&gpio2 19 RK_FUNC_GPIO &pcfg_pull_none>; }; }; }; fragment@6 { target-path = "/sound-ext-card"; __overlay__ { compatible = "blokaslabs,pisound"; i2s-controller = <&i2s0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pisound_pins>; osr-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>, // GP7C6 <&gpio4 21 GPIO_ACTIVE_HIGH>, // GP7B0 <&gpio2 18 GPIO_ACTIVE_HIGH>; // GP7A7 reset-gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>, // GP7C7 <&gpio2 23 GPIO_ACTIVE_HIGH>; // GP5B3 data_available-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>; // GP5C3 button-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; // GP5B4 }; }; };
-
I am trying to communicate between the tinker edge r and another 3d printer board (Duet) via SPI. to do that, one of the steps is to set the GPIO Transfer Ready Pin. on the Raspberry Pi, In order to identify the GPIO device and pin number, I can use gpioinfo command and will show a list of available pins. the output will provide something like: gpiochip0 - 58 lines: ... line 23: "GPIO23" unused input active-high line 24: "GPIO24" unused input active-high line 25: "GPIO25" unused input active-high line 26: "GPIO26" unused input active-high line 27: "GPIO27" unused input active-high ... on the tinker edge doesn't give me any output. and if I try to use for example the command gpioget gpiochip0 <pin_number> I get an error message like: gpioget: error reading GPIO values: No such file or directory I checked with all the gpio groups that are present in the directory /sys/class/gpio and nothing worked. I would really appreciate your help BR
-
Please how to acces to GPIO in Tinker Edge R with Android 9?
-
- gpio
- tinkeredger
-
(and 1 more)
Tagged with:
-
Hi I am new to this forum. I am trying to use python-periphery library to use the pins on the board. if I do : from periphery import GPIO gpio3 = GPIO(3,"in") I get the following error: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/periphery/gpio.py", line 1017, in _open with open("/sys/class/gpio/export", "w") as f_export: PermissionError: [Errno 13] Permission denied: '/sys/class/gpio/export' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/linaro/Desktop/temp_hum.py", line 7, in <module> gpio3 = GPIO(3,"in") File "/usr/local/lib/python3.7/dist-packages/periphery/gpio.py", line 999, in __init__ self._open(line, direction) File "/usr/local/lib/python3.7/dist-packages/periphery/gpio.py", line 1020, in _open raise GPIOError(e.errno, "Exporting GPIO: " + e.strerror) periphery.gpio.GPIOError: [Errno 13] Exporting GPIO: Permission denied Any Idea how to solve this?
- 1 reply
-
- gpio
- python-periphery
-
(and 1 more)
Tagged with:
-
Hello. I want to use Uart in GPIO with Tinker Board S R2. But, below url, there are information aboutTinker Board 2 Series. https://github.com/TinkerBoard/TinkerBoard/wiki/Developer-Guide#mraa-library-for-android In Tinker Board S R2, Where is 'config.txt' ? I make it in /dtoverlay/config.txt, but i think it doesn't working. How to use GPIO port in Tinker Board S R2? How can I use 'config.txt' file? Thanks.
- 1 reply
-
- tinkerboardsr2
- uart
-
(and 3 more)
Tagged with:
-
Hi, I want to use I2S with Max98357 (with 3W 4ohm speaker) this is pin i use connect to Max98357 LRC ------------ I2S0_FS (35) BCLK --------- I2S0_SCLK (12) DIN ------------ I2S0_SDO0 (40) GAIN ---------- Float SD ------------- Float GND ---------- GND VIN ------------ VCC5 (2) and I also config on Tinkerconfig to turn on I2S but nothing happend Please help me
-
Hi, We have a Program ready for testing build with Node-red, we decide to work with tinker edge R. and we found the following discussion in asus Tinker Board Forum : https://tinker-board.asus.com/forum/index.php?/topic/15110-how-to-use-do-on-node-red-tinkeros-gpio/&tab=comments#comment-15662 We did same steps as CyberT did , downlowded nrgpio.sh suggested by Mr yi-hsin_hung, and replaced in the eadge-R in specific folder, but unfortunately it doesn't work. Please can you help to resolve this problem . Thanks in advance.
-
I am not good at English. I'm sorry. I'm using TinkerBoard2S. The OS uses Android 11. I use the mraa library to read the Uart value. But sometimes this error appears. JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0xf0(The value after byte changes every time) Even if I try to modify the mraa library, I cannot modify it because it is read-only. Can't I handle the value that is not converted to utf8 from TinkerBoard2S?
-
Hello everyone. I need to measure temperature with a DHT11 using Python and I can't get it. I have a tinker board R2.0 and the latest version of Tinker OS. I have tried with two Adafruit libraries: Adafruit_DHT and adafruit-circuitpython-dht. With the first package, which I think is the simplest and has worked on my raspberry, I get the following error: raise RuntimeError('Error accessing GPIO. Make sure program is run as root with sudo!') RuntimeError: Error accessing GPIO. Make sure program is run as root with sudo! I have tried to run the program from the terminal as root with sudo but the same problem still appears. I have tried to measure with a DS18B20, but the libraries I find are not compatible with the tinker board either. I also tried with a MCP9600, which works with I2C, but it doesn't work either. When I search for the address with i2cdetect -y 1 it only recognizes the MCP the first time. If I use i2cdetect -y 1 again, it does not appear anymore. I have to disconnect and reconnect the device for i2cdetect -y 1 to detect it. I don't care which of the three methods to use to measure temperature. I would like to know if anyone has managed to use any of these three methods. I have tried with a Raspberry Pi 3B the same libraries and had no problems. I'm a bit desperate with the tinker board ? Thanks a lot
-
I'm trying to get along with the GPIO connector. I think the pin addressing will be different from the Tinkerboard version 1 (https://tinkerboarding.co.uk/wiki/images/d/d0/Gpio-pinout-expanded.png). This is probably due to a different processor. Unfortunately, I can't find the address for Tinkerboard 2 anywhere. I need the ability to control signals from a shell. Unfortunately, using the old addressing does not work. ex .: echo 188 > /sys/class/gpio/export (pin 40 for Tinkerboard v1) echo out > /sys/class/gpio/gpio188/direction echo 1 > /sys/class/gpio/gpio188/value
-
Hello, Do you know when a library for asus tinker board 2 or 2s will be available for GPIO in python? thank you
-
How can I access GPIO pins on android 10 without root access? I have a 2s tinker board and I want to access serial pins. Thank you in advance
- 9 replies
-
- 1
-
- gpio
- android 10
-
(and 1 more)
Tagged with:
-
Hi, I want to use wiringPi on Tinker2S. I'm trying to use GPIO Pin#15 (wiring Pi Pin#3) as a pull-down input, but after a bit of research, it seems to be acting like it's latching. Once the Input goes High, the input does not drop to Low after that. Is there a good solution?
-
Hello, How I can use a 3x programmable led's onboard? I don't find info about this. Can you show me an example code in Python? Alternative, which number of GPIO they have? Thank you LL
-
Calling on GPIO experts.... This one has me perplexed. I can control most of the the other GPIO pins with Tinker's version of gpio from the shell. However, physical pin 18 (GPIO5B3) doesn't seem to work completely. I need to set it to an output and drive it to 1. I've tried with the latest TinkerOS (4.4.132+) and with Armbian Buster for the Tinker Board S. When it first boots up, a "gpio readall" shows that pin 18 is SERL. First, I change the mode to output: gpio mode 5 out I can verify this with another "gpio readall". It now shows that pin 18 is OUT I then try to set the value to 1 with gpio write 5 1 The pin never goes high and I verified this with a multimeter. For grins, I tried the same test with pin 16 (GPIO5B2) and setting it to OUT with a value of 1 does work. So I went native and did: echo export 163 > /sys/class/gpio echo out > /sys/class/gpio/gpio163 echo 1 > /sys/class/gpio/gpio163 cat /sys/class/gpio/gpio163 This didn't work either. I checked the /boot/hw_intf.conf to see if I was fighting an overlay and I had the default that comes with the TinkerOS (uart1/4 on, uart2/3 off, i2c1/4 on, spi0 off, spi2 on, etc). I don't have any applications running that might interfere (I don't think) and no hats are plugged in. This problem persists with two different OSs as well. What am I missing? Hopefully something simple I've overlooked...