Go to advanced search

by gordon77
Sun Oct 13, 2019 9:51 am
Forum: Troubleshooting
Topic: Non-working Creative Labs Sound Blaster X-Fi on RPI4
Replies: 2
Views: 181

Re: Non-working Creative Labs Sound Blaster X-Fi on RPI4

The Pi4 has 2 x USB3 and 2 x USB2 ports

https://www.raspberrypi.org/products/ra ... 4-model-b/

but I assume you've tried them all.
by gordon77
Sat Oct 12, 2019 2:22 pm
Forum: Beginners
Topic: 100 msec timer interrupt, input switch interrupt , display 2 numbers on a hdmi screen
Replies: 31
Views: 1030

Re: 100 msec timer interrupt, input switch interrupt , display 2 numbers on a hdmi screen

try this... #!/usr/bin/env python3 from tkinter import * import tkinter as tk from tkinter import font import time import RPi.GPIO as GPIO from random import * import os GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) sw0 = 17 # pin 11, switch to +3.3v sw1a = 27 # pin 13, switch to +3.3v sw1b = 22 # ...
by gordon77
Fri Oct 11, 2019 4:49 pm
Forum: Raspbian
Topic: GPIO Readall Code
Replies: 11
Views: 287

Re: GPIO Readall Code

rpdom wrote:
Fri Oct 11, 2019 4:33 pm
That's because you missed out the last two lines of code.
Doh! :roll: copy and paste error.
by gordon77
Fri Oct 11, 2019 3:57 pm
Forum: Raspbian
Topic: GPIO Readall Code
Replies: 11
Views: 287

Re: GPIO Readall Code

Removed :roll:
by gordon77
Fri Oct 11, 2019 3:29 pm
Forum: General discussion
Topic: Help me please,my due date is next week.....
Replies: 19
Views: 714

Re: Help me please,my due date is next week.....

W. H. Heydt wrote:
Fri Oct 11, 2019 3:25 pm
Note that there has been no response (or any other post) from the OP.
I'd also noticed that, happens quite regularly on here. I wonder if they can't find their post again.
by gordon77
Fri Oct 11, 2019 2:14 pm
Forum: Raspbian
Topic: GPIO Readall Code
Replies: 11
Views: 287

Re: GPIO Readall Code

The OP did say...

"NOTE only supports Pi models with 40 pin expansion header."
by gordon77
Fri Oct 11, 2019 2:03 pm
Forum: Off topic discussion
Topic: I wanna unsolder display conector RASPBERRY PI 4
Replies: 11
Views: 572

Re: I wanna unsolder display conector RASPBERRY PI 4

bjtheone wrote:
Fri Oct 11, 2019 1:57 pm
So the question becomes why green, red would make more sense and inline with the branding...
http://www.seeedstudio.com/blog/2017/07 ... in-colour/

There were/are some red Pis about, made in China.

https://www.raspberrypi.org/blog/red-pi-at-night/
by gordon77
Fri Oct 11, 2019 7:48 am
Forum: Beginners
Topic: 100 msec timer interrupt, input switch interrupt , display 2 numbers on a hdmi screen
Replies: 31
Views: 1030

Re: 100 msec timer interrupt, input switch interrupt , display 2 numbers on a hdmi screen

try this... I don't know what size your monitor is for 1" or 4" characters #!/usr/bin/env python3 from tkinter import * import tkinter as tk from tkinter import font import time import RPi.GPIO as GPIO from random import * import os GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) sw0 = 17 # pin 11, s...
by gordon77
Thu Oct 10, 2019 8:46 pm
Forum: General discussion
Topic: Help me please,my due date is next week.....
Replies: 19
Views: 714

Re: Help me please,my due date is next week.....

Maybe, but l simply used the OPs code and timing. They can change it as required from advice such as yours.

Maybe?

Code: Select all

print ("DRY SOIL")
motor_on(m_channel) 
time.sleep(10)
motor_off(m_channel)
time.sleep(30) 
I expect times will depend on pump size, flow rate etc.
by gordon77
Thu Oct 10, 2019 4:25 pm
Forum: General discussion
Topic: Help me please,my due date is next week.....
Replies: 19
Views: 714

Re: Help me please,my due date is next week.....

Based on your original code... import RPi.GPIO as GPIO import time m_channel = 21 d_channel = 14 # GPIO setup GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(m_channel, GPIO.OUT) GPIO.setup(d_channel,GPIO.IN) def callback(channel): while GPIO.input(channel): print ("DRY SOIL") motor_on(m_c...
by gordon77
Thu Oct 10, 2019 7:45 am
Forum: Python
Topic: Writing to a text file in a specific line.
Replies: 10
Views: 282

Re: Writing to a text file in a specific line.

Yes, it did. I did about the same. Here is part of my code: file_1 = open("/home/pi/Desktop/pi_cam/settings.txt", "r") lines = file_1.readlines() lines[2] = str(a) + '\n' file_1.close() file_2 = open("/home/pi/Desktop/pi_cam/settings.txt", "w") file_2.writelines(lines) file_2.close() Good you got i...
by gordon77
Wed Oct 09, 2019 5:24 pm
Forum: Python
Topic: Writing to a text file in a specific line.
Replies: 10
Views: 282

