file rele

This commit is contained in:
jops 2015-11-13 01:25:13 +01:00
parent 78e75dff7f
commit 06dbb2408c
2 changed files with 17 additions and 0 deletions

BIN
Presa_relay_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

17
bluetoothRele.py Normal file
View file

@ -0,0 +1,17 @@
#!/usr/bin/python
import bluetooth
import sys
bd_addr = "30:14:06:26:04:18" #itade address
port = 1
sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
sock.connect((bd_addr, port))
print 'Connected'
sock.settimeout(1.0)
print sys.argv[1]
sock.send(sys.argv[1])
print 'Sent data'
data = sock.recv(1)
print 'received [%s]' % data
sock.close()
print 'socket chius'