Strict Standards: Accessing static property JCache::$_handler as non static in /home/igretro/public_html/bobtech/libraries/joomla/cache/cache.php on line 420

Strict Standards: Accessing static property JCache::$_handler as non static in /home/igretro/public_html/bobtech/libraries/joomla/cache/cache.php on line 422

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/system/easyheader17v23/easyheader17v23.php on line 113
PiLowLib - librarie low level I/O pentru Raspberry Pi

Articole similare


Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

Strict Standards: Non-static method modRelatedItemsHelper::cutText() should not be called statically in /home/igretro/public_html/bobtech/modules/mod_related_items/helper.php on line 119

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    SD card pentru Raspberry Pi, care este mai bun ?
    Ai un Raspberry Pi si vrei sa te pui pe treaba ? Ce memorie...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Ce este Raspberry Pi ?
    RaspberryPi, zis RasPi, este un computer care ruleaza Linux...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    GPIO in Pyton pe Raspberry Pi
    Descarca arhiva  RPi.GPIO-0.3.1a.tar.gz si instaleaza, ...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Pimotique - casa inteligenta cu Raspberry Pi
    Cu Pimotique poti sa-ti controlezi prizele din casa prin Int...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    MN-WD552B - dongle nano USB WiFi pentru Raspberry Pi
    Interfata USB 2.0, 802.11b/g/n, 150Mbps, 64/128-bit WEP, 128...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Configurare Raspberry Pi pentru Python
    Cum sa instalezi Python si Geany, Hello World pe Raspberry P...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Cum sa instalezi dongle WiFi MN-WD552B pe Raspberry Pi
    MN-WD552B nano USB WiFi functioneaza pe Raspberry Pi, dar nu...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    PiEye - streaming webcam in format M-JPG cu Raspberry Pi
    Cu o camera web ieftina ce se conecteaza pe USB se poate f...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Tutorial Python + MySQL + Windows 7
    Cum am instalat Python si MySQL pe Windows 7 64bit, de unde...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Comunicatie pe port serial in Python sub Windows
    Configurare PySerial, PyDev pentru Python si primul progra...

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    Configurare Raspberry Pi pentru utilizarea interfetei seriale
    Foloseste libraria PySerial

  • Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

    Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29
    motionEye cu Raspberry Pi
    Frontend web pentru un soft de monitorizare video pentru L...

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29



Strict Standards: Declaration of JCacheControllerView::get() should be compatible with JCacheController::get($id, $group = NULL) in /home/igretro/public_html/bobtech/libraries/joomla/cache/controller/view.php on line 126

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/mavikthumbnails/mavikthumbnails.php on line 208

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/mavikthumbnails/mavikthumbnails.php on line 393

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 28

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/phocadownload/phocadownload.php on line 29

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/codehighlighter/codehighlighter.php on line 106

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/extravote/extravote.php on line 49

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/udjacomments/udjacomments.php on line 100

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/plugins/content/udjacomments/udjacomments.php on line 136

PiLowLib - librarie low level I/O pentru Raspberry Pi

python code

PiLowLib este o librarie pentru acces low level la perifericele lui Raspberry Pi. Varianta curenta, pe langa acces direct la registre, ofera suport pentru urmatoarele perifierice:

  • acces I/O simplu (intrari/ieisiri digitale)
  • PWM
  • clock

PiLowLib este rapid si performat deoarece acceseaza direct registrele perifericelor lui Raspberry Pi si in plus codul este scris direct in Python si nu este nevoie de compilare (cum sunt alte librarii scrise in C).

PiLowLib a fost scris de Calin Crisan si este publicat sub licienta LGPLv3.
Anumite parti din aceasta librarie au fost inspirate din proiectul wiringPi, scris de Gordon Henderson.

Instalare

Libraria functioneaza exclusiv pe Raspberry Pi si are nevoie de acces root la /dev/mem.

Downloadeaza cea mai recenta versiune a codului sursa de pe github: https://github.com/ccrisan/pilowlib

Pentru testare, poti folosi direct libraria de unde ai facut download, prin configurarea corespunzatoarea a PYTHONPATH: export PYTHONPATH=$PYTHONPATH:/path/to/pilowlib Daca vrei sa o instalezi pe sistem, ruleaza urmatoarea comanda (ca root): python setup.py install

Testare

Directorul examples include cateva exemple cu cod sursa:

digital.py

# Copyright (c) 2012 Calin Crisan
# This file is part of PiLowLib.

from pilowlib import funcs, digital

# sets the GPIO pin 18 to digital out
funcs.set_gpio_func(18, funcs.DIGITAL_OUT)

# sets the GPIO pin 23 to digital in
funcs.set_gpio_func(23, funcs.DIGITAL_IN)

# sets the GPIO pin 18 to 'high'
digital.set_value(18, True)

# reads the level of the GPIO pin 23
value = digital.get_value(23)
if value:
    print('GPIO 23 is high')
    
else:
    print('GPIO 23 is low')

gpclock.py

# Copyright (c) 2012 Calin Crisan
# This file is part of PiLowLib.

from pilowlib import funcs, clock

# sets the GPIO pin 4 to GPCLK0
funcs.set_gpio_func(4, funcs.GPCLK0)

# set the GPCLK0 source to oscillator (said to be 19.2 MHz),
# and the divider to 32, resulting a 19.2MHz/32 = 600KHz
clock.configure(0, clock.SRC_OSC, 32)

# start the GPCLK0 peripheral
clock.start(0)

pwm.py

# Copyright (c) 2012 Calin Crisan
# This file is part of PiLowLib.

from pilowlib import funcs, pwm, clock

# sets the GPIO pin 18 to PWM0
funcs.set_gpio_func(18, funcs.PWM0)

# configures PWM0 with the default settings (plain PWM)
pwm.configure(0)

# set the PWM clock source to oscillator (said to be 19.2 MHz),
# and the divider to 32, resulting a 19.2MHz/32 = 600KHz
pwm.configure_clock(clock.SRC_OSC, 32)

# set the range to 1024 and the data to 512 for PWM0,
# resulting in a duty cycle of 50%
pwm.set_range(0, 1024)
pwm.set_data(0, 512)

# start the PWM0 peripheral
pwm.start(0)

Mai multe detalii despre modul de functionare si configurare al perifericelor sunt disponibile in datasheet: http://www.designspark.com/files/ds/supporting_materials/Broadcom%20BCM2835.pdf


Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/modules/mod_udjacomments/helper.php on line 26

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/modules/mod_udjacomments/helper.php on line 42

Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/modules/mod_udjacomments/helper.php on line 73

comentarii


Strict Standards: Only variables should be assigned by reference in /home/igretro/public_html/bobtech/modules/mod_udjacomments/tmpl/default_form.php on line 98