Go to advanced search

by gordon77
Mon Jun 17, 2019 11:27 am
Forum: Staffroom, classroom and projects
Topic: art project with a traffic light
Replies: 4
Views: 181

Re: art project with a traffic light

This may get you started. https://www.raspberrypi.org/forums/viewtopic.php?t=223659 Change the buttons to pirs, they may need inverting try this... from gpiozero import LED from gpiozero import Button from time import sleep red1 = LED(23) # RED set 1 amber1 = LED(24) # AMBER set 1 green1 = LED(25) #...
by gordon77
Mon Jun 17, 2019 11:10 am
Forum: Beginners
Topic: controlling traffic light with PI
Replies: 2
Views: 103

Re: controlling traffic light with PI

This may get you started.
viewtopic.php?t=223659
by gordon77
Sun Jun 16, 2019 7:47 pm
Forum: Advanced users
Topic: I2S and I2C on GPIO-Pins
Replies: 5
Views: 226

Re: I2S and I2C on GPIO-Pins

I have never used i2s but searching the Internet it appears on gpios 18,19,20 and 21, these don't appear to be used by i2c

https://learn.adafruit.com/adafruit-i2s ... pi/pinouts
by gordon77
Sun Jun 16, 2019 6:46 pm
Forum: Off topic discussion
Topic: Arduino connection to the PI (with 12C)
Replies: 18
Views: 1728

Re: Arduino connection to the PI (with 12C)

Both voltages need to go to the level shifter, otherwise the level shifter will not work. Edit: The voltages are used to provide power to the level shifter itself. Without that connected it will not work properly. I could give you a detailed explanation why. Hi! Can you explain me pls? Take a look ...
by gordon77
Sun Jun 16, 2019 11:47 am
Forum: Off topic discussion
Topic: how heavy is raspbian ?
Replies: 30
Views: 771

Re: how heavy is raspbian ?

https://www.raspberrypi.org/downloads/raspbian/ Raspbian comes pre-installed with plenty of software for education, programming and general use. It has Python, Scratch, Sonic Pi, Java and more. :roll: Apparently a-kindle-loaded-with-e-books-is-heavier-than-an-empty-one ... so how heavy is raspbian ...
by gordon77
Sat Jun 15, 2019 4:18 pm
Forum: Python
Topic: What are the important numpy functions in Python ?
Replies: 1
Views: 85

Re: What are the important numpy functions in Python ?

For me the important ones depend on what I'm trying to achieve.

Any thoughts what you want to do?
by gordon77
Sat Jun 15, 2019 7:38 am
Forum: General discussion
Topic: Trail camera
Replies: 3
Views: 120

Re: Trail camera

by gordon77
Thu Jun 13, 2019 7:28 pm
Forum: Off topic discussion
Topic: 3B+ has some competition
Replies: 5
Views: 386

Re: 3B+ has some competition

No pi camera or pi display sockets.
by gordon77
Thu Jun 13, 2019 7:43 am
Forum: Python
Topic: How to change any value in python with an input
Replies: 15
Views: 356

Re: How to change any value in python with an input

Thank you Scotty101 and rpimike, just one last question... what does this line do? Drums = ['Drum1','Drum2','DrumSp','BassDrum','Cymbal1','Cymbal2','Cymbal3','Cymbal4'] How can we define so many sounds to a single object? This is a ' list' where we can define various elements which we can later ref...
by gordon77
Wed Jun 12, 2019 7:48 pm
Forum: Troubleshooting
Topic: About accessing python 2.7.13 icon
Replies: 3
Views: 71

Re: About accessing python 2.7.13 icon

It will work without sudo. I use it as l use gpios but you probably don't need it now.
by gordon77
Wed Jun 12, 2019 7:00 pm
Forum: Troubleshooting
Topic: About accessing python 2.7.13 icon
Replies: 3
Views: 71

Re: About accessing python 2.7.13 icon

Just open terminal and type sudo idle
by gordon77
Tue Jun 11, 2019 1:48 pm
Forum: Python
Topic: How to change any value in python with an input
Replies: 15
Views: 356

Re: How to change any value in python with an input

import time # import time function import RPi.GPIO as GPIO # import gpio function GPIO.setmode(GPIO.BOARD) # set gpio to use BOARD numbers GPIO.setup(29,GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # setup pin 29 import pygame # import pygame pygame.mixer.init(44100,-16,8,2048) ch1 = pygame.mixer.Channel(0...
by gordon77
Tue Jun 11, 2019 1:13 pm
Forum: Python
Topic: How to change any value in python with an input
Replies: 15
Views: 356

Re: How to change any value in python with an input

