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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="[YOUR SSID HERE]" | |
proto=RSN | |
key_mgmt=WPA-PSK | |
pairwise=CCMP TKIP | |
group=CCMP TKIP | |
psk="[YOUR WPA KEY HERE]" |
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
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
iface wlan0 inet manual | |
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | |
iface default inet dhcp |
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
#!/bin/sh | |
exec 2>&1 | |
hciconfig hci0 piscan | |
exec /usr/bin/bluetooth-agent 0000 |
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
#!/bin/bash | |
exec multilog t ./main |
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 datetime, time, signal, sys | |
from bluetooth import * | |
import RPi.GPIO as GPIO | |
# Setup GPIO | |
PIN = 19 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(PIN, GPIO.OUT, GPIO.PUD_DOWN, 0) | |
server_sock = BluetoothSocket(RFCOMM) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="YOURPACKAGE.gateopener" > | |
<uses-permission android:name="android.permission.BLUETOOTH" /> | |
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > |
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
package YOURPACKAGE.gateopener; | |
import android.app.PendingIntent; | |
import android.appwidget.AppWidgetManager; | |
import android.appwidget.AppWidgetProvider; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.util.Log; | |
import android.widget.RemoteViews; |
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
package YOURPACKAGE.gateopener; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.util.Log; |
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="@dimen/widget_margin" | |
android:background="#c0c0c0" > | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Open Gate" |
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
[Unit] | |
Description=uWSGI | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
EnvironmentFile=/home/core/environ | |
User=core | |
TimeoutStartSec=300 | |
ExecStartPre=-/usr/bin/docker kill uwsgi |
OlderNewer