Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4930

PIN status of raspberry pi help

$
0
0
I want to store the record the GPIO PIN of Raspberry 3 when it become High
python code
Code (Text):
  1. from time import sleep        
  2. import RPi.GPIO as GPIO
  3. import mysql.connector
  4. import datetime
  5. import time      
  6. import string
  7.  
  8. Device1_ID = 1256
  9. GPIO.setmode(GPIO.BCM)        
  10. INPUT_PIN = 21
  11. stamp = datetime.datetime.now()
  12. GPIO.setup(INPUT_PIN, GPIO.IN)        
  13.  
  14. db = mysql.connector.connect(user='vajra', password='vajra123',
  15.                               host='192.168.0.102',...
PIN status of raspberry pi help

Viewing all articles
Browse latest Browse all 4930

Trending Articles