Raspberry Pi

Uit Wiki Durk 'o' Theek
Ga naar: navigatie, zoeken

XBMC voor je Raspberry Pi

Stevige case voor je Raspberry Pi

Start van USB stick

Lijst Operating Systems

Bootloader Raspberry Pi 3

officiele site


Concurrenten

Asus Tinkerboard

Hikey, sneller en duurder (240 dollar)


Artikel Computer en Techniek, nr 10, oktober 2021 - Windows 11 op Raspberry Pi installeren

Windows 11 heeft een ARM64 variant, kan op een Pi 400 of 4B. Min. specs: geheugeh: 4GB, beter nog 8GB. Goede koeling (wordt erg heet). USB ssd voor de snelheid gebruiken (geen SD kaartje).

Installeer/run eerst de normale Raspberry Pi installatie en configureer. Oa met sudo raspi-config

WorProject Deze site heeft de omschrijvingen en instructies.

Uupdump Hier kun je de images voor Win11 vinden.

Druk bij inschakelen de ESC toets in om de standaard RAM limiet van 3GB uit te schakelen. Bewaar met F10, Y.


Artikel Computer en Techniek, nr 11, november 2015 - Ubuntu Mate instellen

Ubuntu Mate

Gebruik complete SD kaart:

sudo cfdisk /dev/mmcblk0

sudo partprobe /dev/mmcblk0

sudo resize2fs /dev/mmcblk0p2

Installeer een SSH server:

sudo apt-get isntall openssh-server -y

ip addr show (voor het opvragen van je IP)

Wil je zelf gaan programmeren:

sudo apt-get install build-essential -y

sudo apt-get install git-core -y

git clone git://git.drogon.net/wiringPi

cd wiringPi

./build

apt-get install python3-pip -y


Artikel Computer en Techniek, nr 6, juni 2016 - thuisserver instellen

Flash verwijderen:

sudo apt-get purge flashplugin-installer

SSH installeren:

sudo apt-get install openssh-server

Pas door onderstaande statement de poort aan:

sudo vi /etc/ssh/sshd_config

Installeer dan VNC:

sudo apt-get install x11vnc

En stel een wachtwoord in:

sudo x11vnc -storepasswd /etc/x11vnc.pass

Automatisch VNC starten bij booten?

/lib/systemd/system/x11vnc.service

   [Unit]
   Description=Start X11vnc at startup
   After=multi-user.target
   [Service]
   Type=simple
   ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage - repeat -rfbauth /etc/x11vnc.pass -rftport 5900 -shared
   [Install]
   WantedBy=multi-user.target

sudo systemctl enable x11vnc


Wil je vanaf buiten dit gebruiken, dan moet je een SSH tunnel maken:

ssh user@ipadres -L 5900:localhost:5900

In Putty kun je dan via Connection / SSH / Tunnels in het veld forwarded ports dit invullen:

L5900:localhost:5900

In VNC kun je dan met localhost verbinding maken.


Bestanden delen: Samba

sudo apt-get install samba



Artikel Computer en Techniek, nr 6, juni 2015 - multimedia

Als je hardwareversnelling voor de Pi wilt hebben (MPEG 1/-2, dvd, DVB-ontvangst/opname, blueray, WMV/VC-1) dan moet je een licentie kopen. Kosten ongeveer 5 euro. Hierbij moet je het serienummer van de Pi opgeven. Dat kan met het commando:

cat /proc/cpuinfo | grep Serial

Ontvang je de licenties, plaatst deze dan in de folders /flash of /boot

Dan als root user dit doen:

mount -o remount,rw /flash

nano /flash/config.txt

Ga naar de regel # decode_MPG2 = 0x12345678 en # decode_WVC1 = 0x12345678 en vervang deze met het licentienummer. Start daarna opnieuw op. Controle of het werkt met:

vcgencmd codec_enabled MPG2

Openelec, start meteen op met Kodi-interface

Raspberry Pi 2 XBMC


Artikel Computer en Techniek, nr 6, juni 2015 - ownCloud

maak in /etc/apt/sources.list.d het bestand owncloud.list aan en plaats daarin het volgende:

deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /

sudo apt-get update en sudo apt-get upgrade moeten de rest doen. Meldingen over niet ondertekende bronnen kun je negeren.

sudo apt-get install owncloud, hiermee installeer je apache, de mySQL-database en owncloud.

Wijzig de standaard uploadsize (512 MB), dit staat in /var/www/owncloud/.htaccess

php_value upload_max_filesize en php_value post_max_size. Zet deze op 2G

