logo
navigationGo.pngQuick Navigation
allprojects32.pngAll projects
hardware32.pngHardware
links32.pngLinks

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

github32.pngGitHub
AlanFromJapan

navigationMail.pngContact me

alanfjmail.png
3flags.pngWho's Alan?


Akizukidenshi
Elec-lab
Rand Nerd Tut
EEVblog
SpritesMods
Switch-science
Sparkfun
Suzusho
Datasheet Lib
Reddit Elec
Ermicro
Carnet du maker (fr)
Marutsu
ATmel blog (defunct)

raspi

Official documentation : http://elinux.org/R-Pi_Hub
- Lots of tutorials : http://elinux.org/RPi_Tutorials
- Troubleshooting commands : http://elinux.org/RPI_vcgencmd_usage

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
  • Change machine name : see here
  • Change SSH port: see here and here
  • Router:
    • IP reservation to the Pi mac

Raspi web server with Flask


Raspi as a cloud [DONE!]

  • Use OwnCloud

Raspi as DLNA server [DONE!]


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

Raspi file share SAMBA [DONE!]


#edit
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
    
    
    Links:

    Raspi as VLC server


    Transform a Raspi in an arcade cabinet


    Setup DNS cache service

    See DNS server at home.

    Raspberry Pi Hardware

    Hardware details

    List of test points and usage

    http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=89522
    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
    PP24 COMPVID
    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

  • Bought this one
  • Used this this driver from SpotPear. They seemed the most "serious" and recent. Worked as a charm.
  • This is the official driver I got from the vendor. There's even a nice PDF. It's a Waveshare screen.
  • Here's what I did (in case the SpotPear page gets eaten by the Internet black hole):
    1. Download the driver (at the time I write this, it was LCD-show-151102.tar.gz)
    2. Un-tgz it and run the "sudo ./LCD35-show"
    3. Thats all

    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? http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/
  • http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/
  • http://en.kedei.net/raspberry/raspberry.html
  • Typical touchscreen chip that Raspi knows: ads7846
  • another driver that looks like the official in fact :/ : https://github.com/notro/fbtft
  • 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 https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
  • Turn a Raspi in a Jukebox

  • http://lifehacker.com/how-to-build-a-raspberry-pi-jukebox-any-non-geek-can-us-1712107103
  • All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
    electrogeek.cc ~ Formerly known as Kalshagar.wikispaces.com (AlanFromJapan [2009 - 2017])