Go to advanced search

by gordon77
Mon Apr 22, 2019 10:07 am
Forum: General discussion
Topic: How to save image capture from pi camera with file names date time?
Replies: 1
Views: 47

Re: How to save image capture from pi camera with file names date time?

Code: Select all

data= time.strftime("%Y-%b-%d_(%H%M%S)")
camera.capture('%s.jpg'%data)  
by gordon77
Sun Apr 21, 2019 11:35 am
Forum: HATs and other add-ons
Topic: 4 DC Motor Controller not working
Replies: 1
Views: 51

Re: 4 DC Motor Controller not working

Looking at the schematic etc. https://www.waveshare.com/wiki/Motor_Control_Shield you need a pwm3 signal from somewhere?
by gordon77
Sun Apr 21, 2019 8:36 am
Forum: Advanced users
Topic: Comparing two images taken from Pi camera
Replies: 20
Views: 6286

Re: Comparing two images taken from Pi camera

See the method l use here...

viewtopic.php?t=238118
by gordon77
Sat Apr 20, 2019 7:52 am
Forum: Advanced users
Topic: Comparing two images taken from Pi camera
Replies: 20
Views: 6286

Re: Comparing two images taken from Pi camera

Yes. You could look at the code l posted earlier in this thread and you could load an image to compare against instead of comparing to the last image.
Also take a look here.. viewtopic.php?t=221245&start=50 where it will recognise objects.
by gordon77
Fri Apr 19, 2019 8:40 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 236

Re: How to add images to this email alert script?

Where did you put the code?

Try putting it after server.quit()
by gordon77
Fri Apr 19, 2019 7:46 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 236

Re: How to add images to this email alert script?

Try..

os.remove ('%s.jpg'%data)

Note l have already removed the moveto section of code.
by gordon77
Fri Apr 19, 2019 6:16 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 236

Re: How to add images to this email alert script?

That's normal when you do a ctrl c, it will normally tell you what was going on when you did it, it can be ignored. Maybe you need to look into making a controlled exit.

Try the code l've modified above. Again use ctrl&C to exit.
by gordon77
Fri Apr 19, 2019 5:15 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 236

Re: How to add images to this email alert script?

try this... #!/usr/bin/env python3 # -*- coding: utf-8 -*- import RPi.GPIO as GPIO import picamera import time import smtplib sensor = 4 GPIO.setmode(GPIO.BCM) GPIO.setup(sensor, GPIO.IN, GPIO.PUD_DOWN) previous_state = False current_state = False from email.mime.multipart import MIMEMultipart from ...
by gordon77
Fri Apr 19, 2019 3:08 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 236

Re: How to add images to this email alert script?

There's a script at the end of this thread viewtopic.php?t=178442
which you can modify to use a gpio instead of the timer.
by gordon77
Fri Apr 19, 2019 12:54 pm
Forum: Camera board
Topic: V4L2 Manual ISO
Replies: 5
Views: 1651

Re: V4L2 Manual ISO

after more experimenting I have discovered..

The ISO setting has an effect when auto_exposure is OFF if you have scene_mode set to 8 or 11, (it only appears to accept values of 0, 8 or 11 for scene_mode).
by gordon77
Fri Apr 19, 2019 10:57 am
Forum: Python
Topic: placing 2-dim arrays into 3-dim sheets
Replies: 7
Views: 148

Re: placing 2-dim arrays into 3-dim sheets

Can you provide more info, eg what are manifolds, known, new etc?

When l run it it rejects if i==0, j==0, k==0:, does this work for you?
by gordon77
Thu Apr 18, 2019 8:34 pm
Forum: General programming discussion
Topic: School Project Help
Replies: 17
Views: 480

Re: School Project Help

If using python3 do you just need some brackets...

print (pygame.midi.get_device_info(x))
by gordon77
Thu Apr 18, 2019 11:14 am
Forum: Camera board
Topic: V4L2 Manual ISO
Replies: 5
Views: 1651

Re: V4L2 Manual ISO

I still have an issue with the ISO setting.

ISO will only change if v4l2-ctl --set-ctrl=auto_exposure=0, eg auto ON. NOT if it's OFF.

