Semi-Live Image (IR)

...auto-refresh ... Upgrade in progress....for more info check out posts...

Friday, 1 January 2016

2016!

  [credit: Google]

Thursday, 31 December 2015

Pi-Birdies! Part VII - Priorities

...what can I say....

 
 
I spent some time writing a python code for streaming to a server (which I shall post as soon as it is completed).
 
And then I played around with the desktop settings of Raspian to be more "spacey"....for my Feng Shui and well for a myriad of other reasons, including: should I forget what it is that I do professionally, I now have to only turn on my Pi and stare at the desktop in oblivious ignorance! Soooo simple! :-)
 
And this what I have come up with so far in terms of the nesting box. I will not refine it at the moment and will play it by ear as I construct it. I have to add some inner structure to it as I will be making both the front and sides "openable".
 
 
 
Oh!...and....a happy and serene 2016 to all!

Sunday, 27 December 2015

Pi-Birdies! Part VI - Technobabbel

Trying to write a python programme to stream to a server and hence am reading up on network services, protocols, sockets and the likes and then trying to explain this to someone whilst myself trying to understand why it is not working..... what ensues is definitely technobabbel (https://en.wikipedia.org/wiki/Technobabble) on my part.... that is what it feels like at any rate!

Someone remarked: "sockets are small socks"....

Pi-Birdies! Part V - parts which are still missing

Just a few quick and rough annotations as to things that I wish to add:

Camera Multiplexer - for more than one camera (http://www.ivmech.com/)
very much like so: https://hackaday.io/project/2847-ivport-raspberry-pi-camera-module-multiplexer, requiring https://github.com/ivmech/ivport

GPS - ok just a gimmick.... because I can for the moment - bringing birdies and space together is a thrilling idea - but mostly for the future when nesting boxes will populate the woods and scientists need the GPS position of the boxes. At any rate this is what I intend to do: https://learn.adafruit.com/downloads/pdf/adafruit-ultimate-gps-on-the-raspberry-pi.pdf

Bluetooth - ...as already mentioned before

Sensors - of various types...

Pi-Birdies! Part IV - RPi-Cam-Web-Interface and JUICE: ESA's JUpiter ICy moons Explorer

And another thing....
I discovered this in my attempt to avoid programming a whole web-interface! Open-source is indeed something quite fantastic.

It is called the RPi-Cam-Web-Interface and it is great.


So all I do is:
ifconfig .... check out the ip address ... http://192.168.1.4/ ... and voila' ...

...off to Jupiter and its moons....

 
..which brings to mind ESA's JUICE Mission http://sci.esa.int/juice/
 
The mission "The JUpiter ICy moons Explorer (JUICE) will perform detailed investigations of Jupiter and its system in all their inter-relations and complexity with particular emphasis on Ganymede as a planetary body and potential habitat. Investigations of Europa and Callisto would complete a comparative picture of the Galilean moons." [http://sci.esa.int/juice/50068-science-objectives/]
 
"The JUICE mission will address two themes of ESA's Cosmic Vision programme: What are the conditions for planet formation and emergence of life? and How does the Solar System work?"
 
credit: ESA - [http://sci.esa.int/juice/50181-exploring-the-jovian-system/]


I am quite exicted about JUICE and in addition to the wonders of space science it also reminds me of "Farmer in the Sky"...
 
Fits50.jpg
 
...a 1950 science fiction novel by Robert A. Heinlein about a teenaged boy who emigrates with his family to Jupiter's moon Ganymede... [https://en.wikipedia.org/wiki/Farmer_in_the_Sky]).

...for, as an esteemed colleague pointed out to me this year at the IAC, we are Solarians....


Pi-Birdies! Part III - Pi-Python Knowledge (camera, sensors and ftp)

I feel like sharing some acquired, though by no means the finest of, pi-phython-knowledge for those that like myself need such a thing...
 
There are various parts to this code, which I again wish to precise, is by no means a finished product:
Part (1) - ftp connection
Part (2) - camera activation
Part (3) - sensory information retrieval
Part (4) - overlaying sensory information on camera stream
Part (5) - capture image
Part (6) - upload image to ftp server

----------------------------------------------------------
# -*- coding: utf-8 -*-
import io
import time
import picamera

# Part (1)
# import ftp library
import ftplib #sufficient actually to import only the class FTP
meinftp = ftplib.FTP("ftp.XXX.XXX.de","username","pwd") #important to only specify the ftp main address and not a subdirectory
directory = '/webspace/httpdocs/bought-the-pasta/videos/livestream/' #intended ftp-directory
meinftp.cwd(directory)

#local upload-directory
directory_local='/home/pi/Desktop/' #/home/pi/1-NistkastenProjekt/timelapse/
print "ftp: So sieht der Inhalt von ",directory, " vor dem Upload aus:"
print

meinftp.retrlines('LIST')

#my_stream = io.BytesIO()

# Part (2)
with picamera.PiCamera() as camera:

        #(this here should all be indented)
        # camera settings
        camera.resolution = (1024,768)
        camera.sharpness = 0
        camera.contrast = 0
        camera.brightness = 50
        camera.saturation = 0
        camera.ISO = 0
        camera.video_stabilization = False
        camera.exposure_compensation = 0
        camera.exposure_mode = 'auto'
        camera.meter_mode = 'average'
        camera.awb_mode = 'auto'
        camera.image_effect = 'none'
        camera.color_effects = None
        camera.rotation = 0
        camera.hflip = False
        camera.vflip = False
        camera.crop = (0.0, 0.0, 1.0, 1.0)

        camera.start_preview()

        # Part (3)
        from sense_hat import SenseHat
        sense = SenseHat()
        #print("check")

        while True:
         #(again indent)
                t = sense.get_temperature()
                p = sense.get_pressure()
                h = sense.get_humidity()
                t = round(t, 1)
                p = round(p, 1)
                h = round(h, 1)

                #print("Temp [C] = %s, Press =%s, Humidity =%s" % (t,p,h))

                #sense.show_message(" ", scroll_speed=0.1)
                ttext = str(t)
                ptext = str(p)
                htext = str(h)
       
                fulltext = "Temp: " + ttext + " [C]; Press: " + ptext + "; Hum: " + htext
                fulltext = "Pi-Birdies! " + fulltext
                #print(fulltext)

                # Part (4)

                camera.annotate_text = fulltext #("Pi-Birdies!""temp:",(ttext,ptext,htext))

                 # Part (5)       

                time.sleep(2)
                camera.capture(my_stream,'jpeg')
                camera.capture('/home/pi/Desktop/SnapshotStream000.jpg')
                #camera.stop_preview()

                filename = 'SnapshotStream000.jpg'


                print
                print 'Location and name of the local file: ' + directory_local + filename
                print

                 # Part (6) 

                file = open(directory_local+filename, 'rb') #reading mode

                print 'Upload: ftp-Server: ' + directory + filename

                #'STOR ' the required ftp command


                meinftp.storbinary('Stor '+filename, file)

                print "ftp: content of directory ",directory, " after upload:"
                print

                meinftp.retrlines('LIST')

                print
                print 'Die lokale Datei ' + directory_local+filename +' wird geschlossen.'
                file.close()

                #print meinftp.quit() #terminate FTP-connection
                #print
                #print 'Die FTP-connection terminated.'

Pi-Birdies! Part II - Pi-Nest 1st Design Attempt

Pi-Nest for the Pi-Birdies - Design @ 01:12 on the 27th of December...