background preloader

Pi

Facebook Twitter

433 MHz

Malinowe Pi - Uruchamianie własnych programów przy starcie... Dzisiaj szybko i bez owijania w bawełnę. Czasami napiszemy jakiś skrypt lub program, który chcemy, żeby uruchamiał się automatycznie przy starcie systemu. Okazuje się, że zrobienie tego jest dość proste, ale wymaga stworzenia dodatkowego skryptu, który wywoła nasz program. Załóżmy, że nasz program nazywa się “program.py” i znajduje się w katalogu użytkownika “pi”(“~/program.py”). Pierwsze co musimy zrobić, to przenieść nasz program do “/usr/local/sbin/”. Wszystkie programy przegrane do tego katalogu mogą być uruchamiane przy starcie systemu. Dodatkowo są uruchamiane z poziomu administratora, więc nie musimy dopisywać przed ich wywołaniem “sudo”. sudo mv program.py /usr/local/sbin/ - podajemy hasło administratora i przenosimy nasz program do właściwego katalogu.

. #! Sudo chmod 755 /etc/init.d/skrypt - zmieniamy uprawnienia naszego skryptu.sudo update-rc.d example defaults - dodajemy do skryptów wykonywanych przy starcie systemu. Raspberry Pi. Zarządzanie zasilaniem za pomocą Raspberry Pi. Raspberry Pi, dzięki posiadanym złączom GPIO, pozwala zarządzać oraz pobierać informacje z dużej ilości urządzeń i czujników. Zarządzanie np włącznikami napięcia do obsługi chociaż takich podstawowych urządzeń jak lampy, pompy itp. umożliwiają moduły przekaźników za pomocą których możliwe jest włączanie i wyłączanie prądu. Dostępne są moduły 1, 2, 4, 8 oraz 16 przekaźnikowe, które można kupić w sklepach elektronicznych oraz na allegro. Do naszych testów wykorzystamy moduł dwu przekaźnikowy YwRobot 2 relay. Specyfikacja modułu przełączników Zasilanie : 5VModel przekaźnika : SONGLE SRD-05VDC-SL-C 2 szt.Diody led sygnalizujące stan zasilania (zielona) oraz stan przekaźników załączone/niezłączone (czerwone)Max prąd : 10A przy 250VAC oraz 10A przy 30VDC Sposób podłączenia Urządzenia elektryczne podłączamy do kostek znajdujących się z tyłu płytki.

Raspberry Pi podłączamy z przodu płytki do 4 pinów przestawionych na zdjęciu poniżej (VCC, in1, in2 oraz GND) WebIOPi - The Raspberry Pi Internet of Things Framework. Lwdp. Raspberry Pi kontaktron czujnik otwarcia okien i drzwi + układ MCP23017 | Malinowe Pi Raspberry ciekawe pomysły i realizacje. Budując inteligenty dom, nie można pominąć kwestii bezpieczeństwa. Informację o otwartych oknach i drzwiach dostarczyć nam mogą różnego rodzaju kontaktrony. W tym przykładzie użyto najprostszego kosztującego niecałe 7 zł kontaktronu dedykowanego do drzwi . Podłączenie bezpośrednie kontaktronu do Rpi Połączenie to jest niezwykle proste. krótszy przewód wpinamy do GND RPi – niebieska zworka na zdjęciu -> linia GNDdłuższy np. do PIN 16 (GPIO 23) – zielona zworka na zdjęciu Dzięki możliwości tworzenia przez RPi wewnętrznych rezystorów pull-up nie musimy dodawać dodatkowego rezystora. W poniższym skrypcie ustawiono pin 23 do którego podłączony jest drugi przewód kontaktronu w tryb Pull-Up (rezystor podciągający). #!

Podłączenie kontaktronu do układu MCP23017 układ MCP23017 ma wewnętrzne rezystory Pull-Up.Nie posiada rezystorów Pull-Down. W poniższym skrypcie stan niski czyli otwarcie drzwi powoduje zapalenie diody podłączonej również do układu MCP23017. #! Warto zobaczyć Kontaktron do kupienia w: 15 Useful Commands Every Raspberry Pi User Should Know. If you’re using a Raspberry Pi computer for your weekend project (perhaps a media centre or a home server) then there is a good chance these useful command line instructions will save you some time.

The Raspberry Pi: Yes, It’s Linux You’ve imaged your SD card and booted your Raspberry Pi. You’re probably using the Raspbian operating system and updated and configured it so that it meets your requirements. What you may not have realised is that despite the Windows-style icon-driven desktop, Raspbian is a Linux distribution. Several operating systems are available for Raspberry Pi, the vast majority of which are Linux. Rather than an attempt to get people using Linux by stealth, the Raspberry Pi relies on these operating systems because of their open source origins and versatility. (And because it’s rather good.) Now, you can probably use a Linux operating system with a graphical user interface without using the command line, but this is where most of the real power lies. cat /proc/cpuinfo. 7 Operating Systems You Can Run With Raspberry Pi.

Who can argue with a $40 computer? Especially one that also forms a good base for electronics projects! I certainly can’t. But the hardware alone is only one side of the story: you still need to run an operating system. Join me today as I explore 7 different OSes you can install on your Raspberry Pi, right now. Disclaimer: some are significantly more useful than others. Linux Three different flavours of Linux are available officially: Pidora (based on Fedora); Archlinux (a DIY OS); and Raspian (Debian). Raspian is the recommended OS for everyone new to the Raspberry Pi, but if you fancy trying out some of the others too, a new tool from the creators of Raspberry Pi has been released which allows you to choose from a selection of images during boot-up (including some of the others on this list).

OpenElec & XBMC OpenElec is a slimmed down and optimized OS specifically made for running XBox Media Centre. RetroPie Here’s a good intro to RISC, and here’s a list of recommended software. Firefox OS. Electronics. To fully benefit from pilight, you should build a low-pass filter to make sure that (any) noise from the receiver isn't communicated to the Raspberry Pi. This filter consists of a microprocessor with a small amount of logic that pre-filters all signals before it enters pilight. Those who are not using a low-pass filter are advised to use pilight with the kernel module. You can check the hardware settings page on how to configure pilight to use one of these hardware interfaces.

The source of this new low-pass filter can soon be found online. Example of wiring up a transmitter and receiver to your Pi Header pins and configuration pin numbers If you are wiring up the transmitter and receiver as shown, the transmitter is using GPIO0 and the receiver is using GPIO1. The default pilight configuration file (/etc/pilight/settings.json) assumes the above shown wiring scheme. If you use other header pins, you need to change the configuration file in accordance with the wiringX numbering scheme. Conrad rsl - Conrad protokół RSL.