Re: Writing to a text file in a specific line.

try this... #!/usr/bin/env python3 # open existing file Lines = [] with open("test.txt","r") as f: line = f.readline() while line: Lines.append(line.strip()) line = f.readline() # change the 3rd line var = 1.234 Lines[2] = str(var) # write the file again with open('test.txt', 'w') as f: for item in ...
by gordon77
Mon Oct 07, 2019 6:30 pm
Forum: General discussion
Topic: How to edit a .py program that was installed with pip?
Replies: 3
Views: 107

Re: How to edit a .py program that was installed with pip?

What if you start IDLE with sudo idle.
by gordon77
Mon Oct 07, 2019 5:50 pm
Forum: AIY Projects
Topic: Spotify playlist in a Python Script?
Replies: 3
Views: 1223

Re: Spotify playlist in a Python Script?

What is "the raspberry pi speaker"?
by gordon77
Mon Oct 07, 2019 5:48 pm
Forum: Camera board
Topic: V1 Camera - blurry / out of focus on one side
Replies: 10
Views: 262

Re: V1 Camera - blurry / out of focus on one side

Maybe the lens isn't aligned or faulty.
by gordon77
Mon Oct 07, 2019 5:19 pm
Forum: Camera board
Topic: V1 Camera - blurry / out of focus on one side
Replies: 10
Views: 262

Re: V1 Camera - blurry / out of focus on one side

Is the camera chip mounted flat on the pcb? May have come dislodged?
by gordon77
Thu Oct 03, 2019 7:05 pm
Forum: Advanced users
Topic: 3.5" display that have extra GPIO pins for use
Replies: 5
Views: 149

Re: 3.5" display that have extra GPIO pins for use

This one? https://thepihut.com/products/adafruit-pitft-plus-480x320-3-5-tft-touchscreen?variant=13930062980¤cy=GBP&gclid=Cj0KCQjwuNbsBRC-ARIsAAzITucqgREJoHTrdCblHYMxTFgG8UQ65oTWMISJygKamFE3hpDv8sJadlYaAuqwEALw_wcB The display uses the hardware SPI pins (SCK, MOSI, MISO, CE0, CE1) as well as GP...
by gordon77
Wed Oct 02, 2019 3:33 pm
Forum: Python
Topic: MP3 player
Replies: 13
Views: 600

Re: MP3 player

Hopefully most of the bugs are out of this now...
by gordon77
Tue Oct 01, 2019 9:05 pm
Forum: General discussion
Topic: How to Calculate Resistance of a Pi
Replies: 19
Views: 465

Re: How to Calculate Resistance of a Pi

I just sent Adafruit a message requesting that they update the PowerBoost to support today's popular models (3 B+ and 4 B). I also told them the photo on the product page was misleading, at best. It will be interesting to see if/how they respond. Worth a read... https://forums.adafruit.com/viewtopi...
by gordon77
Tue Oct 01, 2019 7:57 pm
Forum: General discussion
Topic: How to Calculate Resistance of a Pi
Replies: 19
Views: 465

Re: How to Calculate Resistance of a Pi

So does that mean that (forgive me, I'm a programmer, not an EE) an input voltage of 6-7V (not that I would do that) would absorb these spikes and keep the current draw to something less than 1A? As others have said, no. You can't exceed 5.25v, or you will destroy your Pi!. You need a psu with more...
by gordon77
Tue Oct 01, 2019 7:30 pm
Forum: General discussion
Topic: How to Calculate Resistance of a Pi
Replies: 19
Views: 465

Re: How to Calculate Resistance of a Pi

The pi will take higher current during booting. You probably aren't measuring these peaks in current. I would suggest your psu and/or usb cable aren't sufficient.
by gordon77
Tue Oct 01, 2019 6:22 pm
Forum: Troubleshooting
Topic: [SOLVED] Pi4 GUI Freeze when ussing python program
Replies: 5
Views: 228

Re: Pi4 GUI Freeze when ussing python program

Is it a wireless mouse? If so if you unplug and replug the usb dongle does it recover?
by gordon77
Sun Sep 29, 2019 11:24 am
Forum: Troubleshooting
Topic: Does Pi 4 support stereo sound?
Replies: 8
Views: 392

Re: Does Pi 4 support stereo sound?

Hello, Good news for me if it is possible. It was maybe a side effect of another test. Anyway, Audacity is most often used to record and modify than simply play. And I use HDMI. Please tell me if you have been able to record something played by the internet browser for example, and export this to a...
by gordon77
Sun Sep 29, 2019 9:11 am
Forum: Troubleshooting
Topic: Does Pi 4 support stereo sound?
Replies: 8
Views: 392

Re: Does Pi 4 support stereo sound?

" As soon as you install software which are using or controlling audio, you can have problems and definitively fall in mono. This is the case if the software is designed to use pulseaudio, like QMMP or Audacity. " I've used Audacity to play music, via the 3.5mm socket on the Pi, and it certainly is ...

Go to advanced search