Om de cron-jobs door CRON te laten uitvoeren:

crontab -u www-data -e

  • /15 * * * * php -f /var/www/owncloud/cron.php

Foutmelding in ownCloud over UTF-8? /etc/php5/apache2/php.ini, haal hier de ; weg voor degault_charset

Sudo service apache2 reload

Wil je via Internet bij je cloud kunnen komen, doe dan iets met DynDNS om via een domein bereikbaar te zijn.

/var/www/owncloud/config/config.php, plaats daar in de trusted_domains jouw domein.

Vervolgens met HTTPS werken. Maak in /etc/apache2 de subman met de naam ssl. Het commando voor het genereren van sleutels en certs:

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

/etc/apache2/ports.conf, zorg dat dit erin staat:

   NameVirtualHost *:80
   Listen 192.168.0.xxx:80
   <IfModule mod_ssl.c>
   Listen 443
   </IfModule>

/etc/apache2/sites-available/ maak hier een bestand aan met de naam ssl en plaats daarin:

  <VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/apache.crt
  SSLCertificateKeyFile /etc/apache2/ssl/apache.key
  DocumentRoot /var/www
  </VirtualHost>

Artikel Computer en Techniek, nr 6, juni 2015 - muziek streamen met MusicBox

Installeer mpd, Pi MusicBox, RuneAudio of Volumio

Musicbox gebruikt de muziekserver Mopidy waar je meer mogelijkheden mee hebt.

image voor je raspberry van MusicBox


Artikel Computer en Techniek, nr 6, juni 2015 - gameconsole emulator

Gebruik hiervoor RetroPie

Het installatiescript

system images

Bouw je Pi in een Gameboy console

Pi als Nintendo Gameconsole



Eerste stappen zijn dat je een besturingssysteem op je SD-kaart moet installeren (in mijn geval Wheezy, Linuxvariant). Dit kun je nalezen op http://elinux.org/RPi_Easy_SD_Card_Setup
Vervolgens kun je met SSH (Putty) verbinding maken met standaard credentials pi/raspberry. Hierna heb ik het volgende gedaan:
Installatie en configuratie van mijn Raspberry Pi (incl Apache, mySQL, php):
passwd
Dit is voor het wijzigen van het ww van gebruiker pi. Daarna voor de root:
sudo su
passwd


Het ip-adres fixed ingesteld, via vi /network/interfaces
iface wlan0 inet static
address 10.1.1.91
netmask 255.255.255.0
gateway 10.1.1.1

Hierna:
sudo apt-get upgrade

sudo apt-get update
(dit moet na de upgrade omdat er extra bestanden geinstalleerd worden die nodig zijn voor apache)

sudo apt-get install apache2
sudo apt-get purge mysql-server-5.5
sudo apt-get install mysql-server-5.5
[1]

sudo chown -R pi /var/www
sudo apt-get install vsftpd
sudo vi /etc/vsftpd.conf

anonymous_enable=YES Change To anonymous_enable=NO

  1. local_enable=YES Change To local_enable=YES
  2. write_enable=YES Change To write_enable=YES


Also, add a line to the bottom of the file:
force_dot_files=YES

sudo service vsftpd restart
sudo usermod -d /var/www pi
[2]

sudo apt-get install php5
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
(anders werkt phpmyadmin niet, mysqli mist melding)
[3]

sudo apt-get install php5-mcrypt
(melding binnen phpMyAdmin) en voor het genereren van de blowfish-secret deze URL gebruikt:
http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator

Hierna nog VNC (server en client) installeren:
sudo apt-get install vnc-server
vncserver -instellen wachtwoord
vi ~/.vnc/xstartup
Geen idee waar ik dat vandaan had. Nu gedaan door sudo vncserver uit te voeren, dan moet je het ww ingeven. Wordt opgeslagen in /root/.vnc/xstartup
sudo apt-get install vncviewer

Firefox Installeren:
apt-get install iceweasel
Chrome installeren:
apt-get install chromium-browser

De browsers zijn nogal traag. Daarom ook (maar) de tekstversie installeren:
apt-get install lynx


Ik heb een 2GB SD kaart gebruikt. Vervolgens een 32GB USB stick aangesloten, daar wil ik de data plaatsen. Via deze pagina mount USB on Raspberry Pi heb ik deze installatie uitgevoerd:
sudo mkdir /media/usbstick
sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/usbstick/


Omdat ik via CRON een website wil testen, ook nog het volgende toegevoegd:
sudo apt-get install libwww-perl


