navigationGo.pngQuick Navigation
allprojects32.pngAll projects

favoriteStar32.pngTop projects
Alan numitron clock
Clapclap 2313/1386
SNES Pi Webserver
USB Volume/USB toys
Smokey amp
Laser cutter
ardReveil v3
SNES Arcade cabinet
Game boy projects
Home Presence Detector


navigationMail.pngContact me

3flags.pngWho's Alan?

Rand Nerd Tut
Gameboy Dev
FLOZz' blog
Datasheet Lib
Reddit Elec
Carnet du maker (fr)


Last update: Thu Jun 18 21:38:21 2020
Official documentation :
- Lots of tutorials :
- Troubleshooting commands :

Projects and tips

Startup setup

  • With the config tool: expand the disk size, set 16MB for the GPU, set the locale to something en_US.UTF8, change pi default password
  • Minimal tools:
    • sudo apt-get install emacs-nox
  • Change machine name : see here
  • Change SSH port: see here and here
  • Router:
    • IP reservation to the Pi mac

Install the OS image on SD card from Linux

Get it at and then:

sudo dd bs=20M if=retropie-xxxxxxxxxxx.img of=/dev/sde conv=fsync
To enable the SSH from first boot (meaning working directly headless), do that:
  • After copying, got to the /boot partition
  • Create an empty file named 'ssh'
  • Done, the file will be used as a flag for the first boot and enable ssh.
  • SSH user : pi / SSH password : raspberry
  • To setup wifi on first boot, do that:
  • In the SD card /boot
  • Make a 'wpa_supplicant.conf' file with contents:
  • country=JP
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
     ssid="YOUR WIFI SSID"
     psk="YOUR PASSWORD"

    Change hostname

    Edit the 2 files /etc/hostname and /etc/hosts.

    Raspi web server with Flask

  • Use Flask
  • install with sudo pip install flask
  • Very good manual

  • Raspi as a cloud [DONE!]

    • Use OwnCloud

    Raspi as DLNA server [DONE!]

    sudo vim /etc/minidlna.conf
    #restart the service after changes
    sudo service minidlna force-reload

    Raspi file share SAMBA [DONE!]

  • ← the one I used
    sudo vim /etc/samba/smb.conf
    #restart the service after changes
    sudo /etc/init.d/samba restart

    Raspi mount a USB drive [DONE!]

    Edit /etc/fstab
    /dev/sda1       /media/usbhdd   ntfs-3g    rw,defaults,uid=smbuser,gid=smbuser  0 0
    Or on the command line:
    $ sudo mount -t ntfs-3g -o "rw,defaults,uid=smbuser,gid=smbuser" /dev/sdb1 /mnt/usbdrive02

    Stop the HDD

    Is used hdparm and it works though with my Japanese Buffalo 1TB USB HDD I get an error when running the command. So for the next time I check and I wonder (like today): it's normal, just ignore the error, it works.
    How to:
  • Install hdparm sudo apt-get install hdparm
  • You can use 2 ways: ① change the spindown timeout with the -S xxx (with timeout = 5sec * xxx) or ② change the power management settings with -B 127 (or whatever value, just use man)
  • For my part I use the -S 180 to put the spindown timeout every 15 mins (more tricky than that but in my case), which so far is a good compromise for me
  • Make it permanent by editing /etc/rc.local
    #start the command to stop the USB drive after x-minutes
    #-S 180 = 180 x 5sec = 15 min of inactivity and drive stops motor
    #see man hdparm for that parameter, it's tricky
    #AVI20170219 Juste un reminder: ca lance des erreurs mais ca marche quand meme
    /sbin/hdparm -S 180 /dev/sda1

    Raspi as VLC server

    Transform a Raspi in an arcade cabinet

    Setup DNS cache service

    See DNS server at home.

    Extend the SD life : use a /tmp in RAM

    Plenty of sources but in a nutshell:
  • In /etc/fstab add the below ↓ line and reboot to get a maximum 150MB /tmp in RAM (only the really used amount of mem is consumed, not a reservation like a malloc):
  • tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=150M 0 0

    Pygame and Graphics without X

    Install with sudo apt-get install python-pygame
  • Raspberry Pi Hardware

    Hardware details

    List of test points and usage
    PP1 5V from micro-USB
    PP2 5V from micro-USB
    PP3 GND
    PP4 GND
    PP5 GND
    PP6 GND
    PP7 5V after polyfuse
    PP8 3V3
    PP9 1V8
    PP10 Goes from 3V3 to 2V on brownout
    PP11 DAC_2V5 (for composite video DAC)
    PP12 AUD_2V5 (for PWM audio drivers)
    PP13 Goes from 3V3 to 2V on ACT activity
    PP14 SD_CLK
    PP15 SD_CMD
    PP16 SD_DAT0
    PP17 SD_DAT1
    PP18 SD_DAT2
    PP19 SD_DAT13
    PP20 H5V
    PP21 RUN signal (reset)
    PP22 Goes from 3V3 to 2V on activity of green (link) ethernet jack LED
    PP23 Goes from 3V3 to 2V on activity of yellow (speed) ethernet jack LED
    PP25 AUDIO_L
    PP26 AUDI_R
    PP27 VBUS (USB 5V power)
    PP28 ETH_CLK (25.000 MHz)
    PP29 VC_TMS
    PP30 VC_TRST_N
    PP31 VC_CLK
    PP32 VC_TDI
    PP33 VC_TDO
    PP34 GND
    PP35 GPIO6 of LAN9514
    PP36 GPIO7 of LAN9514
    PP37 CAM_GPIO0
    PP38 CAM_GPIO1
    PP39 SCL0
    PP40 SDA0

    Raspberry Pi and a 3.5 Inch LCD screen

    Setup of 3.5 Inch LCD

    Ok all pages disappeared (June2020), so after a small seach it's a Waveshare 3.5 inches.
    1. git clone
    2. sudo ./LCD35-show
    3. Thats all (it might fail on the xinput calibrator but ignore this)

    Things to remember

    • Device is a Framebuffer at /dev/fb1
    • "To change the blanking of the screen on console just append the line consoleblank=0 to the /boot/cmdline.txt and restart!" (source)
    • fbset tool for getting details
    • There's a python lib named FbPy, and she doesn't work from the start so:
      • sudo apt-get install python-dev libffi-dev
      • sudo pip install cython
      • sudo pip install numpy
      • export CFLAGS=-I/usr/local/lib/python2.7/dist-packages/numpy/core/include/
      • sudo pip install cffi
      • sudo pip install JACK-client
      • pip install fbpy

    Other resources

  • One how to setup. Is it the good one?
  • Typical touchscreen chip that Raspi knows: ads7846
  • another driver that looks like the official in fact :/ :
  • Raspberry Pi 3

    Bought April 2016, here's the different steps I used to set it up.
  • sudo raspi-config : extand the disk space, change hostname, make graphic memory 16 (min), change local, wifi country
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install emacs-nox htop python-setuptools
  • ⇒ install emacs without X modules, htop, python's easy_install so you can get pip tool
  • sudo easy_install pip
  • ⇒ install python's pip tool
  • setup the wifi
  • Turn a Raspi in a Jukebox

  • All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated) ~ Formerly known as (AlanFromJapan [2009 - 2021])