Search Results
| Search type | Search syntax |
|---|---|
| Tags | [tag] |
| Exact | "words here" |
| Author | user:1234 user:me (yours) |
| Score | score:3 (3+) score:0 (none) |
| Answers | answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
| Views | views:250 |
| Code | code:"if (foo != bar)" |
| Sections | title:apples body:"apples oranges" |
| URL | url:"*.example.com" |
| Saves | in:saves |
| Status | closed:yes duplicate:no migrated:no wiki:no |
| Types | is:question is:answer |
| Exclude | -[tag] -apples |
| For more details on advanced search visit our help page | |
Results tagged with python
Search options not deleted user 17669
Python is a general-purpose, dynamically typed, object-oriented high-level programming language. Interpreters for versions 3.x and 2.x come installed on the Raspberry Pi's most popular operating system distributions.
2 votes
Connecting multiple light sensors to one port
The short answer: no. A GPIO port is a collection of pins. I assume you mean a single pin. A pin can only take one input or output one value. So you could connect multiple LEDs in series to one pin, …
3 votes
Accepted
can i build a cheap linear actuator
Then connect the control pin of the relay to GPIO (and make sure the grounds are connected together) and use Python (or another language with a GPIO library) to change the state of the relay Let me know …
2 votes
1 answer
3k views
Can't PWM LED on pin 18
EDIT: Here is the code I modified it off, when I run this (sudo python candle_light.py) it flickers as described. #! … /usr/bin/env python # Import the modules used in the script import random, time import RPi.GPIO as GPIO # Assign the hardware PWM pin and name it led = 18 # Configure the GPIO to BCM and set it to output …
2 votes
Accepted
Can't PWM LED on pin 18
I found the answer, simple mistake - I was missing a pwm.start(int) before using the pwm variable. The working code should look like this: GPIO.setmode(GPIO.BCM) GPIO.setup(led, GPIO.OUT) GPIO.outpu …