Skip to content

Instantly share code, notes, and snippets.

View afestein's full-sized avatar
🎯
Focusing

Adrian Stein afestein

🎯
Focusing
  • Sunshine Coast, Australia
View GitHub Profile
@afestein
afestein / sqr_1ch_1k_50p.py
Created April 18, 2019 21:59 — forked from boseji/sqr_1ch_1k_50p.py
Python code for Raspberry Pi to generate a square wave of 50% duty cycle on GPIO7 pin 26 of P1 with 1kHz frequency
#!/usr/bin/python
#######
# This program would generate PWM on GPIO 7 Pin 26 of P1
# with 50% Dutycyle at 1kHz
#######
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(7,GPIO.OUT)