Bovenaan staat een link naar dingleberrypi.com, hier staat een beschrijving hoe je ervoor kunt zorgen dat je Raspberry Pi vanaf USB-stick opstart. Geen gedoe met een SD-kaart. Werkt prima, daarom heb ik hier nog maar even een kopie van de inhoud van die pagina gemaakt:

Install and run Raspbian from a USB Flash Drive
May 20, 2013Tutorialsraspberry pi uses, Raspian web server, Tutorial, USB
In this tutorial, I’m going to talk you through running Raspbian from a USB connected drive instead of from an SD card. Running from a USB connected Flash or Hard Drive has many advantages, the biggest being speed and reliability.

SD Cards have a limited read/write cycle, and when hosting a site with a MySQL database from a SD card, it won’t take long before you start getting corruptions and failures. USB Flash drives provide a cheap and reliable alternative. I’ve tested several USB Flash drives, and found Sandisk and Corsair to be the best for speed and reliability. This site is run off a 16GB Corsair Voyager 3 USB Flash drive.

Assumptions before we begin

I’m going to assume that you know your way around Terminal, and are using a Mac to perform these steps. You will still need an SD card to store the boot instructions to tell the Raspberry Pi to launch the OS from the USB; the Raspberry Pi’s can’t (yet) boot directly from a USB storage device.

Step 1 – Download Raspbian from Raspberry Pi

You will need the standard Raspbian OS image, you can download this from the official Raspberry Pi website. Once you’ve downloaded it, unzip it. It’s around 400mb in size, so should only take a couple of minutes over a broadband connection.

Step 2 – Install the Raspbian OS to your USB Flash drive

Plug in your USB stick and launch Terminal. The first thing we’re going to do is get the device identifier for your USB Flash drive. To do this run the following command:

diskutil list
The list of attached disks will show up with their identifiers. Important – make a note of the correct identifier, you can do some serious damage by choosing the wrong one!


In the screen shot above, I can see that /dev/disk2 is the correct identifier for my Sandisk USB Flash Drive. Yours may be different so change to suit your configuration. Next we’re going to unmount the USB Flash Drive. To do this enter the following command:

diskutil unmountDisk /dev/disk2
Yet again, be really careful to change disk2 to whatever your computer identifies the USB Flash Drive as. You will get a message saying

“Unmount of all volumes on disk2 was successful”.

Now we can begin the copy. For ease, I’ve changed the directory in Terminal to where the Raspbian image is located, which in this case is my downloads folder. If you’ve downloaded and unzipped the disk image to your downloads folder, running this command should take you there:

cd ~/Downloads/
Now run this command to begin the copy:

sudo dd bs=1m if=2013-02-09-wheezy-raspbian.img of=/dev/disk2
As with before, make sure you change disk2 to whatever your computer identifies as being the USB Flash Drive, and change 2013-02-09-wheezy-raspbian.img to whatever your image file is called. The blocks will now begin moving to your USB Flash Drive from the Raspbian OS image. This takes anything from 5 to 20 mins depending on the speed of your USB Flash Drive. Go stick the kettle on and have a brew!


Eventually, you will see something similar to the above, and it probably took a while too. The next step is to configure your SD Card to give the correct boot instruction to start the OS from the USB Flash Drive

Step 3 – Configure your SD card

Using Disk Utility, format your SD Card using FAT32. It’s dead easy, choose your SD Card from the devices listed on the right, then click on ‘Erase’, choose FAT32 in the Formats list and click on ‘Erase’.

Once you’ve done this, you’ll notice on your Desktop, there are two mounted volumes; one is your USB Flash Drive, the other is your SD Card.

Open up the USB Flash Drive volume and copy all the files from that onto your SD card. This copies the all-important files and instructions to tell your Raspberry Pi to boot from the USB Flash Drive. We’re almost done at this point, only one more step to go.

Step 4 – Change the boot path on your SD card

Once you’ve completed step 3, you need to change the default boot path to tell the Raspberry Pi to boot from your USB drive. Open a new Finder window and go to your SD card. Open up the file called cmdline.txt in TextEdit or similar and amend the line which reads:

root=/dev/mmcblk0p2
To this:

root=/dev/sda2
This will instruct your Raspberry Pi to boot from the USB Flash Drive instead of from the SD card. Save the cmdline.txt file and close the Finder window. We’re almost done!

Step 4 – Boot from your USB Flash Drive on your Raspberry Pi

Now unmount both your USB Flash Drive and your SD card and pop them both into your Raspberry Pi and switch it on. If all goes well, it should boot from your USB Flash Drive which you’ll find substantially quicker than your SD Card.

