richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Sun Apr 27, 2014 1:53 pm

BMS Doug wrote:Sweet, easy to connect, just use the composite cable to connect from the Pi's composite out to the Composite in of the screen.

Alternatively, the PC input could be used with a HDMI to VGA converter.


Doug.
(must write a signature).
Hi BMS,

Sorry for the late reaction , but it was way sooooo bussy at the job and life ...

Thank you for your reaction , so you mean the screen is ok to use with Pi that is a very good thing :D

"Alternatively, the PC input could be used with a HDMI to VGA converter." this I don't understand ... You mean the impuls from the pc ?

BR ,

Richard
Richard

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Nice project but I need help to get it done

Sun Apr 27, 2014 2:00 pm

I guess he meant buying a HDMI-to-VGA convertor and
connecting it via HDMI to the Pi and via VGA to the screen.
Could give you slightly better quality than a RCA-to-SVideo
convertor.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Sun Apr 27, 2014 2:02 pm

FHU130 wrote:Hi Richard

The Raspberry Pi Cookbook by Simon Monk is a great book about interfacing with the pi. It gives you example python code and tells you how to download and install all the extras. it even gives you circuit diagrams and layouts for expansion/prototype boards & breadboard.

I'm sure you can look inside the book (a preview) on some well known book seller web sites.

Hope that helps, i'm using it as a stepping stone/source to build a data capture/logging network with a web server most of the info I need is in that 1 book.

Best Regards

Peter
Hello Peter ,

Many thanks for your reply.

I will get the book,

Thanks caue I'm playing at home with the pi as media station (thank god for NOOBS) :shock: very cool stuff. And with bits I can see some trees in the woods . . . I understand Doug when and others when they say "forget about scratch you need Phyton" the more I play with it and read about it the more interesting it gets ;) Tomorrow at the office I will check for it and buy my one , because I NEED a good book and I NEED to learn Phyton :ugeek: .

Thanks to you all mate's for the brilliant responses.

The next step is for this coming week, putting it together .... O yeah can't I use jumpers with cables on it , you know female to female ? I wana play save and don't want to burn holes it the sweet Pi thing ... :oops:

BR

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Sun Apr 27, 2014 2:06 pm

ghans wrote:I guess he meant buying a HDMI-to-VGA convertor and
connecting it via HDMI to the Pi and via VGA to the screen.
Could give you slightly better quality than a RCA-to-SVideo
convertor.

ghans
Hmm isn't that a bit expensive? I thought it cost more then 250$
I will get into it this week and hopefully at the end of the week I can say "IT'S ALIVE , IT'S ALIVE .."
:lol:

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Nice project but I need help to get it done

Sun Apr 27, 2014 5:15 pm

You can get those converters for as little as 15 $ - but i urge
you to invest in one with external power adaptor for 5 $ more.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Mon Apr 28, 2014 8:14 am

richard_robust wrote:
ghans wrote:I guess he meant buying a HDMI-to-VGA convertor and
connecting it via HDMI to the Pi and via VGA to the screen.
Could give you slightly better quality than a RCA-to-SVideo
convertor.

ghans
Hmm isn't that a bit expensive? I thought it cost more then 250$
I will get into it this week and hopefully at the end of the week I can say "IT'S ALIVE , IT'S ALIVE .."
:lol:
Yup, that's what I meant, depends on which inputs you need on the screens for other stuff and what resolution you need from the image. If you don't need high resolution then just connect the RCA to SVideo.

I also need to learn more python, although the problem I'm having might be more hardware than software.

Doug.
Doug.
Building Management Systems Engineer.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Mon Apr 28, 2014 8:32 am

Hi Richard, going back to the original question
richard_robust wrote:
The problem is : We have software on a Windows 7 system that normally tracks incidence. This get done with a camera (ip adress) and a buss thing via an ADAM (relay) now when there is somebody or something that enters and they may not, the program sent a impulse to the ADAM and on the desk there plays a buzz tone. Now the thing is we want except of giving a buzz (like it is done now via relay ADAM) it must show also a picture (JPEG) on a lcd screen (11inch or so) for 5 sec or so.. The program works it does it thing but how do you get the impulse trough the PI and tell the PI let hear a buss tone and show me a picture for 5 sec or so???

Richard
To rephrase this you want the relay contact to trigger a video output.
The relay contact can be thought of as a switch. so we need to write a python program that will output a JPEG when a switch is made.

this tutorial describes how to setup and program a raspberry pi to use a switch (such as your relay output) to turn on and off an LED.

so first get this up and running then we can modify the program to display your JPEG.

Question
What is the desired normal behaviour of the screen (when not displaying JPEG).

Comment:
some kind of testing board would probably be useful, something like this or this (needs a solderless breadboard to go with it, may require assembly (soldering))

Image

Doug.
Last edited by BMS Doug on Mon Apr 28, 2014 1:34 pm, edited 2 times in total.
Doug.
Building Management Systems Engineer.

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Mon Apr 28, 2014 1:24 pm

tinylcd wrote:Hello Richard

you can visit below website to see if any of the TFT meet your requirement


http://www.neosecsolutions.com/products.php?28

regards
tinylcd
Hi tinylcd,

Thx for your reply,

Looked at it , but it is to small for us for this project, for other possible projects in the future it it can be very handy to have a nice site were to buy them when needed. (or for me personaly when needed I will find your site :) ) but for this project to small and the fact that it must be placed on the pi is not preferable at the moment ..

BR

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Tue Apr 29, 2014 1:20 pm

BMS Doug wrote:Hi Richard, going back to the original question
richard_robust wrote:
The problem is : We have software on a Windows 7 system that normally tracks incidence. This get done with a camera (ip adress) and a buss thing via an ADAM (relay) now when there is somebody or something that enters and they may not, the program sent a impulse to the ADAM and on the desk there plays a buzz tone. Now the thing is we want except of giving a buzz (like it is done now via relay ADAM) it must show also a picture (JPEG) on a lcd screen (11inch or so) for 5 sec or so.. The program works it does it thing but how do you get the impulse trough the PI and tell the PI let hear a buss tone and show me a picture for 5 sec or so???

Richard
To rephrase this you want the relay contact to trigger a video output.
The relay contact can be thought of as a switch. so we need to write a python program that will output a JPEG when a switch is made.

this tutorial describes how to setup and program a raspberry pi to use a switch (such as your relay output) to turn on and off an LED.

so first get this up and running then we can modify the program to display your JPEG.

Question
What is the desired normal behaviour of the screen (when not displaying JPEG).

Comment:
some kind of testing board would probably be useful, something like this or this (needs a solderless breadboard to go with it, may require assembly (soldering))

Image

Doug.
Hi Doug,

Thanks for this reply this helps me a lot. Just bought me an breadboard and all the stuff that I need to test this. I'm not sure that I have to do the last one, cause of an extra addon for RasperryPi that I don't have and not sure if I need that one to? (if so I will order it)

The python programming looks very doable , if it stays as this then I guess we will get it work.
So now I'm playing with it until I get the feeling with it and a bit of understandment so I know what is happening when triggerd by what .

So until further notice from you I keep searching and playing/testing the board and the Pi.

Thank you very much Doug,

BR

Richard

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Wed Apr 30, 2014 1:38 pm

richard_robust wrote:
Hi Doug,

Thanks for this reply this helps me a lot. Just bought me an breadboard and all the stuff that I need to test this. I'm not sure that I have to do the last one, cause of an extra addon for RasperryPi that I don't have and not sure if I need that one to? (if so I will order it)

The python programming looks very doable , if it stays as this then I guess we will get it work.
So now I'm playing with it until I get the feeling with it and a bit of understandment so I know what is happening when triggerd by what .

So until further notice from you I keep searching and playing/testing the board and the Pi.

Thank you very much Doug,

BR

Richard
Just one or the other, you won't need both.
A breadboard alone would be enough as long as you can get the GPIO pin outputs out to where you can play with the configuration. (But be careful of what you do with your pins, the wrong connection can lead to a burnt Pi)
Doug.
Building Management Systems Engineer.

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Mon May 05, 2014 4:35 pm

Hello fellow Pi Lovers,

I got the electronics working now "It's alive , it's aliVE" :D, now I do have a better view of this magnificent Pi thing, many thanks goes to all you guys who helped this far and specially Doug for his contribution to this all making it more clearly.

What do I know now that I didn't knew before : The LCD screen works perfect via DVI (thx also to the guys who helped me with it. Texy, when we ever have a need of touch screens for thze Pi I know who I can contact then.)

I know that the info that comes out the pc can be a) ftp, mail or signal and (but not 100% sure both), it is controllable and that is a good thing to know.

Now I have to find out: I see that the pi is always visible on screen , this may not happen when it start up ok no problem but then it must go black. when there is an incident then the pi goes off and let see an image from that incident for 5 sec or so, then it turns back off or a push button. Probably it will be doable with python or shell scripting or PIO scripting not sure but have to find and test out (learning thing..). Finding out what is the best sending via ftp or via SMTP or signal and what to do with that signal (most interesting ;) ).

BR,

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Tue May 06, 2014 1:00 pm

Hello Pi guys/girls,

Got a small question , for the image handling can I use imagemagick for it? or is there a better program to do this? Dont have to do anything with the pic when viewed only fullscreen but that I can probably program in python or so..

BR,

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Wed May 07, 2014 9:00 am

And I'm stuck again , this time it is the program that must been made .

I thought will find it troughout trying but that python thing is not easy especialy when never done .

So My question now is , is there a programmer that is able to help me with this one.

To show the picture on-screen we can use imagemagick. But the tricky part is the fact that it may only happen when there is a signal from the other computer coming in (port 80 or 9090). More I read about the programming thing the more crazy I get ... and the time is ticking ...

Many thanks on advance

Richard

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Wed May 07, 2014 5:57 pm

While I'd love to help, unfortunately I'm not so good with programming a pi yet.
Don't be too set on doing this in python, it might not be the best language for what you want to do. Hopefully someone will have a suggestion for the best route and you can take that to the right programming sub-forum to get the help you need.
Doug.
Building Management Systems Engineer.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Wed May 07, 2014 6:02 pm

this may help
Display Images on Screen without StartX

No StartX needed. Sends images to the framebuffer directly
Obtain the package
This will load the fbi image viewer on your RPi...
sudo apt-get install fim

Will typically add about 39mb's to your drive.
Display images
To display images on the screen of your RPi... use the command:
fim -a *.jpg

Which will show all the jpg images in the current directory when you move to the next image.
Last edited by BMS Doug on Wed May 07, 2014 6:33 pm, edited 2 times in total.
Doug.
Building Management Systems Engineer.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Wed May 07, 2014 6:31 pm

A bit more stuff...

This teaches how to stop the screen from sleeping, making the screen sleep would just be a different time setting...
stopping the screen shutting down.

Code: Select all

Prevent the Raspberry from going to sleep:
We are almost done… one thing that drove me nuts for a little while was how the Raspberry would occasionally turn off the monitor. I couldn’t really narrow down what I did to fix the issue. I updated the following config settings and they seem to work as expected.

Update the kbd config file.

sudo vi /etc/kbd/config

Scroll down till you see the BLANK_TIME setting and change it to 0.

# screen blanking timeout. monitor remains on, but the screen is cleared to
# range: 0-60 min (0==never) kernels I've looked at default to 10 minutes.
# (see linux/drivers/char/console.c)
#BLANK_TIME=30
BLANK_TIME=0

Scroll down a little more till you see the POWERDOWN_TIME setting and change it to 0

# Powerdown time. The console will go to DPMS Off mode POWERDOWN_TIME
# minutes _after_ blanking. (POWERDOWN_TIME + BLANK_TIME after the last input)
#POWERDOWN_TIME=30
POWERDOWN_TIME=0
Doug.
Building Management Systems Engineer.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Wed May 07, 2014 7:16 pm

So, I guess that if I was programming your script in python it would go something like:

Code: Select all

# Import various programs

# Set display to blank screen
# setup GPIO input
# setup PC port requirement

While:
    # condition to allow run (port from other PC active)
    if GPIO # (relay input active):
       # display image
       # time delay
       # stop displaying image
       # force screen to sleep mode or display blank screen.
Doug.
Building Management Systems Engineer.

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Thu May 08, 2014 12:38 pm

Hi Dough,

Many thanks for your reply mate.
This helps a lot at the moment. We are stuck now , it ain't that simple to program it without knowledge of the program language. Even if we aren't still sure what program to take. I thought Python would do the job but we are not sure about that at the moment.
Even looking for a freelance programmer to help us out but don't find one.

