This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4.QtGui import * | |
from PyQt4.QtCore import QT_VERSION_STR | |
from PyQt4.Qt import PYQT_VERSION_STR | |
from sip import SIP_VERSION_STR | |
a = QApplication(sys.argv) | |
w = QWidget() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4 import QtGui | |
def window(): | |
app = QtGui.QApplication(sys.argv) | |
w = QtGui.QWidget() | |
b = QtGui.QLabel(w) | |
b.setText("Hello World!") | |
w.setGeometry(100,100,200,50) | |
b.move(50,20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import os | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
# Read SPI data from MCP3008 | |
def readadc(adcnum, clockpin, mosipin, misopin, cspin): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import os | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
# Read SPI data from MCP3008 | |
def readadc(adcnum, clockpin, mosipin, misopin, cspin): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
PIN_LED = 12 | |
GPIO.setup(PIN_LED, GPIO.OUT) | |
p = GPIO.PWM(PIN_LED, 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(12, GPIO.OUT) | |
try: | |
while True: | |
GPIO.output(12, True) | |
time.sleep(0.5) |
OlderNewer