also v4l2-ctl -l says auto_exposure has a range of 0 to 3, but it only accepts 0 or 1.
by gordon77
Wed Apr 17, 2019 4:54 pm
Forum: Other projects
Topic: Paradox SP6000
Replies: 6
Views: 95

Re: Paradox SP6000

I had a quick look at the manual, do you know what the RELAY connections do? If outputs l assume they could be connected to pi inputs.
by gordon77
Tue Apr 16, 2019 9:25 am
Forum: Beginners
Topic: Photo with random overlay
Replies: 5
Views: 146

Re: Photo with random overlay

Try this.. put some jpg images in /home/pi/Pictures/ and run 'sudo pip3 install RandomWords' first from os import walk from pygame.locals import * import pygame, sys import random import time from picamera import PiCamera import os from random_words import RandomWords rw = RandomWords() # put jpg's ...
by gordon77
Tue Apr 16, 2019 7:01 am
Forum: Python
Topic: Storing data from Python program to MySQL database
Replies: 9
Views: 10863

Re: Storing data from Python program to MySQL database

The OP hasn't posted since 2015.
by gordon77
Mon Apr 15, 2019 4:27 pm
Forum: Beginners
Topic: Photo with random overlay
Replies: 5
Views: 146

Re: Photo with random overlay

Can you provide more details of what you need, are the images taken from a collection of images? Is the text just random words or a list of defined sentences etc? Any chance of an example output screen?
by gordon77
Sun Apr 14, 2019 9:55 am
Forum: Troubleshooting
Topic: PIR Motion sensor always outputting
Replies: 57
Views: 12728

Re: PIR Motion sensor always outputting

try this.. import RPi.GPIO as GPIO import os GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO_PIR = 19 # pin 35 GPIO.setup(GPIO_PIR,GPIO.IN) print (" Press Ctrl & C to Quit") try: while GPIO.input(GPIO_PIR)==1: Motion = 0 print (" Ready") Motion = 0 pic = 1 while True : if GPIO.input(GPIO_PIR)==1...
by gordon77
Sun Apr 14, 2019 9:44 am
Forum: Graphics programming
Topic: Huge problem with install opencv
Replies: 1
Views: 91

Re: Huge problem with install opencv

I use this method... much simpler, may not be the latest version but it works OK for me sudo pip3 install opencv-python sudo apt-get install libcblas-dev sudo apt-get install libhdf5-dev sudo apt-get install libhdf5-serial-dev sudo apt-get install libatlas-base-dev sudo apt-get install libjasper-dev...
by gordon77
Sun Apr 14, 2019 9:19 am
Forum: Graphics programming
Topic: SOLVED (sort of) Opencv (Python) toolbar
Replies: 1
Views: 509

Re: SOLVED (sort of) Opencv (Python) toolbar

I have worked around the issue by using cv2.namedWindow(winName,cv2.WINDOW_GUI_NORMAL) cv2.setWindowProperty(winName,cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) which works on my 3.5" display, but still has some smaller grey bars top and bottom, probably the aspect ratio of my window, but gets r...
by gordon77
Sun Apr 14, 2019 9:14 am
Forum: Troubleshooting
Topic: PIR Motion sensor always outputting
Replies: 57
Views: 12728

Re: PIR Motion sensor always outputting

yes.

Now can you upload a photo of the back of the PIR sensor so we can see the connections
by gordon77
Sun Apr 14, 2019 7:36 am
Forum: Troubleshooting
Topic: PIR Motion sensor always outputting
Replies: 57
Views: 12728

Re: PIR Motion sensor always outputting

Have you check all things suggested, eg cable correct (5v in correct place), pir correct?
by gordon77
Sat Apr 13, 2019 8:30 pm
Forum: Troubleshooting
Topic: PIR Motion sensor always outputting
Replies: 57
Views: 12728

Re: PIR Motion sensor always outputting

The cable maybe the wrong way around comparing it to this...?

https://freva.com/2018/08/30/raspberry- ... sing-gpio/
by gordon77
Sat Apr 13, 2019 5:56 pm
Forum: Beginners
Topic: Photo with random overlay
Replies: 5
Views: 146

Re: Photo with random overlay

Take a look at pygame.

Go to advanced search