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/python | |
# Control MPU-6050 Gyroscoop + Accelerometer from Raspberry Pi | |
# https://raspberrytips.nl/mpu-6050-gyroscoop-raspberry-pi/ | |
import smbus | |
import math | |
# Power management registers | |
power_mgmt_1 = 0x6b |
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 | |
# Control Lasermodule from Raspberry Pi | |
# https://raspberrytips.nl/laser-module-aansturen-via-gpio/ | |
import RPi.GPIO as GPIO | |
import time | |
LaserGPIO = 17 # --> PIN11/GPIO17 |
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
# | |
# Manufacturer: Motorola, Arcadyan, Arris | |
# Model: KPN Mediabox | |
# | |
# Keywords: lirc configuration, IR codes | |
# Remark: Should work the following devices: (often used by KPN and TELFORT) | |
# | |
# Arcadyan HMB2260 | |
# Motorola VIP 1853 | |
# Motorola VIP 1963 |
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
# https://raspberrytips.nl/ws2801-ledstrip/ | |
# Simple demo script for a WS2801/SPI-like addressable RGB LED lightstrip. | |
import time | |
import RPi.GPIO as GPIO | |
import Adafruit_WS2801 | |
import Adafruit_GPIO.SPI as SPI | |
# Configure the count of pixels: | |
PIXEL_COUNT = 32 |
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 | |
# DS18B20 waterdichte temperatuur sensor aansluiten op Raspberry Pi | |
# https://raspberrytips.nl/ds18b20-raspberry-pi/ | |
import os | |
import glob | |
import time | |
os.system('modprobe w1-gpio') |
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/python | |
# https://raspberrytips.nl/lcd-scherm-20x4-i2c-raspberry-pi/ | |
import sys | |
import smbus | |
import time | |
import datetime | |
import subprocess | |
I2C_ADDR = 0x3F # I2C device address |
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/python | |
import smbus | |
import time | |
import datetime | |
I2C_ADDR = 0x27 # I2C device address | |
LCD_WIDTH = 16 # Maximum characters per line | |
# Define some device constants |
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/python | |
import spidev | |
import time | |
import os | |
spi = spidev.SpiDev() | |
spi.open(0,0) | |
spi.max_speed_hz=1000000 |
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/python | |
# BMP180 luchtdruk + temperatuur sensor | |
# https://www.raspberrytips.nl | |
import smbus | |
import time | |
from ctypes import c_short | |
DEVICE = 0x77 | |
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/python | |
# https://raspberrytips.nl/raspberry-pi-goodwe-zonnepaneel-omvormer/ | |
# 25/08/2018 - Richard IJzermans | |
import sys | |
import smbus | |
import time | |
import datetime | |
import json |
NewerOlder