Linux #6 2018 – Listing 2 Internet Radio

<?xml version=”1.0″?> <ices:Configuration xmlns:ices=”http://www.icecast.org/projects/ices”>  <Playlist>    <!– This is the filename used as a playlist when using the builtin playlist handler. –>    <File>/etc/ices/Arjan/Arjan.txt</File>      <!– Set this to 0 if you don’t want to randomize your playlist, and to 1 if you do. –>    <Randomize>1</Randomize>    <!– One of builtin, perl, or python. –>    <Type>builtin</Type>    <!– Module… Lees meer

Linux #5 2018 – Listing 2 E-Ink op Raspberry Pi

import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM)   knoppen = [5, 6, 13, 19]   GPIO.setup(knoppen, GPIO.IN, pull_up_down=GPIO.PUD_UP)   def knop_ingedrukt(pin):     print(‘knop %s’%(knoppen.index(pin)+1))   for knop in knoppen:     GPIO.add_event_detect(knop, GPIO.FALLING, callback=knop_ingedrukt, bouncetime=200)   def main():       while True:         time.sleep(0.01)   if __name__ == ‘__main__’:     main()

Linux #5 2018 – Listing 1 E-ink op Raspberry Pi

import epd2in7b import Image import ImageFont import ImageDraw import time import RPi.GPIO as GPIO import subprocess   epd = epd2in7b.EPD() epd.init()   COLORED = 1 UNCOLORED = 0   GPIO.setmode(GPIO.BCM)   knop1 = 5 knop2 = 6 knop3 = 13 knop4 = 19   knoppen = [knop1, knop2, knop3, knop4]   GPIO.setup(knoppen, GPIO.IN, pull_up_down=GPIO.PUD_UP)  … Lees meer

Linux #5 2018 – Listing Flikkerend Kaarslicht

const int ledPin = 3; const int max_stil = 10000; // Maximale tijd in milliseconden dat de led niet flakkert, langer is rustiger. const int max_vertoning = 3; // Maximumaantal vertoningen van een patroon. const int min_helderheid = 50; // Donkerste waarde van het flakkeren (maximaal 255). const int max_helderheid = 150; // Lichtste waarde… Lees meer

Linux #5 2018 – Listing Inbraakalarm

const int micPin = A0; const int ledPin = 13; const int drempel = 5; // Stel hiermee de gevoeligheid in. Lager is gevoeliger, minimumwaarde is 2. int value1 = 0; int value2 = 0; void setup() { pinMode(ledPin, OUTPUT); Serial.begin(9600); } void loop() { value1 = analogRead(micPin); delayMicroseconds(100); value2 = analogRead(micPin); if (abs(value2 –… Lees meer

Linux #5 2018 – Trappenhuislicht Listing

int switchstate = 0; const int ledPin = 12; const int switchPin = 6; const int langdrukken = 1000; // Bepaal hiermee hoe lang de knop moet worden ingedrukt om te verlengen. const int standaardtijd = 5000; // Stel hiermee de tijd in dat de led normaal brandt. const int langetijd = 20000; // Stel… Lees meer

Linux #5 2018 – Turtl Listing Server Installatie-script

# Installatie van de Turtl server # zie ook https://www.linode.com/docs/applications/cloud-storage/how-to-install-a-turtl-server-on-ubuntu/   sudo apt install wget curl libtool subversion make automake git m4 sudo wget https://dist.libuv.org/dist/v1.19.2/libuv-v1.19.2.tar.gz   # libuv installeren sudo tar -zxvf libuv-v1.19.2.tar.gz cd libuv-v1.19.2 sudo sh autogen.sh sudo ./configure sudo make sudo make install sudo ldconfig   # rethink installeren, hier halen wij een… Lees meer

Linux #5 2018 – Turtl Listing Installatie-script

# Turtl desktop client installatie script # # Hieronder installeren wij versie 0.6.4., controleer of dit de laatste # versie is   sudo apt-get install libcanberra-gtk-module bzip2 wget https://turtlapp.com/releases/desktop/turtl-linux64-0.6.4.tar.bz2 bzip2 -d turtl-linux64-0.6.4.tar.bz2  tar -xvf turtl-linux64-0.6.4.tar cd turtl-linux64 sudo ./install.sh sudo chmod +x /opt/turtl/turtl-bin sudo chmod -R a+r turtl cd /opt/turtl sudo chmod +x lib locales… Lees meer