[elektro] raspi peldak
Erdos Zoltan
erdosz at gmail.com
Fri Mar 13 10:47:12 CET 2015
koszonom mindenkinek, nekiszaladok.
persze elobb keresek valami jo panelt, ami ide is er jovo hetre.. :-)
Z.
2015.03.13. 10:08 keltezéssel, Kiss Gabor írta:
> On 03/13/2015 09:48 AM, Erdos Zoltan wrote:
>> nem, tanulas.
>>
>> hogy a human lassa tavolrol egy erzekelo kontakt allapotat, es hogy
>> tudjon valamit bekapcsolni..
>> mint amikor az ember uj procinal, feljeszto eszkoznel is a led
>> villogtatassal kezdi...
>> en legalabbis nem szulettem zseninek, hogy nullarol ip-stackot
>> programozzak :-)
>
> Ja, értem.
> Én így csinálnám, ha be kellene lőnöm a programot/vasat:
>
> # ls -lL /sys/class/gpio
> total 0
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:04 export
> drwxrwx--- 3 root gpio 0 Jan 1 1970 gpiochip0
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 unexport
> #
>
> # echo 22 >/sys/class/gpio/export
>
> # ls -lL /sys/class/gpio
> total 0
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 export
> drwxrwx--- 3 root gpio 0 Mar 13 10:05 gpio22
> drwxrwx--- 3 root gpio 0 Jan 1 1970 gpiochip0
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 unexport
> #
>
> # ls -lL /sys/class/gpio/gpio22
> total 0
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 active_low
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 direction
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 edge
> drwxrwx--- 2 root gpio 0 Mar 13 10:05 power
> drwxrwx--- 2 root gpio 0 Mar 13 10:05 subsystem
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 uevent
> -rwxrwx--- 1 root gpio 4096 Mar 13 10:05 value
> #
>
> # cat /sys/class/gpio/gpio22/value
> 0
> #
>
> és ha már nem kell:
>
> # echo 22 >/sys/class/gpio/unexport
>
>
> Itt elindulhatsz:
> http://www.raspberrypi.org/documentation/usage/gpio/
> https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio
> http://elinux.org/RPi_Low-level_peripherals
>
> De van itt neked web felület is:
> http://code.google.com/p/webiopi/
>
> kissg
>
More information about the Elektro
mailing list