Finally there it is, my third post for the teacher pet contest.
It has been a while but I have been really busy and I had to wait for some stuff to come to be able to start working with my raspberry.
First of all I bought myself a external screen, which had HDMI input (yes the only other screens I have are VGA/DVI input only, and I didn't wanted to buy yet another adapter
)
For this post I will shorten Raspberry-pi by RPi, I hope that it won't offend anyone but it takes too much effort otherwise.
I have to say though, that I preferred the old S-video output on the old RPi than this 3-ways 3,5mm jack... which are unfortunately not that popular.
1)Downloading and setting up
For my first try at using a RPi I did it the easy way ! No crazy things going on here.
I first downloaded a fresh and clean image of raspbian
https://www.raspberrypi.org/downloads/
I am not sure what the NOOB concept is all about but a wasn't too exited about loosing time trying to figure out what this was.
Then whith the little software linked on the page (Win32 Disk Imager download | SourceForge.net)
the process of making a bootable SD card for the raspberry was flawless, nothing to complain about.
Unfortunately I don't have any screen capture for the all rasp-config thing but it was all pretty easy.
Don't forget to expand the space to the whole SD card, otherwise you would have the bad surprise of finding that your total space on the pi is only 55.9 MB or so...
I also configured the keyboard to my old and trusty qwertz setup
and I enabled the use of the Rpi camera, which I will need later on for the project.
The first thing I needed was a way to take screenshots, so I searched for a few seconds and settled on using the utility package scrot.
sudo apt-get update sudo apt-get upgrade sudo apt-get install scrot scrot
A few lines in the terminal later my first screenshot was here.
Then I needed a way to easily and quickly transfer screen shots and other files from my RPi to my windows PC (strangely the remote connection works right out of the box with my MacBook).
So I went and followed this nicely done tutorial How-To: Share a folder with a Windows computer from a Raspberry Pi | Raspberry Pi HQ
Having a shared folder on the raspberry will dramatically improve the productivity I will have to develop the project.
2)Getting the first video stream from the raspberry cam
Lets do some test with opencv and python first.
So after some search I found this little tutorial http://tothinkornottothink.com/post/59305587476/raspberry-pi-simplecv-opencv-raspicam-csi
Which appears to be really comprehensive http://tothinkornottothink.com/post/59305587476/raspberry-pi-simplecv-opencv-raspicam-csi
# import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 32
rawCapture = PiRGBArray(camera, size=(640, 480))
# allow the camera to warmup
time.sleep(0.1)
# capture frames from the camera
for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
# grab the raw NumPy array representing the image, then initialize the timestamp
# and occupied/unoccupied text
image = frame.array
# show the frame
cv2.imshow("Frame", image)
key = cv2.waitKey(1) & 0xFF
# clear the stream in preparation for the next frame
rawCapture.truncate(0)
# if the `q` key was pressed, break from the loop
if key == ord("q"):
break
This piece of code allowed me to see that everything was working properly and it is a big step foward.
Next time I will implement the color detection system 
See you then.




