mirror of
				https://github.com/kevinveenbirkenbach/erinaco.git
				synced 2025-11-04 04:08:04 +00:00 
			
		
		
		
	Sensoren und Motorsteurung hinzugefuegt
This commit is contained in:
		
							
								
								
									
										13
									
								
								sensoren/boolsensor.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								sensoren/boolsensor.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
"""
 | 
			
		||||
Klasse fuer Sensoren welche nur zwei Zustaende besitzen koennen
 | 
			
		||||
@author kf
 | 
			
		||||
@since 2017-04-15
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
import RPi.GPIO as GPIO
 | 
			
		||||
class Boolsensor(object):
 | 
			
		||||
	def __init__(self,pin):
 | 
			
		||||
		self.pin=pin;
 | 
			
		||||
		GPIO.setup(self.pin, GPIO.IN)	
 | 
			
		||||
	def getValue(self):
 | 
			
		||||
		return GPIO.input(self.pin)
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
#Streamt ein Video auf Vaio
 | 
			
		||||
/opt/vc/bin/raspivid -t 0 -o - | nc 192.168.178.30 5001
 | 
			
		||||
/opt/vc/bin/raspivid --hflip --vflip -t 0 -o - | nc 192.168.178.30 5001
 | 
			
		||||
#Auf Vaio muss 
 | 
			
		||||
# nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
 | 
			
		||||
# ausgefuehert werden
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user