Go to advanced search

by papous
Mon Jan 08, 2018 9:26 pm
Forum: Python
Topic: Help with code weirdness
Replies: 3
Views: 523

Re: Help with code weirdness

You are right.
The first code will return the median of 10 values from the distance sensor.
I tried to 'convert' it to a function and I only get 1 reading. trying to unindent the RETURN keyword produces the syntax error: invalid syntax
thank you

Raspberry3B
by papous
Mon Jan 08, 2018 8:44 pm
Forum: Python
Topic: Help with code weirdness
Replies: 3
Views: 523

Help with code weirdness

Why does this works (with the distance sensor)? import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) TRIG = 17 ECHO = 18 tdist=[] dist=0 #print ("Distance Measurement In Progress") GPIO.setup(TRIG,GPIO.OUT) GPIO.setup(ECHO,GPIO.IN) GPIO.output(TRIG, False) #print ("Wait...
by papous
Sun Jan 07, 2018 12:23 pm
Forum: Automation, sensing and robotics
Topic: CamJam engine erratic behaviour
Replies: 8
Views: 1344

Re: CamJam engine erratic behaviour

Thank you so much for your replies. I checked my wiring and tis OK, so I'll go for a suitable powerbank
Thanks again
by papous
Sat Jan 06, 2018 7:28 am
Forum: Automation, sensing and robotics
Topic: CamJam engine erratic behaviour
Replies: 8
Views: 1344

Re: CamJam engine erratic behaviour

Thank you pcmanbob for the quick reply.
I did read Mark1953 post and replies. It seems that it was not faulty wiring and he (nearly) solved the problem using a different power supply and this is why I am asking if a power bank might be a solution.
what is your view on that?
by papous
Fri Jan 05, 2018 7:11 pm
Forum: Automation, sensing and robotics
Topic: CamJam engine erratic behaviour
Replies: 8
Views: 1344

CamJam engine erratic behaviour

I am trying to assemble and run a CamJam robot and I have run into similar problems with Mark53 ( https://www.raspberrypi.org/forums/viewtopic.php?t=185814 ). The motors behave erratically, stopping and restarting at (their) will. The Raspberry is 3B and the engine batteries are new rechargeable sho...

Go to advanced search