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 HC-SR04 ultrasone sensor from Raspberry Pi | |
# https://raspberrytips.nl/hc-sr04-ultrasone-sensor/ | |
import RPi.GPIO as GPIO #Import GPIO library | |
import time #Import time library | |
GPIO.setmode(GPIO.BCM) #Set GPIO pin numbering | |
TRIG = 23 #Associate pin 23 to TRIG |
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 python3 | |
# requires `mplayer` to be installed | |
# v1.0 | |
# https://raspberrytips.nl/internet-radio-luisteren-raspberry-pi/ | |
from time import sleep | |
import os | |
import sys | |
import signal |
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 | |
# Just change: | |
# import RPi.GPIO as GPIO | |
# Into: | |
from RTk import GPIO | |
import time |
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
# Demoscript NeoPixel Ring (12 led) | |
# https://raspberrytips.nl | |
import time | |
from neopixel import * | |
from random import randint | |
LEDS = 12 # Aantel LEDS | |
PIN = 18 # GPIO 18 / PIN 12 |
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 Adafruit_GPIO.SPI as SPI | |
import Adafruit_SSD1306 | |
from PIL import Image | |
from PIL import ImageDraw | |
from PIL import ImageFont | |
disp = Adafruit_SSD1306.SSD1306_128_32(rst=24) | |
disp.begin() |
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 time | |
import sys | |
import subprocess | |
import Adafruit_GPIO.SPI as SPI | |
import Adafruit_SSD1306 | |
from PIL import Image | |
from PIL import ImageDraw | |
from PIL import ImageFont |
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 | |
# TCRT5000 tracking sensor | |
# https://raspberrytips.nl/tcrt5000 | |
import RPi.GPIO as GPIO | |
TrackingPin = 11 | |
def setup(): |
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 | |
# Tripwire met laser module en lichtsensor | |
# https://raspberrytips.nl/tripwire-laser | |
from datetime import datetime | |
import RPi.GPIO as GPIO | |
import os, time | |
SensorGPIO = 23 |
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 fourletterphat | |
from subprocess import Popen, PIPE | |
print(""" | |
Four Letter pHAT: cpu-temp.py | |
This example will display your Pi's CPU |
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
// Homekit motions sensor voor HomeBridge | |
// raspberrytips.nl | |
#include <ESP8266WiFi.h> | |
const char* ssid = "naamnetwerk"; // SSID Wifi (naam) | |
const char* password = "watchwoord"; // Wachtwoord wifi | |
IPAddress ip(192, 168, 2, 99); // IP address | |
IPAddress dns(192, 168, 2, 254); // IP address DNS server |
OlderNewer