Step 5 – Expand the Raspbian partition on your USB Flash drive to fill it

Finally, we’re just going to do a little housekeeping to utilise all the available space on your USB Flash drive as the method using raspi-config doesn’t work on USB Flash drives. This isn’t essential, but if you have the extra space on a USB Flash Drive, why not use it all?

From your Raspberry Pi, type the following command to start FDisk:

sudo fdisk /dev/sda
Then press p and enter to see the partitions. There should only be 2. What we’re going to do now is delete the Linux partition, but before we do this, we make a note of the start position for the linux partition sda2. Press d and then when prompted type 2 and then hit enter. This will delete the partition.

Now we’re going to create a new partition, and make it large enough for the OS to occupy the full space available on the USB Flash Drive. To do this type n to create a new partition, when prompted to give the partition type, press p for primary. Then it will as for a partition number, press 2 and hit enter.

You will be asked for a first sector, set this as the start of partition 2 as noted earlier. In my case this as 12280 but this is likely to be different for you.

After this it will ask for an end position, hit enter to use the default which is end of disk. Now type w to commit the changes. You will see a message about the Kernel using some table yaddah yaddah, just ignore this. Type the following to reboot:

sudo reboot
Once your Raspberry Pi has rebooted, we need to resize the partition. To do this type the following command:

sudo resize2fs /dev/sda2
Be patient, this will take some time. Once it’s done reboot again. Then type:

df -h
This will show the partitions and the space, you’ll see the full USB Flash Disk has all the space available now. That’s it, all done!

---

Ruimte vrijmaken:

sudo apt-get purge wolfram-engine

sudo apt-get clean

sudo apt-get autoremove


sudo apt-get remove --purge libreoffice

sudo apt-get clean

sudo apt-get autoremove

Ook minecraft PI kun je zo verwijderen

Wereldontvanger

Projectsite van mp3pi

Cython 0.25.2 van Raspbian testing

Lijst met commando’s uit het artikel</p> Het configuratiebestand van Kivy staat normaal gesproken in de home-directory van de gebruiker die het programma uitvoert. Het generieke pad luidt dan $HOME/.kivy/config.ini. Voor appliances op de Raspberry Pi die meestal met root-rechten draaien, is dit /root/.kivy/config.ini.</p>


Ongebonden, videogames

Retropie downloaden

Retropie-wiki

Setup-tips voor de DualShock-controller van de Sony PS4 op de Pi

Setup-tips voor Wiimotes op de Pi

Zelfbouw weerstation

RRDTool website

Voorbeelden van grafieken met rrdtool

Documentatie van rrdtool

Download Python-scripts van Adafruit voor de DHT22 / AM2302 luchtvochtigheid- en temperatuursensor

Hoe Adafruit BMP183 aan Pi aan te sluiten en te gebruiken met Python-script

Online kleurentabel met hexadecimale waarden

In het artikel genoemde scripts en commando’s in zip-archief

Pi op wielen

Originele CarPi project
Projectsite van Andrei Istodorescu Projectforum Github Installatiepakketen van de auteur (current_carpc van 07-03-2017 is de basis van het artikel) Duits forum over CarPi Maps downloaden Pi USV+ Navit-wiki over speech in Nederlands http://wiki.navit-project.org/index.php/Speech http://wiki.navit-project.org/index.php/FAQ#Navit_speaks.21_But_it.27s_all_English Forum-thread over het opsplitsen van het antennesignaal bij de radiomodule (Duits) Opmerking: Voor de nieuwere Raspbian-versies zijn er nu nog een paar kleine aanpassingen nodig, die in de laatste versie van het carpc-script overigens automatisch worden doorgevoerd. Je kunt dat controleren door het opstartbestand te openen met sudo nano /etc/rc.local . De voorlaatste regel moet het onderstaande commando bevatten: /bin/chmod 777 /dev/tty* <p>Dit zorgt ervoor dat de gebruiker pi toegang heeft tot de terminals. Deze gebruiker is ook lid gemaakt van de groep tty. Als dat niet het geval zou zijn, kun je dat doen met

sudo adduser pi tty



PI Hole, zie ook CT 7-8 2018. Add-blocker


Mono Installeren:

tutorial

Welke versie heb ik? In de terminal uitvoeren: cat /etc/debian_version

In mijn geval 9:

sudo apt install apt-transport-https dirmngr

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb https://download.mono-project.com/repo/debian stable-raspbianstretch main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt update

sudo apt upgrade

sudo apt install mono-complete


Fritzbox monitoren

CT 12 - 2018 (Munin)