Try this... May not be exactly what you want but should give you some ideas. import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(29,GPIO.IN, pull_up_down=GPIO.PUD_DOWN) import pygame pygame.mixer.init(44100,-16,8,2048) ch1 = pygame.mixer.Channel(0) Drums = ['Drum1','Drum2','DrumS...
by gordon77
Tue Jun 11, 2019 8:26 am
Forum: Python
Topic: Pygame playing sounds without input...
Replies: 5
Views: 147

Re: Pygame playing sounds without input...

I am not sure how your script didn't show any errors.. Try this... import time import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(29,GPIO.IN) GPIO.setup(31,GPIO.IN) GPIO.setup(32,GPIO.IN) GPIO.setup(33,GPIO.IN) GPIO.setup(35,GPIO.IN) GPIO.setup(36,GPIO.IN) GPIO.setup(37,GPIO.IN) G...
by gordon77
Mon Jun 10, 2019 8:35 pm
Forum: Beginners
Topic: Lights are on, but nobody's home??
Replies: 6
Views: 247

Re: Lights are on, but nobody's home??

The red led will be on as long as the 5v supply is connected, even if shutdown.

The green led will flash 10 times during shutdown and then off.
by gordon77
Mon Jun 10, 2019 6:57 pm
Forum: Camera board
Topic: Changing the sensor to a better quality one
Replies: 2
Views: 170

Re: Changing the sensor to a better quality one

I assume you are changing the lens not the sensor.. Look for a M12 mount to suit the Pi. Eg. https://www.m12lenses.com/CNC-Machined-Raspberry-Pi-M12-Lens-Holder-Metal-p/pt-lh020rpm.htm Note this model only fits v1 camera, you'll need to find one for v2 I assume. You may also find 3rd party cameras t...
by gordon77
Mon Jun 10, 2019 6:49 pm
Forum: Python
Topic: Pygame playing sounds without input...
Replies: 5
Views: 147

Re: Pygame playing sounds without input...

Burngate is correct, l just put it down as some formatting error on here as the indentation is all over the place and you said you had no errors... Try.. try: while True: while True: if GPIO.input(29) ==1: ch1.play(pygame.mixer.Sound(Drum1)) time.sleep(0.02) break if GPIO.input(31) ==1: ch2.play(pyg...
by gordon77
Mon Jun 10, 2019 5:46 pm
Forum: Python
Topic: Pygame playing sounds without input...
Replies: 5
Views: 147

Re: Pygame playing sounds without input...

Try using pull up / down eg..

GPIO.setup(29,GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
by gordon77
Sat Jun 08, 2019 7:53 pm
Forum: Python
Topic: Picamera take several photos issue
Replies: 2
Views: 113

Re: Picamera take several photos issue

It was taking the photos but all had the same name as you only specified it once.. try this... from picamera import PiCamera import time import datetime as dt import sys camera = PiCamera() camera.resolution=(720, 300) def take_photo(): print("Taking a photo...") i = dt.datetime.now() now = i.strfti...
by gordon77
Wed Jun 05, 2019 8:19 am
Forum: Camera board
Topic: Select a custom area with the mouse - possible?
Replies: 5
Views: 132

Re: Select a custom area with the mouse - possible?

Augusto9 wrote:
Tue Jun 04, 2019 6:31 pm
Hi. I'm try to use the pi camera, I'm need to select a "work area" , is it possible?
Thanks in advance!
Can you be more specific what you are trying to do?. Are you trying to crop an image or maybe analyse a specific area?
by gordon77
Tue Jun 04, 2019 9:43 am
Forum: Troubleshooting
Topic: USB Webcam flicker, NTSC camera in PAL region
Replies: 4
Views: 104

Re: USB Webcam flicker, NTSC camera in PAL region

What software are you using?
by gordon77
Sat Jun 01, 2019 8:01 pm
Forum: Python
Topic: controlling number of times loop is executed?
Replies: 12
Views: 604

Re: controlling number of times loop is executed?

Or maybe...

Code: Select all

print ("start")
for t in range(0,1000,0.001):
     # do stuff 
print ("complete")
by gordon77
Thu May 30, 2019 6:12 pm
Forum: Troubleshooting
Topic: Need some help with a pi and these USB cameras
Replies: 3
Views: 117

Re: Need some help with a pi and these USB cameras

If you do v4l2-ctl -L before and after your fswebcam command can you see the change in brightness setting?
by gordon77
Tue May 28, 2019 3:30 pm
Forum: Troubleshooting
Topic: Need some help with a pi and these USB cameras
Replies: 3
Views: 117

Re: Need some help with a pi and these USB cameras

Try using v4l2-ctl -L to list available commands.
by gordon77
Mon May 27, 2019 6:42 pm
Forum: Off topic discussion
Topic: Arduino connection to the PI (with 12C)
Replies: 18
Views: 1728

Re: Arduino connection to the PI (with 12C)

alphanumeric wrote:
Mon May 27, 2019 12:22 pm
What Arduino do you have? I ask because some use 5V logic and some use 3V logic. You may not even need the level shifter?
The OP said...
i Also measured the voltages on both sides and on the Pi it reads 3.3V and on the Arduino it's 4.8V.

Go to advanced search