Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

push button raspberry pi

# One prong to GND the other to a GPIO pin

from gpiozero import Button

button = Button(GPIO pin)

button.wait_for_press()
print("button was pressed")
Comment

PREVIOUS NEXT
Code Example
Python :: lambda expression python 
Python :: negative slicing in python list 
Python :: add values from 2 columns to one pandas 
Python :: atoi in python code 
Python :: how to add pagination in discord.py 
Python :: python escape forward slash 
Python :: make Python class serializable 
Python :: Label enconding code with sklearn 
Python :: how to make loops in python 
Python :: numpy rolling 
Python :: Create A Template In Django 
Python :: How to find the maximum subarray sum in python? 
Python :: Removing Elements from Python Dictionary Using popitem() method 
Python :: is login a class in python 
Python :: convert a list to tuple 
Python :: python docstring 
Python :: longest palindromic substring using dp 
Python :: streamlit cheatsheet 
Python :: turn a query set into a list django 
Python :: matplotlib.plot python 
Python :: how to find the last element of list in python 
Python :: create dictionary without removing duplicates from dataframe 
Python :: how to convert time from one timezone to another in python 
Python :: create new spreadsheet 
Python :: data encapsulation in python 
Python :: função map python 
Python :: tuple vs set python 
Python :: Python program to find second largest 
Python :: python string and integer concatenation 
Python :: python while loop 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =