Go to advanced search

by pcmanbob
Thu Jul 18, 2019 4:08 pm
Forum: Troubleshooting
Topic: SD card trouble
Replies: 1
Views: 21

Re: SD card trouble

Hi. I sounds like pulling the power to the pi has corrupted you SD card, it may have gone read only , not being a mac owner/user I can't say how the mac would report this. I have had success reformatting a corrupt SD card using a digital camera , as they tend not to check the SD card before formatti...
by pcmanbob
Thu Jul 18, 2019 3:56 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

So I could go on editing this program forever but seeing as it really needs to be run on the actual hardware that's going to be used for the display, to allow it to be fine tuned to that motor / propeller I am going to stop. So this is the code I came up with , it may not be the right way to do it o...
by pcmanbob
Thu Jul 18, 2019 12:30 pm
Forum: Python
Topic: My program stuck after sometime
Replies: 10
Views: 160

Re: My program stuck after sometime

Not happy about wasting time commenting on outdated code. The answer remains the same. There is no assignment to start in the else branch of your if statement. So start might be undefined when its value is tested later. If it is important, give it a default value at the outset. Start is defined rig...
by pcmanbob
Thu Jul 18, 2019 12:24 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

Seeing as they are only 3v then some thing like this will do as a power supply. examples only. https://www.amazon.com/s?k=3v+dc+psu&ref=nb_sb_noss for 1 motor 500ma would be fine, as the motors don't have a current rating but they are very small, you could even measure the current draw from a couple...
by pcmanbob
Thu Jul 18, 2019 9:45 am
Forum: Troubleshooting
Topic: GPIO pins won't stop output
Replies: 1
Views: 28

Re: GPIO pins won't stop output

Hi. Without seeing the code you are use and some good quality pictures of how you have the pi connected to the motors / controllers it impossible for anyone to offer any sensible advice. upload the pictures to some ware like imgur.com and just post links here. when posting the code please use code t...
by pcmanbob
Thu Jul 18, 2019 9:39 am
Forum: Beginners
Topic: Best manners with the breadboarding ??
Replies: 6
Views: 111

Re: Best manners with the breadboarding ??

thank you a lot for the answers !! :D id like to know too, why is it normal to run a script when no pin is occupied i mean is there no risk when an output pin is emitting 5v to the void/air , and should i make pull up/down resistor for each input pin ? First off the gpio is 3.3v not 5v. if there is...
by pcmanbob
Thu Jul 18, 2019 9:32 am
Forum: General discussion
Topic: Curl - Illegal instruction
Replies: 8
Views: 177

Re: Curl - Illegal instruction

You can still download stretch images from here

https://downloads.raspberrypi.org/raspbian/images/

https://downloads.raspberrypi.org/raspbian_lite/images/

the final stretch image being dated 2019-04-09
by pcmanbob
Thu Jul 18, 2019 8:30 am
Forum: Beginners
Topic: Is it possible to stream video with Raspberry Pi 1 (512mb)
Replies: 1
Views: 44

Re: Is it possible to stream video with Raspberry Pi 1 (512mb)

Simple answer is yes , I do just that on my pi rover using a pi B and a usb camera ( built before pi camera was available ) it also controls 2 motors and 2 servos and monitors a number of sensors while serving a web page. I would recommend you use the pi camera module now and there is a tutorial on ...
by pcmanbob
Thu Jul 18, 2019 8:13 am
Forum: General discussion
Topic: Button presser with motor
Replies: 15
Views: 277

Re: Button presser with motor

Try this

Code: Select all

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
p = GPIO.PWM(17, 50)

angle = 55
duty = float(angle) / 18 + 2
print (duty)
p.start(duty)
    
time.sleep(5)

GPIO.cleanup()
by pcmanbob
Thu Jul 18, 2019 8:06 am
Forum: General discussion
Topic: Curl - Illegal instruction
Replies: 8
Views: 177

Re: Curl - Illegal instruction

Well curl seems to work ok on buster lite for me,

just typing curl gets the response " curl: try 'curl --help' or 'curl --manual' for more information"

and doing this curl -s ipinfo.io/ip returns my WAN IP address.

So have you changed any user settings or may be created a new user ?
by pcmanbob
Thu Jul 18, 2019 6:03 am
Forum: General discussion
Topic: gpio/switch + python
Replies: 2
Views: 59

Re: gpio/switch + python

While you code does work and produces the 17 on the first button press as it should , with subsequent button presses producing no 17 as per the program. you would normally use a 1 or True in place of the GPIO.HIGH in your if statement, and there is no need to use a continue at the end of the while T...
by pcmanbob
Thu Jul 18, 2019 5:39 am
Forum: Beginners
Topic: MG92B servo trouble
Replies: 1
Views: 31

Re: MG92B servo trouble

Hi. So first your posted code does not match you pictured code so I hope its just a typo, you should also give your servo time to move 1 second is not very long try increasing it. Import RPi.GPIO as GPIO Import time GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(12, GPIO.OUT) p = GPIO.P...
by pcmanbob
Thu Jul 18, 2019 5:19 am
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

