Other articles

  1. Raspberry Pi 3.5" Touch Screen

    3.5" Touch display

    To install the drivers, do this:

    sudo rm -rf LCD-show 
    git clone https://github.com/goodtft/LCD-show.git 
    chmod -R 755 LCD-show 
    cd LCD-show/
    sudo ./LCD35-show

    To return to HDMI, do this:

    chmod -R 755 LCD-show 
    cd LCD-show/ 
    sudo ./LCD-hdmi

    To rotate screen and swap mouse …

    read more
  2. Raspberry Pi Touch Screen

    7.0" touch screen

    The first thing is to start with a fresh installation of Rasbian. To be sure you are up-to-date do this:

    sudo apt-get update

    sudo apt-get upgrade

    sudo apt-get dist-upgrade

    sudo apt-get install rasberrypi-ui-mods

    sudo apt-get install rasberrypi-net-mods

    Then connect it like this:

    If you need to …

    read more
  3. Raspberry Pi - Autostart a program


    Sometimes it is handy to start an application right after boot time. This is how I did it, to start chromium-browser in fullscreen mode.

    cd .config
    mkdir lxsession
    cd lxsession
    mkdir LXDE-pi
    cd LXDE-pi
    nano autostart

    This is the autostart file: Autostart

    Another autostart file, which hides the "Chromium didn't …

    read more
  4. How to install LAMP on Raspberry Pi

    This is how I install LAMP server on my Pi's

    After a fresh Rasbian installation I do the following:

    sudo apt-get update && sudo apt-get install -y apache2 php7.0 libapache2-mod-php7.0 mariadb-server phpmyadmin

    Logon credentials for myphpadmin: Username: myphpadmin Password: password entered during installation

    If you do not get any …

    read more
  5. Raspberry Pi and 2 x 16 LCD

    Install library from Adafruit

    git clone https://github.com/adafruit/Adafruit_Python_CharLCD.git

    cd ./Adafruit_Python_CharLCD

    sudo python setup.py install

    sudo apt-get install build-essential python-dev scons swig

    Lots of stuff running across the screen, but it ends with:

    Finished processing dependencies for Adafruit-CharLCD==1.1.1

    sudo apt-get install rpi

    read more
  6. Raspberry Pi,2 x 16 LCD and web scraping

    This program log on to a website, and get som information.

    The import block:

    import time
    from time import gmtime, strftime
    import socket
    import Adafruit_CharLCD as LCD
    import requests


    time_counter = 0
    lcd_rs  = 25
    lcd_en  = 24
    lcd_d4  = 23
    lcd_d5  = 17
    lcd_d6 …
    read more
  7. How to list all images in a folder, sorted

    PHP script

    This PHP script lists all images in a folder, in descending order. The files are shown as images.

    array_multisort(array_map('filemtime', ($files = glob("*.jpg"))), SORT_DESC, $files);
    foreach($files as $filename)
        echo "<a href='http://nerdegutta.org/".substr($filename, 0, -4).".jpg'><img src='http://nerdegutta.org/".substr …
    read more
  8. How to ftp-upload a file with Python

    This script uploads a file to an FTP server

    import ftplib
    server = 'yourftpserver.something'
    username = 'yourusername'
    password = 'yourpassword'
    ftp_connection = ftplib.FTP(server, username, password)
    remote_path = "/home/yourusername/ftp"
    fh = open("filetouploadincludepath …
    read more
  9. Raspberry Pi and Linux stuff to remember

    To add a user to the sudoers group

    Log into the Raspberry Pi as Pi, and add the user with

    sudo adduser <username>

    Then use usermod to add the user to the specified group:

    sudo usermod -G <group> -a <username>

    Group is the name of the group, for example sudo …

    read more
  10. Notes about Linux / Ubuntu

    Things I always forget

    To edit the main menu in Ubuntu:

    sudo apt-get install alacarte


    To read large SD cards install exfat and utils

    sudo apt-get install exfat-fuse exfat-utils

    Access /dev/ttyUSB

    sudo usermod -a -G dialout $USER


    sudo adduser $USER dialout

    sudo reboot

    To run crontab every 5th …

    read more

Page 1 / 1