Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
raspberry:pi_radio [2016/10/24 23:01]
admin [Upgrade]
raspberry:pi_radio [2016/10/25 02:19]
admin [Setting up the radio]
Line 8: Line 8:
 ---- ----
 ==== Upgrade ==== ==== Upgrade ====
 +
 +  $ sudo raspi-config
 +
   $ sudo apt-get update   $ sudo apt-get update
   $ sudo apt-get upgrade   $ sudo apt-get upgrade
      
-  $ sudo apt-get install htoppython-pip +  $ sudo apt-get install htop python-pip idle idle3
- +
----- +
-==== Read-Only SD Card ==== +
-Change the SD card to a read-only mode.\\ +
-[[http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card]]\\ +
-[[https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem]]\\ +
- +
-=== Fstab === +
-in: +
-  $ sudo nano /etc/fstab +
-change: +
-  /dev/mmcblk0p2  /               ext4    defaults,noatime,ro  0       1 +
-  tmpfs           /tmp            tmpfs   defaults,size=30M    0       0 +
- +
-=== Disable some Programms === +
-disable rsyslog and dphys-swapfile:\\ +
- +
-  $ sudo systemctl disable rsyslog +
-  $ sudo systemctl disable dphys-swapfile +
- +
-=== Remount === +
-To remount the partition writabe:\\ +
-  $ sudo mount / -o remount,rw+
  
 ---- ----
Line 41: Line 21:
   $ sudo mkdir /home/pi/stolenmoments   $ sudo mkdir /home/pi/stolenmoments
   $ sudo blkid   $ sudo blkid
-  /dev/mmcblk0p3: LABEL="fat32" UUID="BC16-DD42" TYPE="vfat" +  /dev/sda1: LABEL="USB-STICK" UUID="3DE8-04D4" TYPE="vfat" PARTUUID="4ca531d6-01"
   $ sudo nano /etc/fstab   $ sudo nano /etc/fstab
 edit: edit:
   #USB Stick on /dev/sda1   #USB Stick on /dev/sda1
-  UUID=A933-7A00       /home/pi/stolenmoments/data    vfat    utf8,umask=022,uid=pi,gid=pi  0       0+  UUID=3DE8-04D4     /home/pi/stolenmoments    vfat    utf8,umask=022,uid=pi,gid=pi  0       0
 or:   or:  
   #USB Stick on /dev/sda1   #USB Stick on /dev/sda1
-  /des/sda1       /home/pi/stolenmoments/data    vfat    utf8,umask=022,uid=pi,gid=pi  0       0+  /dev/sda1       /home/pi/stolenmoments    vfat    utf8,umask=022,uid=pi,gid=pi  0       0
  
 $ sudo mount -a $ sudo mount -a
Line 77: Line 57:
       netmask 255.255.255.0       netmask 255.255.255.0
       gateway 192.168.0.1       gateway 192.168.0.1
-      dns-nameservers 192.168.0.1+      dns-nameservers 8.8.8.8 8.8.4.4
              
 Save and quit, ctl+o, Return, ctl+x.\\ Save and quit, ctl+o, Return, ctl+x.\\
Line 123: Line 103:
   $ make clean   $ make clean
   $ make   $ make
-  +
   $ sudo ./pi_fm_rds -freq 99.9 -audio sound.wav   $ sudo ./pi_fm_rds -freq 99.9 -audio sound.wav
-  +or: 
 +  $ sudo /home/pi/Pi-FM-RDS/PiFmRPi2-master/src/pi_fm_rds -freq 99.9 -audio /home/pi/stolenmoments/radioouterspace_de.wav
  
-**PiFM**\\ +---- 
-[[https://github.com/rm-hull/pifm]]\\ +==== Autostart ====
-[[http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter]]+
  
-  $ mkdir /home/pi/radio +  $ sudo nano /etc/rc.local 
-  $ cd /home/pi/radio +insert before "exit 0": 
-download pifm:\\ +  printf " " 
-  $ wget http://omattos.com/pifm.tar.gz +  printf "*******************************************************\n" 
-or:\\ +  printf "                                                    *\n" 
-  $ wget http://dernulleffekt.de/download/pifm.tar.gz +  printf "       (    ( ( (( o )) ) )  )                  *\n" 
-and unpack:\\ +  printf "                     |                              *\n" 
-  $ tar -xzvf pifm.tar.gz +  printf "                     |                              *\n" 
-connect a wire to GPIO 4.\\ +  printf "                     |                              *\n" 
-  $ sudo ./pifm left_right.wav freq 22050 stereo +  printf "                                                    *\n" 
-   +  printf "            Radio From Outer Space                  *\n" 
-==== for Pi 2,3 ====+  printf "                dernulleffekt.de                    *\n" 
 +  printf "                W.Spahn Okt 2016                    *\n" 
 +  printf "                                                    *\n" 
 +  printf "*******************************************************\n" 
 +  printf " " 
 + 
 +  #start radio 
 +  /home/pi/stolenmoments/radiofromouterspace_01.py & 
 + 
 + 
 +---- 
 +==== Read-Only SD Card ==== 
 +Change the SD card to a read-only mode.\\ 
 +[[http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card]]\\ 
 +[[https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem]]\\ 
 + 
 +=== Fstab === 
 +in: 
 +  $ sudo nano /etc/fstab 
 +change: 
 +  /dev/mmcblk0p2                ext4    defaults,noatime,ro  0       1 
 +  tmpfs           /tmp            tmpfs   defaults,size=30M    0       0 
 + 
 +=== Disable some Programms === 
 +disable rsyslog and dphys-swapfile:\\ 
 + 
 +  $ sudo systemctl disable rsyslog 
 +  $ sudo systemctl disable dphys-swapfile 
 + 
 +=== Remount === 
 +To remount the partition writabe:\\ 
 +  $ sudo mount / -o remount,rw 
 + 
 +---- 
 +====GPIO Connections==== 
 +   GPIO 04   Antenna 
 +   GPIO 17   Button EN 
 +   GPIO 18   Button DE 
 +   GPIO 22   LED DE 
 +   GPIO 23   LED EN 
 +   GPIO 27   Shutdown/Reset 
 +    
 +[[http://elinux.org/RPi_Low-level_peripherals]]\\ 
 +<html> 
 +<img src=http://elinux.org/images/5/5c/Pi-GPIO-header.png> 
 +</html> 
 + 
 +---- 
 +==== Other Radios ==== 
 +=== for Pi 2,3 ===
 make a folder: make a folder:
  
Line 165: Line 194:
  
 ---- ----
-====GPIO Connections==== 
-   GPIO 04   Antenna 
-   GPIO 17   Button EN 
-   GPIO 18   Button DE 
-   GPIO 22   LED EN 
-   GPIO 23   LED DE 
-   GPIO 27   Shutdown/Reset 
-    
-[[http://elinux.org/RPi_Low-level_peripherals]]\\ 
-<html> 
-<img src=http://elinux.org/images/5/5c/Pi-GPIO-header.png> 
-</html> 
- 
----- 
-