It might help if you told us what voltage you need for your motor, but assuming 5v and your motor being so small , if that's all its going to power then any 5V 1A power supply would do, depending how often its likely to run you could even use batteries, they might be a quick option for testing. I ha...
by pcmanbob
Wed Jul 17, 2019 10:08 pm
Forum: Beginners
Topic: Best manners with the breadboarding ??
Replies: 6
Views: 111

Re: Best manners with the breadboarding ??

I would not advise making connections to the pi gpio while it's powered, nor would I make changes to components on a breadboard while powered.

There is no problem running a script if your pi is not connected to the breadboard , but you may find your code does not work correctly.
by pcmanbob
Wed Jul 17, 2019 8:36 pm
Forum: Raspbian
Topic: How to move a system from 3B + to 4B without losing data?
Replies: 1
Views: 65

Re: How to move a system from 3B + to 4B without losing data?

1. pi3 will probably be running stretch pi4 will only boot with buster , so not you can't use 1 SD card for both. 2. Safest option load second SD card with buster and boot pi4 install all required software , copy any programs you have written and any data you want to keep from pi3 to pi4 over networ...
by pcmanbob
Wed Jul 17, 2019 6:43 pm
Forum: General discussion
Topic: Pi4b cooling fan wirerd to TP No??
Replies: 12
Views: 330

Re: Pi4b cooling fan wirerd to TP No??

I would recommend you do not to connect your fan to the 3.3v on your pi , I very much doubt it's rated to provide power for a fan.
by pcmanbob
Wed Jul 17, 2019 4:25 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

So kept playing with this and this is how far I have got with the information supplied so far. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(21, GPIO.IN, GPIO.PUD_UP) GPIO.setup(25, GPIO.OUT) GPIO.setup(20, GPIO.OUT) delay = 240 # number of seconds to ...
by pcmanbob
Wed Jul 17, 2019 1:49 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

Hippy I never considered threading as its not some thing I have experience of , but I think from my example code so far its possible to do in a simple while loop , its just that the goal posts keep changing. I wish when people post a question they would just layout what they are wanting to do, espec...
by pcmanbob
Wed Jul 17, 2019 1:26 pm
Forum: Beginners
Topic: i have a tight buget. is the pi 3 worth buying or should i just buy the 4
Replies: 17
Views: 384

Re: i have a tight buget. is the pi 3 worth buying or should i just buy the 4

You just can't tell these days if it spam , leg pulling or just what seems to be the norm now days, a posted question with little or no information.

I wish those lessons in mind reading had gone better :lol: :lol: :lol:
I so miss my crystal ball :cry: :cry:
by pcmanbob
Wed Jul 17, 2019 1:23 pm
Forum: Python
Topic: My program stuck after sometime
Replies: 10
Views: 160

Re: My program stuck after sometime

I did not say it was the answer but the line you had just did not seem right, if your old line works better for you then use it. As we cant test your code as we don't have your hardware you are going to have to debug the code yourself if no one else can see any errors. try adding lots of print state...
by pcmanbob
Wed Jul 17, 2019 1:10 pm
Forum: Troubleshooting
Topic: wifi connection drops, then 'unreachable'
Replies: 21
Views: 359

Re: wifi connection drops, then 'unreachable'

(i'm afraid to say...) Here is what works: 1. Buy an Edimax 7811un wifi USB dongle ($10 at Amazon) 2. Make sure you have a clean OS on the SD card (without attempted fixes to the onboard wifi) 3. Put the onboard driver brcmfmac on the blacklist in /etc/modprobe.d to ensure that it does not load, gr...
by pcmanbob
Wed Jul 17, 2019 12:51 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

So I have added the strobe start / stop . import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(21, GPIO.IN, GPIO.PUD_UP) GPIO.setup(25, GPIO.OUT) GPIO.setup(20, GPIO.OUT) delay = 60 # number of seconds to run # this is set up for pwm for motor and strobe moto...
by pcmanbob
Wed Jul 17, 2019 12:26 pm
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

It would be 60 seconds after starting. The time frame of the engine start sequence is: the prop is turning at 33rpm for about 10 seconds so only 5.5 rotations. At engine start the prop is turning around 800 to 1000 rpm and then slowly increases to 1400 rpm once the engine is warmed up. Max rpm is 2...
by pcmanbob
Wed Jul 17, 2019 12:18 pm
Forum: Python
Topic: My program stuck after sometime
Replies: 10
Views: 160

Re: My program stuck after sometime

Looking at your code this line is not correct if rbuff[0]-2 <= temp <= rbuff[0]+2: I assume you want both to be true to execute the if. Then I think it should look more like this if ( rbuff[0]-2 <= temp and temp <= rbuff[0]+2 ): but the less than or more than might be the wrong way round , may be if...
by pcmanbob
Wed Jul 17, 2019 11:50 am
Forum: Beginners
Topic: Timed loop?
Replies: 22
Views: 344

Re: Timed loop?

Thank you so much for your help with this. But what is the PSU you mention? Also what if i wanted to start the strobe lets say, 60 seconds after the motor has started and then shut off say 30 seconds before the motor stops is that possible? My goal is to simulate that the pilot is turning the light...

Go to advanced search