Other articles

  1. 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
  2. Raspberry Pi,2 x 16 LCD and web scraping

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

    The import block:

    1
    2
    3
    4
    5
    6
    #!/usr/bin/python
    import time
    from time import gmtime, strftime
    import socket
    import Adafruit_CharLCD as LCD
    import requests
    

    Assignment:

    time_counter = 0
    
    lcd_rs  = 25
    lcd_en  = 24
    lcd_d4  = 23
    lcd_d5  = 17
    lcd_d6 …
    read more
  3. Motion.conf - file

    This is a copy/paste of the localhost:8080 file settings.

    <– back
    
    Camera 0
    daemon = on
    process_id_file = /var/run/motion/motion.pid
    setup_mode = off
    camera_name = (not defined)
    logfile = /var/log/motion/motion.log
    log_level = 6
    log_type = all
    videodevice = /dev/video0
    v4l2_palette = 17
    input = -1
    norm = 0
    frequency = 0
    rotate = 0 …
    read more
  4. How to ftp-upload a file with Python

    This script uploads a file to an FTP server

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    #!/usr/bin/python
    import ftplib
    
    server = 'yourftpserver.something'
    username = 'yourusername'
    password = 'yourpassword'
    
    ftp_connection = ftplib.FTP(server, username, password)
    remote_path = "/home/yourusername/ftp"
    ft_connection.cwd(remote_path)
    fh = open("filetouploadincludepath …
    read more
  5. 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

Page 1 / 1

blogroll

social