Time is passing by and frustration is rising. If there is a good programmer python, php, shell , C , java (I don't know what language to take)he may always contact me via here or via PM.
In my close surroundings there is no programmer available at the moment :?

BR,

Richard

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Nice project but I need help to get it done

Thu May 08, 2014 12:49 pm

richard_robust wrote: In my close surroundings there is no programmer available at the moment :?
Where in the world are you?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Thu May 08, 2014 2:41 pm

Hi Richard,

could you try this:



Update the kbd config file.

sudo vi /etc/kbd/config

Scroll down till you see the BLANK_TIME setting and change it to 0.5

Code: Select all

# screen blanking timeout. monitor remains on, but the screen is cleared to
# range: 0-60 min (0==never) kernels I've looked at default to 10 minutes.
# (see linux/drivers/char/console.c)
#BLANK_TIME=30
BLANK_TIME=0.5 
# 30 seconds
Scroll down a little more till you see the POWERDOWN_TIME setting and change it to 0

Code: Select all

# Powerdown time. The console will go to DPMS Off mode POWERDOWN_TIME
# minutes _after_ blanking. (POWERDOWN_TIME + BLANK_TIME after the last input)
#POWERDOWN_TIME=30
POWERDOWN_TIME=0
this will set the blank time to 30 seconds (hopefully) so that 30 seconds of inactivity from the Pi will turn off the screen but never power off the screen.
Doug.
Building Management Systems Engineer.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Nice project but I need help to get it done

Thu May 08, 2014 2:59 pm

image display tutorial

I don't know if this will work:

connect your Pi to your display and then SSH in and from the terminal run this program:

Code: Select all

import numpy as np
import cv2

# Load an color image unchanged
# change the name 'Richard.jpg' to that of the image you want to use
# The image should be in the working directory or a full path of image should be given.
img = cv2.imread('Richard.jpg',-1)

cv2.imshow('image',img)
cv2.waitKey(30)
cv2.destroyAllWindows()

Hopefully this will put the image up on the display.
Doug.
Building Management Systems Engineer.

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Fri May 09, 2014 7:33 am

BMS Doug wrote:image display tutorial

I don't know if this will work:

connect your Pi to your display and then SSH in and from the terminal run this program:

Code: Select all

import numpy as np
import cv2

# Load an color image unchanged
# change the name 'Richard.jpg' to that of the image you want to use
# The image should be in the working directory or a full path of image should be given.
img = cv2.imread('Richard.jpg',-1)

cv2.imshow('image',img)
cv2.waitKey(30)
cv2.destroyAllWindows()

Hopefully this will put the image up on the display.
Many many Thanks Dough,

I'm trying to implement it all and test it to see if it works, hopefully we can do it this way and probably it will work.
Mounted the folder where the pics come in (mount -t smbft -o ... didn't work but by using cits it's working although I can't let the picture from that folder on the windows machine beeing visible on the pi, maybe there are some arguments that I can give so it will show after all.

now first I gone look into what you gave to me to try will inform you about the progress later Dough. You'r a life saver at the moment. :)

BR,

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Fri May 09, 2014 7:56 am

BMS Doug wrote:Hi Richard,

could you try this:



Update the kbd config file.

sudo vi /etc/kbd/config

Scroll down till you see the BLANK_TIME setting and change it to 0.5

Code: Select all

# screen blanking timeout. monitor remains on, but the screen is cleared to
# range: 0-60 min (0==never) kernels I've looked at default to 10 minutes.
# (see linux/drivers/char/console.c)
#BLANK_TIME=30
BLANK_TIME=0.5 
# 30 seconds
Scroll down a little more till you see the POWERDOWN_TIME setting and change it to 0

Code: Select all

# Powerdown time. The console will go to DPMS Off mode POWERDOWN_TIME
# minutes _after_ blanking. (POWERDOWN_TIME + BLANK_TIME after the last input)
#POWERDOWN_TIME=30
POWERDOWN_TIME=0
this will set the blank time to 30 seconds (hopefully) so that 30 seconds of inactivity from the Pi will turn off the screen but never power off the screen.
Done mate, going to the next

thx.

BR

Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Fri May 09, 2014 10:40 am

Hi Dough,

I'm trying to install opencv to my system but I'm not able to let it work something wrong with the svgwrite lib.. Have installed the ipython python-opencv python-scipy python-numpy python-setuptools python-pip.
then did
sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master

this is the ERROR that I get :

ERROR:
Traceback (most recent call last):
File "/usr/local/bin/simplecv", line 9, in <module>
load_entry_point('SimpleCV==1.3', 'console_scripts', 'simplecv')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/__init__.py", line 4, in <module>
from SimpleCV.Camera import *
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Camera.py", line 5, in <module>
from SimpleCV.ImageClass import Image, ImageSet, ColorSpace
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 14768, in <module>
from SimpleCV.DrawingLayer import *
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/DrawingLayer.py", line 5, in <module>
import svgwrite
ImportError: No module named svgwrite

It is installed cause it gives me results when typing ipython
or import cv2
print cv2.version it gives me :

In [2]: print cv2.version
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-af53e89309d8> in <module>()
----> 1 print cv2.version

AttributeError: 'module' object has no attribute 'version'

So for now I'm stuck again ... :cry: and going bananaz

BR ,
Richard

richard_robust
Posts: 51
Joined: Sat Apr 19, 2014 7:32 am

Re: Nice project but I need help to get it done

Fri May 09, 2014 11:52 am

Hi all,

UPDATE

Ok the errors are gone now,

But when I try to run the python program that you give me it seems to do something but it doesnt show any picture at the moment , have changed the chown to pi still no picture. (run it like : python viewimage.ph from shell)
No error at all so I guess it got something to do with the folder where the script is in. (the same as picture so normaly it must work no ?

BR,

Richard

Return to “General discussion”