Category Archives: raspberry pi

1.8″ TFT Adafruit display(ST7735) and Arduino uno


Install Adafruit ST7735 Lib and the Adafruit_GFX library for Arduino.

I had to upgrade ino to 0.3.6 in order to be able to build the example srcipts:

pip install --upgrade ino

I renamed the example files to .ino (’cause .cpp & pde gave errors)

Make sure you name the directories as in the documentation.

root@tortuguita:/usr/share/arduino/libraries# ls -lh Adafruit_*
total 36K
-rw-r--r-- 1 root root  13K Jul  5 23:51 Adafruit_GFX.cpp
-rw-r--r-- 1 root root 2.8K Jul  5 23:51 Adafruit_GFX.h
-rw-r--r-- 1 root root 8.0K Jul  5 23:51 glcdfont.c
-rw-r--r-- 1 root root 1.4K Jul  5 23:51 license.txt
-rw-r--r-- 1 root root  947 Jul  5 23:51 README.txt

total 40K
-rwxr-xr-x  1 root root  22K Nov  8 19:44 Adafruit_ST7735.cpp
-rwxr-xr-x  1 root root 4.7K Nov  8 19:44 Adafruit_ST7735.h
drwxr-xr-x 10 root root 4.0K Nov  8 19:44 examples
-rw-r--r--  1 root root 1.1K Nov  8 19:44 README.txt

Then I built it using inotool.

raspberry pi & telescope


  • Raspberry Pi model 2
  • TFT touchscreen
  • Adafruit TFT/camera Soft
  • Raspberry Pi camera module
  • Celestron First Scope
  • USB tablet charger
  • Disclaimer

     This is a _really_ low cost astrophotography device implementation, simple to build and not intended to do complicated (i.e. long exposition, tracking) photography. My main inspiration to build it was my nephew ;) ) 

    What we got is:

    rpi and celestron

    And what we see is:
















    source for TFT
    source for Adafruit software


  • how to fix the USB chager to the telescope (Hint: velcro)
  • how to fix the R-Pi to the telescope (Hint: see the rubber bands in the picture?)
  • how to fix the Pi Noir to the eyepiece (Hint: look too previous methods) DONE
  • I found this article that gave me the idea.

    Adafruit’s TFT + raspberrypi + camera

    I finally managed to have a working camera + touchscreen using a raspberry pi
    All I did was assembling the hardware and some copy/paste to have a working configuration.

    Youtube video of the boot

    put this contraption and the telescope together 😉

    unboxing the TFT
    preparing the stuff
    bad soldering
    bad soldering

    console on TFT

    lxde on r-pi
    lxde on r-pi


    to build
    to make X start as youwant to
    to make the camera work as you’d expect

    raspberrypi + lots of external USB drives

    I used two different USB hubs, one from The Pi Hut and another (sexier) one from pimoroni plugged to each of the USB ports of a rapsberry pi model B.
    I was able to plug 7 500G hard drives: 3 to the 7 port USB Hub (which also powers the Raspberry Pi) and 4 to the Pi Hub. This gave me about 3.5 Gb of storage.
    Don’t expect high speed data transfers 😉

      • software
        • blkid

    If, for instance, you reboot the raspberry, disk may “appear” in a different order at boot, sdX1 will not be the same disk it was prior to the reboot, this will fuck mess your mount points. Use blkid to get the UUID for each device (see example). Use it as root.

        • fstab

    The options defaults,user allow any user to mount the disk and gives read/write access.

      • hardware
        • Pi Hub
        • 7 port Hub
        • USB external hard drives
      • code
     blikd example:
    /dev/sda1: LABEL="My Passport" UUID="EA6854D268549F5F" TYPE="ntfs"
    /dev/sdb1: LABEL="My Passport" UUID="9C64D17064D14DA0" TYPE="ntfs"
    /dev/sdc1: UUID="788889661CDB8DC8" TYPE="ntfs"
    /dev/sdd1: LABEL="KINGSTON" UUID="423A-9647" TYPE="vfat"
    /dev/sr0: LABEL="WD SmartWare" TYPE="udf"
     fstab example:
    UUID=9C64D17064D14DA0 	/media/wdblack1 auto	defaults,user 	0	0
    UUID=EA6854D268549F5F	/media/wdblack2	auto	defaults,user	0	0
    UUID=788889661CDB8DC8	/media/wdred	auto	defaults,user	0	0


    pi usb hub
    pi usb hub
    pi usb hub unboxing
    pi usb hub unboxing
    pi hut usb hub
    pi hut usb hub

    Temperature and humidity graph with raspberry pi

    Top posted update:
    Now it looks like this

    • a pinch of pygal
    • 1 raspberry pi (I used model B)
    • breadboard + accessories
    • DHT22 (or equivalent)

    I just followed Adafruit’s tutorial for the wiring and the software
    Then I did a slight modification to the script provided by Adafruit to write the data to a log file (temp-hum.log) instead of google drive spreadsheet.

    Actual work
    Updated code on Github
    To generate the log file that will be parsed by pygal on github
    Adafruit’s code for the sensor forked on github

    A short python script to generate the graphic using Pygal:

    #!/usr/bin/env python
    import pygal
    temp = []
    hum  = []
    logdata = open('temp-hum.log','r')
    for line in logdata.readlines():
      line = line.split()[1:]
    line_chart = pygal.Line(width=1200)
    line_chart.title = 'Temperature Humidity'
    line_chart.add('Temperature *C', temp)
    line_chart.add('Humidity %', hum) 
    breadboard and flat cable
    breadboard and flat cable
    DHT22 and cables
    DHT22 and cables
    r-pi and all
    r-pi and all
    DHT22 sensor
    DHT22 sensor
    r-pi with sensor
    r-pi with sensor

    And the graphic looks like:

    Sources: Adafruit DHT22 tutorial

    comment savoir qui est connecté sur ma freebox + bonus

    Pour connaitre les IP et adresses mac des appareils qui sont connectés sur une Freebox, il suffit de faire


    et avec un petit coup de grep, ceux qui connaissent pourront avoir les infos précises.
    Pour savoir à qui appartiens une mac adresse, voici un lien: coffer ou pour les bricoleurs, un petit script qui fais pareil: github


    Pour avoir la playlist qui marche bien avec VLC après: