├── garage_control_smart_phone
├── android
│ ├── GarageControl_Studio
│ │ ├── settings.gradle
│ │ ├── app
│ │ │ ├── libs
│ │ │ │ └── Tinkerforge.jar
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── res
│ │ │ │ │ ├── drawable-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ ├── dimens.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── values-sw600dp
│ │ │ │ │ │ └── dimens.xml
│ │ │ │ │ ├── menu
│ │ │ │ │ │ └── main.xml
│ │ │ │ │ ├── values-sw720dp-land
│ │ │ │ │ │ └── dimens.xml
│ │ │ │ │ ├── values-v11
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── values-v14
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── layout
│ │ │ │ │ │ └── activity_main.xml
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ └── build.gradle
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── build.gradle
│ │ ├── import-summary.txt
│ │ └── gradlew.bat
│ ├── screenshot1.png
│ ├── screenshot2.png
│ ├── GarageControl-1.0.apk
│ ├── GarageControl-1.1.apk
│ ├── GarageControl-1.2.apk
│ ├── GarageControl-1.3.apk
│ ├── GarageControl
│ │ ├── ic_launcher-web.png
│ │ ├── libs
│ │ │ ├── Tinkerforge.jar
│ │ │ └── android-support-v4.jar
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ │ ├── values-sw600dp
│ │ │ │ └── dimens.xml
│ │ │ ├── menu
│ │ │ │ └── main.xml
│ │ │ ├── values-sw720dp-land
│ │ │ │ └── dimens.xml
│ │ │ ├── values-v11
│ │ │ │ └── styles.xml
│ │ │ ├── values-v14
│ │ │ │ └── styles.xml
│ │ │ └── layout
│ │ │ │ └── activity_main.xml
│ │ ├── .settings
│ │ │ └── org.eclipse.jdt.core.prefs
│ │ ├── .classpath
│ │ ├── project.properties
│ │ ├── proguard-project.txt
│ │ ├── .project
│ │ └── AndroidManifest.xml
│ └── readme.txt
├── ios
│ ├── GarageControl
│ │ ├── en.lproj
│ │ │ └── InfoPlist.strings
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── icon_29x29.png
│ │ ├── icon_57x57.png
│ │ ├── icon_58x58.png
│ │ ├── icon_80x80.png
│ │ ├── icon_114x114.png
│ │ ├── icon_120x120.png
│ │ ├── Default-568h@2x.png
│ │ ├── main.m
│ │ ├── AppDelegate.h
│ │ ├── GarageControl-Prefix.pch
│ │ ├── ViewController.h
│ │ ├── GarageControl-Info.plist
│ │ └── AppDelegate.m
│ ├── screenshot_35_inch.png
│ ├── screenshot_40_inch.png
│ ├── screenshot_47_inch.png
│ ├── screenshot_55_inch.png
│ ├── readme.txt
│ └── GarageControl.xcodeproj
│ │ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── garage.jpg
├── icon_512x512.png
├── icon_1024x1024.png
├── icon_1024x1024_no_alpha.png
└── windows_phone
│ ├── screenshot.png
│ ├── store-tile.png
│ ├── GarageControl-1.0.0.xap
│ ├── GarageControl-1.0.1.xap
│ ├── GarageControl
│ ├── Background.png
│ ├── ApplicationIcon.png
│ ├── SplashScreenImage.jpg
│ ├── Properties
│ │ ├── AppManifest.xml
│ │ ├── WMAppManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── App.xaml
│ ├── GarageControl.csproj.user
│ └── MainPage.xaml
│ ├── readme.txt
│ └── GarageControl.sln
├── power_outlet_control_smart_phone
├── android
│ ├── PowerOutletControl_Studio
│ │ ├── settings.gradle
│ │ ├── app
│ │ │ ├── libs
│ │ │ │ └── Tinkerforge.jar
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── res
│ │ │ │ │ ├── drawable-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── values-sw600dp
│ │ │ │ │ │ └── dimens.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── dimens.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── menu
│ │ │ │ │ │ └── main.xml
│ │ │ │ │ ├── values-sw720dp-land
│ │ │ │ │ │ └── dimens.xml
│ │ │ │ │ ├── values-v11
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-v14
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ └── build.gradle
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── build.gradle
│ │ ├── import-summary.txt
│ │ └── gradlew.bat
│ ├── screenshot1.png
│ ├── screenshot2.png
│ ├── PowerOutletControl-1.0.apk
│ ├── PowerOutletControl-1.1.apk
│ ├── PowerOutletControl-1.2.apk
│ ├── PowerOutletControl-1.3.apk
│ ├── PowerOutletControl
│ │ ├── ic_launcher-web.png
│ │ ├── libs
│ │ │ ├── Tinkerforge.jar
│ │ │ └── android-support-v4.jar
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values-sw600dp
│ │ │ │ └── dimens.xml
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── menu
│ │ │ │ └── main.xml
│ │ │ ├── values-sw720dp-land
│ │ │ │ └── dimens.xml
│ │ │ ├── values-v11
│ │ │ │ └── styles.xml
│ │ │ └── values-v14
│ │ │ │ └── styles.xml
│ │ ├── .classpath
│ │ ├── project.properties
│ │ ├── proguard-project.txt
│ │ ├── .project
│ │ └── AndroidManifest.xml
│ └── readme.txt
├── ios
│ ├── PowerOutletControl
│ │ ├── en.lproj
│ │ │ └── InfoPlist.strings
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── icon_114x114.png
│ │ ├── icon_120x120.png
│ │ ├── icon_29x29.png
│ │ ├── icon_57x57.png
│ │ ├── icon_58x58.png
│ │ ├── icon_80x80.png
│ │ ├── Default-568h@2x.png
│ │ ├── main.m
│ │ ├── AppDelegate.h
│ │ ├── PowerOutletControl-Prefix.pch
│ │ ├── ViewController.h
│ │ ├── PowerOutletControl-Info.plist
│ │ └── AppDelegate.m
│ ├── screenshot_35_inch.png
│ ├── screenshot_40_inch.png
│ ├── screenshot_47_inch.png
│ ├── screenshot_55_inch.png
│ ├── readme.txt
│ └── PowerOutletControl.xcodeproj
│ │ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── icon_512x512.png
├── power_outlet.jpg
├── icon_1024x1024.png
├── icon_1024x1024_no_alpha.png
└── windows_phone
│ ├── screenshot.png
│ ├── store-tile.png
│ ├── PowerOutletControl-1.0.0.xap
│ ├── PowerOutletControl-1.0.1.xap
│ ├── PowerOutletControl
│ ├── Background.png
│ ├── ApplicationIcon.png
│ ├── SplashScreenImage.jpg
│ ├── Properties
│ │ ├── AppManifest.xml
│ │ ├── WMAppManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── PowerOutletControl.csproj.user
│ ├── App.xaml
│ └── MainPage.xaml
│ ├── readme.txt
│ └── PowerOutletControl.sln
├── remote_switch_gui
└── csharp
│ ├── RemoteSwitchGUI.exe
│ ├── readme.txt
│ ├── Makefile
│ └── RemoteSwitchGUI.cs
├── remote_switch_gui_v2
└── csharp
│ ├── RemoteSwitchGUIV2.exe
│ ├── readme.txt
│ └── Makefile
├── remote_switch
├── c
│ ├── readme.txt
│ └── remote_switch.c
├── java
│ ├── readme.txt
│ └── RemoteSwitch.java
├── php
│ ├── readme.txt
│ └── RemoteSwitch.php
├── ruby
│ ├── readme.txt
│ └── remote_switch.rb
├── vbnet
│ ├── readme.txt
│ └── RemoteSwitch.vb
├── csharp
│ ├── readme.txt
│ └── RemoteSwitch.cs
├── delphi
│ ├── readme.txt
│ └── RemoteSwitch.pas
└── python
│ ├── readme.txt
│ └── remote_switch.py
├── remote_switch_v2
├── c
│ ├── readme.txt
│ └── remote_switch_v2.c
├── php
│ ├── readme.txt
│ └── RemoteSwitchV2.php
├── java
│ ├── readme.txt
│ └── RemoteSwitchV2.java
├── ruby
│ ├── readme.txt
│ └── remote_switch_v2.rb
├── csharp
│ ├── readme.txt
│ └── RemoteSwitchV2.cs
├── delphi
│ ├── readme.txt
│ └── RemoteSwitchV2.pas
├── python
│ ├── readme.txt
│ └── remote_switch_v2.py
└── vbnet
│ ├── readme.txt
│ └── RemoteSwitchV2.vb
├── smoke_detector
├── c
│ ├── readme.txt
│ └── smoke_detector.c
├── php
│ ├── readme.txt
│ └── SmokeDetector.php
├── java
│ ├── readme.txt
│ └── SmokeDetector.java
├── ruby
│ ├── readme.txt
│ └── smoke_detector.rb
├── csharp
│ ├── readme.txt
│ └── SmokeDetector.cs
├── delphi
│ ├── readme.txt
│ └── SmokeDetector.pas
├── python
│ ├── readme.txt
│ └── smoke_detector.py
└── vbnet
│ ├── readme.txt
│ └── SmokeDetector.vb
├── smoke_detector_v2
├── c
│ ├── readme.txt
│ └── smoke_detector_v2.c
├── php
│ ├── readme.txt
│ └── SmokeDetectorV2.php
├── java
│ ├── readme.txt
│ └── SmokeDetectorV2.java
├── ruby
│ ├── readme.txt
│ └── smoke_detector_v2.rb
├── vbnet
│ ├── readme.txt
│ └── SmokeDetectorV2.vb
├── csharp
│ ├── readme.txt
│ └── SmokeDetectorV2.cs
├── delphi
│ ├── readme.txt
│ └── SmokeDetectorV2.pas
└── python
│ ├── readme.txt
│ └── smoke_detector_v2.py
├── doorbell_notifier
└── python
│ ├── readme.txt
│ └── doorbell_notifier.py
├── doorbell_notifier_v2
└── python
│ ├── readme.txt
│ └── doorbell_notifier_v2.py
├── README.rst
└── .gitignore
/garage_control_smart_phone/android/GarageControl_Studio/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/garage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/garage.jpg
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/icon_512x512.png
--------------------------------------------------------------------------------
/remote_switch_gui/csharp/RemoteSwitchGUI.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/remote_switch_gui/csharp/RemoteSwitchGUI.exe
--------------------------------------------------------------------------------
/garage_control_smart_phone/icon_1024x1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/icon_1024x1024.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/icon_512x512.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/power_outlet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/power_outlet.jpg
--------------------------------------------------------------------------------
/remote_switch_gui_v2/csharp/RemoteSwitchGUIV2.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/remote_switch_gui_v2/csharp/RemoteSwitchGUIV2.exe
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/screenshot1.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/screenshot2.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/icon_1024x1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/icon_1024x1024.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/icon_1024x1024_no_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/icon_1024x1024_no_alpha.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/screenshot_35_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/screenshot_35_inch.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/screenshot_40_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/screenshot_40_inch.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/screenshot_47_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/screenshot_47_inch.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/screenshot_55_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/screenshot_55_inch.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl-1.0.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl-1.0.apk
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl-1.1.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl-1.1.apk
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl-1.2.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl-1.2.apk
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl-1.3.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl-1.3.apk
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/Default.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/screenshot.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/store-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/store-tile.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/screenshot1.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/screenshot2.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/Default@2x.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_29x29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_29x29.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_57x57.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_58x58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_58x58.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_80x80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_80x80.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/screenshot_35_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/screenshot_35_inch.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/screenshot_40_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/screenshot_40_inch.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/screenshot_47_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/screenshot_47_inch.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/screenshot_55_inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/screenshot_55_inch.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_114x114.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/icon_120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/icon_120x120.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/icon_1024x1024_no_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/icon_1024x1024_no_alpha.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/screenshot.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/store-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/store-tile.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/ios/GarageControl/Default-568h@2x.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl-1.0.0.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/GarageControl-1.0.0.xap
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl-1.0.1.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/GarageControl-1.0.1.xap
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl-1.0.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl-1.0.apk
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl-1.1.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl-1.1.apk
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl-1.2.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl-1.2.apk
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl-1.3.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl-1.3.apk
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/Default.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/ic_launcher-web.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/libs/Tinkerforge.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/libs/Tinkerforge.jar
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/Background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/GarageControl/Background.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/Default@2x.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_114x114.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_120x120.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_29x29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_29x29.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_57x57.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_58x58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_58x58.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_80x80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/icon_80x80.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/GarageControl/ApplicationIcon.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/SplashScreenImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/windows_phone/GarageControl/SplashScreenImage.jpg
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/ios/PowerOutletControl/Default-568h@2x.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl-1.0.0.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/PowerOutletControl-1.0.0.xap
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl-1.0.1.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/PowerOutletControl-1.0.1.xap
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/ic_launcher-web.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/libs/Tinkerforge.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/app/libs/Tinkerforge.jar
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/libs/Tinkerforge.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/libs/Tinkerforge.jar
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Background.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/ApplicationIcon.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/SplashScreenImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/SplashScreenImage.jpg
--------------------------------------------------------------------------------
/remote_switch/c/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_C.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_C.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/c/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_C.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_C.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/c/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_C.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_C.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/remote_switch/java/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Java.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Java.html
5 |
--------------------------------------------------------------------------------
/remote_switch/php/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_PHP.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_PHP.html
5 |
--------------------------------------------------------------------------------
/remote_switch/ruby/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Ruby.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Ruby.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/php/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_PHP.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_PHP.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/php/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_PHP.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_PHP.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/c/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_C.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_C.html
5 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/libs/Tinkerforge.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/libs/Tinkerforge.jar
--------------------------------------------------------------------------------
/remote_switch/vbnet/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_VBNET.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_VBNET.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/java/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Java.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Java.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/ruby/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Ruby.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Ruby.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/java/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Java.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Java.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/ruby/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Ruby.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Ruby.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/php/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_PHP.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_PHP.html
5 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/remote_switch/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
5 |
--------------------------------------------------------------------------------
/remote_switch/delphi/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Delphi.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Delphi.html
5 |
--------------------------------------------------------------------------------
/remote_switch/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Python.html
5 |
--------------------------------------------------------------------------------
/remote_switch_gui/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/delphi/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Delphi.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Delphi.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_Python.html
5 |
--------------------------------------------------------------------------------
/remote_switch_v2/vbnet/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_VBNET.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_VBNET.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_CSharp.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/delphi/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Delphi.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Delphi.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Python.html
5 |
--------------------------------------------------------------------------------
/smoke_detector/vbnet/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_VBNET.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_VBNET.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/java/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Java.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Java.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/ruby/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Ruby.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Ruby.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/vbnet/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_VBNET.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_VBNET.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/GarageControl_iOS.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/GarageControl_iOS.html
5 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/remote_switch_gui_v2/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/RemoteSwitch_CSharp.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/csharp/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_CSharp.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_CSharp.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/delphi/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Delphi.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Delphi.html
5 |
--------------------------------------------------------------------------------
/smoke_detector_v2/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/SmokeDetector_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/SmokeDetector_Python.html
5 |
--------------------------------------------------------------------------------
/doorbell_notifier/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/DoorbellNotifier_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/DoorbellNotifier_Python.html
5 |
--------------------------------------------------------------------------------
/doorbell_notifier_v2/python/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/DoorbellNotifier_Python.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/DoorbellNotifier_Python.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Garage Control
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/GarageControl_Android.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/GarageControl_Android.html
5 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/PowerOutletControl_iOS.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/PowerOutletControl_iOS.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.source=1.6
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/GarageControl_WindowsPhone.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/GarageControl_WindowsPhone.html
5 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/PowerOutletControl_Android.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/PowerOutletControl_Android.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Garage Control
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tinkerforge/hardware-hacking/HEAD/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/readme.txt:
--------------------------------------------------------------------------------
1 | More information here:
2 |
3 | English: http://www.tinkerforge.com/en/doc/Kits/HardwareHacking/PowerOutletControl_WindowsPhone.html
4 | Deutsch: http://www.tinkerforge.com/de/doc/Kits/HardwareHacking/PowerOutletControl_WindowsPhone.html
5 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/remote_switch_gui/csharp/Makefile:
--------------------------------------------------------------------------------
1 |
2 | all: RemoteSwitchGUI.exe
3 |
4 | clean:
5 | rm RemoteSwitchGUI.exe
6 |
7 | RemoteSwitchGUI.exe: RemoteSwitchGUI.cs IPConnection.cs BrickletIndustrialQuadRelay.cs
8 | gmcs /target:winexe /out:RemoteSwitchGUI.exe /pkg:dotnet RemoteSwitchGUI.cs IPConnection.cs BrickletIndustrialQuadRelay.cs
9 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | Hardware Hacking
2 | ================
3 |
4 | This is the repo of the Starter Kit: Hardware Hacking. It contains the
5 | all of the example source code.
6 |
7 | You can find more information in the `Hardware Hacking section `__ on tinkerforge.com.
8 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class ViewController;
4 |
5 | @interface AppDelegate : UIResponder
6 |
7 | @property (strong, nonatomic) UIWindow *window;
8 |
9 | @property (strong, nonatomic) ViewController *viewController;
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Power Outlet Control
5 | Settings
6 | Hello world!
7 |
8 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jan 13 09:12:34 PST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class ViewController;
4 |
5 | @interface AppDelegate : UIResponder
6 |
7 | @property (strong, nonatomic) UIWindow *window;
8 |
9 | @property (strong, nonatomic) ViewController *viewController;
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/remote_switch_gui_v2/csharp/Makefile:
--------------------------------------------------------------------------------
1 |
2 | all: RemoteSwitchGUIV2.exe
3 |
4 | clean:
5 | rm RemoteSwitchGUIV2.exe
6 |
7 | RemoteSwitchGUIV2.exe: RemoteSwitchGUIV2.cs IPConnection.cs BrickletIndustrialQuadRelayV2.cs
8 | mcs /target:winexe /out:RemoteSwitchGUIV2.exe /pkg:dotnet RemoteSwitchGUIV2.cs IPConnection.cs BrickletIndustrialQuadRelayV2.cs
9 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Power Outlet Control
5 | Settings
6 | Hello world!
7 |
8 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jan 13 09:12:34 PST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/GarageControl-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'GarageControl' target in the 'GarageControl' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | google()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.1.3'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | jcenter()
15 | google()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/PowerOutletControl-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'PowerOutletControl' target in the 'PowerOutletControl' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | google()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.1.3'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | jcenter()
15 | google()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-17
15 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-17
15 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | buildToolsVersion "28.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.tinkerforge.garagecontrol"
9 | minSdkVersion 14
10 | targetSdkVersion 28
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation 'com.android.support:support-v4:28.0.0'
23 | implementation files('libs/Tinkerforge.jar')
24 | }
25 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | buildToolsVersion "28.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.tinkerforge.poweroutletcontrol"
9 | minSdkVersion 14
10 | targetSdkVersion 28
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation 'com.android.support:support-v4:28.0.0'
23 | implementation files('libs/Tinkerforge.jar')
24 | }
25 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/PowerOutletControl.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | True
8 | Managed
9 | Managed
10 | False
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/remote_switch/ruby/remote_switch.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # -*- ruby encoding: utf-8 -*-
3 |
4 | require 'tinkerforge/ip_connection'
5 | require 'tinkerforge/bricklet_industrial_quad_relay'
6 |
7 | include Tinkerforge
8 |
9 | HOST = 'localhost'
10 | PORT = 4223
11 | UID = 'ctG' # Change to your UID
12 | VALUE_A_ON = (1 << 0) | (1 << 2) # Pin 0 and 2 high
13 | VALUE_A_OFF = (1 << 0) | (1 << 3) # Pin 0 and 3 high
14 | VALUE_B_ON = (1 << 1) | (1 << 2) # Pin 1 and 2 high
15 | VALUE_B_OFF = (1 << 1) | (1 << 3) # Pin 1 and 3 high
16 |
17 | ipcon = IPConnection.new # Create IP connection
18 | iqr = BrickletIndustrialQuadRelay.new UID, ipcon # Create device object
19 |
20 | ipcon.connect HOST, PORT # Connect to brickd
21 | # Don't use device before ipcon is connected
22 |
23 | iqr.set_monoflop VALUE_A_ON, 15, 1500
24 |
25 | ipcon.disconnect
26 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/remote_switch/python/remote_switch.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | HOST = "localhost"
5 | PORT = 4223
6 | UID = "ctG" # Change to your UID
7 |
8 | VALUE_A_ON = (1 << 0) | (1 << 2) # Pin 0 and 2 high
9 | VALUE_A_OFF = (1 << 0) | (1 << 3) # Pin 0 and 3 high
10 | VALUE_B_ON = (1 << 1) | (1 << 2) # Pin 1 and 2 high
11 | VALUE_B_OFF = (1 << 1) | (1 << 3) # Pin 1 and 3 high
12 |
13 | from tinkerforge.ip_connection import IPConnection
14 | from tinkerforge.bricklet_industrial_quad_relay import IndustrialQuadRelay
15 |
16 | if __name__ == "__main__":
17 | ipcon = IPConnection() # Create IP connection
18 | iqr = IndustrialQuadRelay(UID, ipcon) # Create device object
19 |
20 | ipcon.connect(HOST, PORT) # Connect to brickd
21 | # Don't use device before ipcon is connected
22 |
23 | iqr.set_monoflop(VALUE_A_ON, 15, 1500); # Set pins to high for 1.5 seconds
24 |
25 | ipcon.disconnect()
26 |
--------------------------------------------------------------------------------
/remote_switch/vbnet/RemoteSwitch.vb:
--------------------------------------------------------------------------------
1 | Imports Tinkerforge
2 |
3 | Module ExampleSimple
4 | Const HOST As String = "localhost"
5 | Const PORT As Integer = 4223
6 | Const UID As String = "ctG" ' Change to your UID
7 | Const VALUE_A_ON As Integer = (1 << 0) Or (1 << 2) ' Pin 0 and 2 high
8 | Const VALUE_A_OFF As Integer = (1 << 0) Or (1 << 3) ' Pin 0 and 3 high
9 | Const VALUE_B_ON As Integer = (1 << 1) Or (1 << 2) ' Pin 1 and 2 high
10 | Const VALUE_B_OFF As Integer = (1 << 1) Or (1 << 3) ' Pin 1 and 3 high
11 |
12 | Sub Main()
13 | Dim ipcon As New IPConnection() ' Create IP connection
14 | Dim iqr As New BrickletIndustrialQuadRelay(UID, ipcon) ' Create device object
15 |
16 | ipcon.Connect(HOST, PORT) ' Connect to brickd
17 | ' Don't use device before ipcon is connected
18 |
19 | iqr.SetMonoflop(VALUE_A_ON, 15, 1500) ' Set pins to high for 1.5 seconds
20 |
21 | ipcon.Disconnect()
22 | End Sub
23 | End Module
24 |
--------------------------------------------------------------------------------
/remote_switch/php/RemoteSwitch.php:
--------------------------------------------------------------------------------
1 | connect(HOST, PORT); // Connect to brickd
21 | // Don't use device before ipcon is connected
22 |
23 | $iqr->setMonoflop($VALUE_A_ON, 15, 1500);
24 |
25 | $ipcon->disconnect();
26 |
27 | ?>
28 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/remote_switch/csharp/RemoteSwitch.cs:
--------------------------------------------------------------------------------
1 | using Tinkerforge;
2 |
3 | class RemoteSwitch
4 | {
5 | private static string HOST = "localhost";
6 | private static int PORT = 4223;
7 | private static string UID = "ctG"; // Change to your UID
8 | private static int VALUE_A_ON = (1 << 0) | (1 << 2); // Pin 0 and 2 high
9 | private static int VALUE_A_OFF = (1 << 0) | (1 << 3); // Pin 0 and 3 high
10 | private static int VALUE_B_ON = (1 << 1) | (1 << 2); // Pin 1 and 2 high
11 | private static int VALUE_B_OFF = (1 << 1) | (1 << 3); // Pin 1 and 3 high
12 |
13 | static void Main()
14 | {
15 | IPConnection ipcon = new IPConnection(); // Create IP connection
16 | BrickletIndustrialQuadRelay iqr = new BrickletIndustrialQuadRelay(UID, ipcon); // Create device object
17 |
18 | ipcon.Connect(HOST, PORT); // Connect to brickd
19 | // Don't use device before ipcon is connected
20 |
21 | iqr.SetMonoflop(VALUE_A_ON, 15, 1500); // Set pins to high for 1.5 seconds
22 |
23 | ipcon.Disconnect();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | GarageControl
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | PowerOutletControl
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/remote_switch/c/remote_switch.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_quad_relay.h"
5 |
6 | #define HOST "localhost"
7 | #define PORT 4223
8 | #define UID "XYZ" // Change to your UID
9 |
10 | #define VALUE_A_ON ((1 << 0) | (1 << 2)) // Pin 0 and 2 high
11 | #define VALUE_A_OFF ((1 << 0) | (1 << 3)) // Pin 0 and 3 high
12 | #define VALUE_B_ON ((1 << 1) | (1 << 2)) // Pin 1 and 2 high
13 | #define VALUE_B_OFF ((1 << 1) | (1 << 3)) // Pin 1 and 3 high
14 |
15 | int main(void) {
16 | // Create IP connection
17 | IPConnection ipcon;
18 | ipcon_create(&ipcon);
19 |
20 | // Create device object
21 | IndustrialQuadRelay iqr;
22 | industrial_quad_relay_create(&iqr, UID, &ipcon);
23 |
24 | // Connect to brickd
25 | if(ipcon_connect(&ipcon, HOST, PORT) < 0) {
26 | fprintf(stderr, "Could not connect\n");
27 | return 1;
28 | }
29 | // Don't use device before ipcon is connected
30 |
31 | // Set pins to high for 1.5 seconds
32 | industrial_quad_relay_set_monoflop(&iqr, VALUE_A_ON, 15, 1500);
33 |
34 | ipcon_destroy(&ipcon); // Calls ipcon_disconnect internally
35 | return 0;
36 | }
37 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/ViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_quad_relay.h"
5 |
6 | @interface ViewController : UIViewController
7 | {
8 | IBOutlet UITextField *hostTextField;
9 | IBOutlet UITextField *portTextField;
10 | IBOutlet UITextField *uidTextField;
11 | IBOutlet UIButton *connectButton;
12 | IBOutlet UIButton *triggerButton;
13 | IBOutlet UIActivityIndicatorView *indicator;
14 |
15 | dispatch_queue_t queue;
16 | IPConnection ipcon;
17 | IndustrialQuadRelay relay;
18 | BOOL connected;
19 | }
20 |
21 | @property (nonatomic, retain) UITextField *hostTextField;
22 | @property (nonatomic, retain) UITextField *portTextField;
23 | @property (nonatomic, retain) UITextField *uidTextField;
24 | @property (nonatomic, retain) UIButton *connectButton;
25 | @property (nonatomic, retain) UIButton *triggerButton;
26 | @property (nonatomic, retain) UIActivityIndicatorView *indicator;
27 |
28 | - (IBAction)connectPressed:(id)sender;
29 | - (IBAction)triggerPressed:(id)sender;
30 |
31 | - (void)saveState;
32 | - (void)restoreState;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/GarageControl.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 256
5 | 7988B8C3-3ADE-488d-BA3E-D052AC9DC710
6 |
7 |
8 | 256
9 | 7988B8C3-3ADE-488d-BA3E-D052AC9DC710
10 |
11 |
12 |
13 |
14 |
15 | False
16 | Managed
17 | Managed
18 | False
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/Properties/WMAppManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ApplicationIcon.png
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Background.png
15 | 0
16 | Garage Control
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/remote_switch_v2/ruby/remote_switch_v2.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # -*- ruby encoding: utf-8 -*-
3 |
4 | require 'tinkerforge/ip_connection'
5 | require 'tinkerforge/bricklet_industrial_quad_relay_v2'
6 |
7 | include Tinkerforge
8 |
9 | HOST = 'localhost'
10 | PORT = 4223
11 | UID = '2g2gRs' # Change to your UID
12 |
13 | def a_on(iqr)
14 | # Close channels 0 and 2 for 1.5 seconds
15 | iqr.set_monoflop 0, true, 1500
16 | iqr.set_monoflop 2, true, 1500
17 | end
18 |
19 | def a_off(iqr)
20 | # Close channels 0 and 3 for 1.5 seconds
21 | iqr.set_monoflop 0, true, 1500
22 | iqr.set_monoflop 3, true, 1500
23 | end
24 |
25 | def b_on(iqr)
26 | # Close channels 1 and 2 for 1.5 seconds
27 | iqr.set_monoflop 1, true, 1500
28 | iqr.set_monoflop 2, true, 1500
29 | end
30 |
31 | def b_off(iqr)
32 | # Close channels 1 and 3 for 1.5 seconds
33 | iqr.set_monoflop 1, true, 1500
34 | iqr.set_monoflop 3, true, 1500
35 | end
36 |
37 | ipcon = IPConnection.new # Create IP connection
38 | iqr = BrickletIndustrialQuadRelayV2.new UID, ipcon # Create device object
39 |
40 | ipcon.connect HOST, PORT # Connect to brickd
41 | # Don't use device before ipcon is connected
42 |
43 | a_on iqr
44 |
45 | ipcon.disconnect
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Express 2012 for Windows Phone
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GarageControl", "GarageControl\GarageControl.csproj", "{FE2EBD9F-3247-4A30-8659-CC1483FE111D}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
15 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.ActiveCfg = Release|Any CPU
16 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.Build.0 = Release|Any CPU
17 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.Deploy.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Properties/WMAppManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ApplicationIcon.png
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Background.png
15 | 0
16 | Power Outlet Control
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Express 2012 for Windows Phone
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerOutletControl", "PowerOutletControl\PowerOutletControl.csproj", "{FE2EBD9F-3247-4A30-8659-CC1483FE111D}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
15 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.ActiveCfg = Release|Any CPU
16 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.Build.0 = Release|Any CPU
17 | {FE2EBD9F-3247-4A30-8659-CC1483FE111D}.Release|Any CPU.Deploy.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/remote_switch_v2/python/remote_switch_v2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import sys
5 |
6 | HOST = "localhost"
7 | PORT = 4223
8 | UID = "2g2gRs" # Change to your UID
9 |
10 | from tinkerforge.ip_connection import IPConnection
11 | from tinkerforge.bricklet_industrial_quad_relay_v2 import IndustrialQuadRelayV2
12 |
13 | def a_on():
14 | # Close channels 0 and 2 for 1.5 seconds
15 | iqr.set_monoflop(0, True, 1500)
16 | iqr.set_monoflop(2, True, 1500)
17 |
18 | def a_off():
19 | # Close channels 0 and 3 for 1.5 seconds
20 | iqr.set_monoflop(0, True, 1500)
21 | iqr.set_monoflop(3, True, 1500)
22 |
23 | def b_on():
24 | # Close channels 1 and 2 for 1.5 seconds
25 | iqr.set_monoflop(1, True, 1500)
26 | iqr.set_monoflop(2, True, 1500)
27 |
28 | def b_off():
29 | # Close channels 1 and 3 for 1.5 seconds
30 | iqr.set_monoflop(1, True, 1500)
31 | iqr.set_monoflop(3, True, 1500)
32 |
33 | if __name__ == "__main__":
34 | ipcon = IPConnection() # Create IP connection
35 | iqr = IndustrialQuadRelayV2(UID, ipcon) # Create device object
36 |
37 | ipcon.connect(HOST, PORT) # Connect to brickd
38 | # Don't use device before ipcon is connected
39 |
40 | a_on()
41 |
42 | ipcon.disconnect()
43 |
--------------------------------------------------------------------------------
/remote_switch/java/RemoteSwitch.java:
--------------------------------------------------------------------------------
1 | import com.tinkerforge.IPConnection;
2 | import com.tinkerforge.BrickletIndustrialQuadRelay;
3 |
4 | public class RemoteSwitch {
5 | private static final String HOST = "localhost";
6 | private static final int PORT = 4223;
7 | private static final String UID = "ctG"; // Change to your UID
8 | private static final int VALUE_A_ON = (1 << 0) | (1 << 2); // Pin 0 and 2 high
9 | private static final int VALUE_A_OFF = (1 << 0) | (1 << 3); // Pin 0 and 3 high
10 | private static final int VALUE_B_ON = (1 << 1) | (1 << 2); // Pin 1 and 2 high
11 | private static final int VALUE_B_OFF = (1 << 1) | (1 << 3); // Pin 1 and 3 high
12 |
13 | // Note: To make the example code cleaner we do not handle exceptions. Exceptions you
14 | // might normally want to catch are described in the documentation
15 | public static void main(String args[]) throws Exception {
16 | IPConnection ipcon = new IPConnection(); // Create IP connection
17 | BrickletIndustrialQuadRelay iqr = new BrickletIndustrialQuadRelay(UID, ipcon); // Create device object
18 |
19 | ipcon.connect(HOST, PORT); // Connect to brickd
20 | // Don't use device before ipcon is connected
21 |
22 | iqr.setMonoflop(VALUE_A_ON, 15, 1500); // Set pins to high for 1.5 seconds
23 |
24 | ipcon.disconnect();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/remote_switch/delphi/RemoteSwitch.pas:
--------------------------------------------------------------------------------
1 | program RemoteSwitch;
2 |
3 | {$ifdef MSWINDOWS}{$apptype CONSOLE}{$endif}
4 | {$ifdef FPC}{$mode OBJFPC}{$H+}{$endif}
5 |
6 | uses
7 | SysUtils, IPConnection, BrickletIndustrialQuadRelay;
8 |
9 | type
10 | TRemoteSwitch = class
11 | private
12 | ipcon: TIPConnection;
13 | iqr: TBrickletIndustrialQuadRelay;
14 | public
15 | procedure Execute;
16 | end;
17 |
18 | const
19 | HOST = 'localhost';
20 | PORT = 4223;
21 | UID = 'ctG'; { Change to your UID }
22 | VALUE_A_ON = (1 shl 0) or (1 shl 2); { Pin 0 and 2 high }
23 | VALUE_A_OFF = (1 shl 0) or (1 shl 3); { Pin 0 and 3 high }
24 | VALUE_B_ON = (1 shl 1) or (1 shl 2); { Pin 1 and 2 high }
25 | VALUE_B_OFF = (1 shl 1) or (1 shl 3); { Pin 1 and 3 high }
26 |
27 | var
28 | rs: TRemoteSwitch;
29 |
30 | procedure TRemoteSwitch.Execute;
31 | begin
32 | { Create IP connection }
33 | ipcon := TIPConnection.Create;
34 |
35 | { Create device object }
36 | iqr := TBrickletIndustrialQuadRelay.Create(UID, ipcon);
37 |
38 | { Connect to brickd }
39 | ipcon.Connect(HOST, PORT);
40 | { Don't use device before ipcon is connected }
41 |
42 | { Set pins to high for 1.5 seconds }
43 | iqr.SetMonoflop(VALUE_A_ON, 15, 1500);
44 | end;
45 |
46 | begin
47 | rs := TRemoteSwitch.Create;
48 | rs.Execute;
49 | rs.Destroy;
50 | end.
51 |
--------------------------------------------------------------------------------
/remote_switch_v2/vbnet/RemoteSwitchV2.vb:
--------------------------------------------------------------------------------
1 | Imports Tinkerforge
2 |
3 | Module RemoteSwitchV2
4 | Const HOST As String = "localhost"
5 | Const PORT As Integer = 4223
6 | Const UID As String = "2g2gRs" ' Change to your UID
7 |
8 | Sub AOn(ByVal iqr As BrickletIndustrialQuadRelayV2)
9 | ' Close channels 0 and 2 for 1.5 seconds
10 | iqr.SetMonoflop(0, true, 1500)
11 | iqr.SetMonoflop(2, true, 1500)
12 | End Sub
13 |
14 | Sub AOff(ByVal iqr As BrickletIndustrialQuadRelayV2)
15 | ' Close channels 0 and 3 for 1.5 seconds
16 | iqr.SetMonoflop(0, true, 1500)
17 | iqr.SetMonoflop(3, true, 1500)
18 | End Sub
19 |
20 | Sub BOn(ByVal iqr As BrickletIndustrialQuadRelayV2)
21 | ' Close channels 1 and 2 for 1.5 seconds
22 | iqr.SetMonoflop(1, true, 1500)
23 | iqr.SetMonoflop(2, true, 1500)
24 | End Sub
25 |
26 | Sub BOff(ByVal iqr As BrickletIndustrialQuadRelayV2)
27 | ' Close channels 1 and 3 for 1.5 seconds
28 | iqr.SetMonoflop(1, true, 1500)
29 | iqr.SetMonoflop(3, true, 1500)
30 | End Sub
31 |
32 | Sub Main()
33 | Dim ipcon As New IPConnection() ' Create IP connection
34 | Dim iqr As New BrickletIndustrialQuadRelayV2(UID, ipcon) ' Create device object
35 |
36 | ipcon.Connect(HOST, PORT) ' Connect to brickd
37 | ' Don't use device before ipcon is connected
38 |
39 | Aon(iqr)
40 |
41 | ipcon.Disconnect()
42 | End Sub
43 | End Module
44 |
--------------------------------------------------------------------------------
/remote_switch_v2/php/RemoteSwitchV2.php:
--------------------------------------------------------------------------------
1 | setMonoflop(0, True, 1500);
16 | $iqr->setMonoflop(2, True, 1500);
17 | }
18 |
19 | function a_off($iqr) {
20 | # Close channels 0 and 3 for 1.5 seconds
21 | $iqr->setMonoflop(0, True, 1500);
22 | $iqr->setMonoflop(3, True, 1500);
23 | }
24 |
25 | function b_on($iqr) {
26 | # Close channels 1 and 2 for 1.5 seconds
27 | $iqr->setMonoflop(1, True, 1500);
28 | $iqr->setMonoflop(2, True, 1500);
29 | }
30 |
31 | function b_off($iqr) {
32 | # Close channels 1 and 3 for 1.5 seconds
33 | $iqr->setMonoflop(1, True, 1500);
34 | $iqr->setMonoflop(3, True, 1500);
35 | }
36 |
37 | $ipcon = new IPConnection(); // Create IP connection
38 | $iqr = new BrickletIndustrialQuadRelayV2(UID, $ipcon); // Create device object
39 |
40 | $ipcon->connect(HOST, PORT); // Connect to brickd
41 | // Don't use device before ipcon is connected
42 |
43 | a_on($iqr);
44 |
45 | $ipcon->disconnect();
46 |
47 | ?>
48 |
--------------------------------------------------------------------------------
/remote_switch_v2/csharp/RemoteSwitchV2.cs:
--------------------------------------------------------------------------------
1 | using Tinkerforge;
2 |
3 | class RemoteSwitchV2
4 | {
5 | private static string HOST = "localhost";
6 | private static int PORT = 4223;
7 | private static string UID = "2g2gRs"; // Change to your UID
8 |
9 | static void AOn(BrickletIndustrialQuadRelayV2 iqr) {
10 | // Close channels 0 and 2 for 1.5 seconds
11 | iqr.SetMonoflop(0, true, 1500);
12 | iqr.SetMonoflop(2, true, 1500);
13 | }
14 |
15 | static void AOff(BrickletIndustrialQuadRelayV2 iqr) {
16 | // Close channels 0 and 3 for 1.5 seconds
17 | iqr.SetMonoflop(0, true, 1500);
18 | iqr.SetMonoflop(3, true, 1500);
19 | }
20 |
21 | static void BOn(BrickletIndustrialQuadRelayV2 iqr) {
22 | // Close channels 1 and 2 for 1.5 seconds
23 | iqr.SetMonoflop(1, true, 1500);
24 | iqr.SetMonoflop(2, true, 1500);
25 | }
26 |
27 | static void BOff(BrickletIndustrialQuadRelayV2 iqr) {
28 | // Close channels 1 and 3 for 1.5 seconds
29 | iqr.SetMonoflop(1, true, 1500);
30 | iqr.SetMonoflop(3, true, 1500);
31 | }
32 |
33 | static void Main()
34 | {
35 | IPConnection ipcon = new IPConnection(); // Create IP connection
36 | BrickletIndustrialQuadRelayV2 iqr = new BrickletIndustrialQuadRelayV2(UID, ipcon); // Create device object
37 |
38 | ipcon.Connect(HOST, PORT); // Connect to brickd
39 | // Don't use device before ipcon is connected
40 |
41 | AOn(iqr);
42 |
43 | ipcon.Disconnect();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.pyc
3 | __pycache__
4 | .DS_Store
5 | garage_control_smart_phone/android/GarageControl/bin/
6 | garage_control_smart_phone/android/GarageControl/gen/
7 | garage_control_smart_phone/android/GarageControl_Studio/.gradle
8 | garage_control_smart_phone/android/GarageControl_Studio/.idea
9 | garage_control_smart_phone/android/GarageControl_Studio/local.properties
10 | garage_control_smart_phone/android/GarageControl_Studio/app/.externalNativeBuild
11 | garage_control_smart_phone/android/GarageControl_Studio/app/build
12 | garage_control_smart_phone/windows_phone/GarageControl.*.suo
13 | garage_control_smart_phone/windows_phone/GarageControl/Bin/
14 | garage_control_smart_phone/windows_phone/GarageControl/obj/
15 | power_outlet_control_smart_phone/android/PowerOutletControl/bin/
16 | power_outlet_control_smart_phone/android/PowerOutletControl/gen/
17 | power_outlet_control_smart_phone/android/PowerOutletControl_Studio/.gradle
18 | power_outlet_control_smart_phone/android/PowerOutletControl_Studio/.idea
19 | power_outlet_control_smart_phone/android/PowerOutletControl_Studio/local.properties
20 | power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/.externalNativeBuild
21 | power_outlet_control_smart_phone/android/PowerOutletControl_Studio/app/build
22 | power_outlet_control_smart_phone/windows_phone/PowerOutletControl.*.suo
23 | power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Bin/
24 | power_outlet_control_smart_phone/windows_phone/PowerOutletControl/obj/
25 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/ViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_quad_relay.h"
5 |
6 | @interface ViewController : UIViewController
7 | {
8 | IBOutlet UITextField *hostTextField;
9 | IBOutlet UITextField *portTextField;
10 | IBOutlet UITextField *uidTextField;
11 | IBOutlet UIButton *connectButton;
12 | IBOutlet UIButton *aOnButton;
13 | IBOutlet UIButton *aOffButton;
14 | IBOutlet UIButton *bOnButton;
15 | IBOutlet UIButton *bOffButton;
16 | IBOutlet UIActivityIndicatorView *indicator;
17 |
18 | dispatch_queue_t queue;
19 | IPConnection ipcon;
20 | IndustrialQuadRelay relay;
21 | BOOL connected;
22 | }
23 |
24 | @property (nonatomic, retain) UITextField *hostTextField;
25 | @property (nonatomic, retain) UITextField *portTextField;
26 | @property (nonatomic, retain) UITextField *uidTextField;
27 | @property (nonatomic, retain) UIButton *connectButton;
28 | @property (nonatomic, retain) UIButton *aOnButton;
29 | @property (nonatomic, retain) UIButton *aOffButton;
30 | @property (nonatomic, retain) UIButton *bOnButton;
31 | @property (nonatomic, retain) UIButton *bOffButton;
32 | @property (nonatomic, retain) UIActivityIndicatorView *indicator;
33 |
34 | - (IBAction)connectPressed:(id)sender;
35 | - (IBAction)aOnPressed:(id)sender;
36 | - (IBAction)aOffPressed:(id)sender;
37 | - (IBAction)bOnPressed:(id)sender;
38 | - (IBAction)bOffPressed:(id)sender;
39 |
40 | - (void)saveState;
41 | - (void)restoreState;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using System.Resources;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Garage Control")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Tinkerforge GmbH")]
13 | [assembly: AssemblyProduct("Garage Control")]
14 | [assembly: AssemblyCopyright("Tinkerforge GmbH 2013")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("81a5baf6-a14b-47c0-a555-651642434ff1")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Revision and Build Numbers
34 | // by using the '*' as shown below:
35 | [assembly: AssemblyVersion("1.0.1.0")]
36 | [assembly: AssemblyFileVersion("1.0.1.0")]
37 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
38 |
--------------------------------------------------------------------------------
/remote_switch_v2/c/remote_switch_v2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_quad_relay_v2.h"
5 |
6 | #define HOST "localhost"
7 | #define PORT 4223
8 | #define UID "2g2gRs" // Change to your UID
9 |
10 | void a_on(IndustrialQuadRelayV2 *iqr) {
11 | // Close channels 0 and 2 for 1.5 seconds
12 | industrial_quad_relay_v2_set_monoflop(iqr, 0, true, 1500);
13 | industrial_quad_relay_v2_set_monoflop(iqr, 2, true, 1500);
14 | }
15 |
16 | void a_off(IndustrialQuadRelayV2 *iqr) {
17 | // Close channels 0 and 3 for 1.5 seconds
18 | industrial_quad_relay_v2_set_monoflop(iqr, 0, true, 1500);
19 | industrial_quad_relay_v2_set_monoflop(iqr, 3, true, 1500);
20 | }
21 |
22 | void b_on(IndustrialQuadRelayV2 *iqr) {
23 | // Close channels 1 and 2 for 1.5 seconds
24 | industrial_quad_relay_v2_set_monoflop(iqr, 1, true, 1500);
25 | industrial_quad_relay_v2_set_monoflop(iqr, 2, true, 1500);
26 | }
27 |
28 | void b_off(IndustrialQuadRelayV2 *iqr) {
29 | // Close channels 1 and 3 for 1.5 seconds
30 | industrial_quad_relay_v2_set_monoflop(iqr, 1, true, 1500);
31 | industrial_quad_relay_v2_set_monoflop(iqr, 3, true, 1500);
32 | }
33 |
34 | int main(void) {
35 | // Create IP connection
36 | IPConnection ipcon;
37 | ipcon_create(&ipcon);
38 |
39 | // Create device object
40 | IndustrialQuadRelayV2 iqr;
41 | industrial_quad_relay_v2_create(&iqr, UID, &ipcon);
42 |
43 | // Connect to brickd
44 | if(ipcon_connect(&ipcon, HOST, PORT) < 0) {
45 | fprintf(stderr, "Could not connect\n");
46 | return 1;
47 | }
48 | // Don't use device before ipcon is connected
49 |
50 | a_on(&iqr);
51 |
52 | ipcon_destroy(&ipcon); // Calls ipcon_disconnect internally
53 |
54 | return 0;
55 | }
56 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using System.Resources;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Power Outlet Control")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Tinkerforge GmbH")]
13 | [assembly: AssemblyProduct("Power Outlet Control")]
14 | [assembly: AssemblyCopyright("Tinkerforge GmbH 2013")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("81a5baf6-a14b-47c0-a555-651642434ff2")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Revision and Build Numbers
34 | // by using the '*' as shown below:
35 | [assembly: AssemblyVersion("1.0.1.0")]
36 | [assembly: AssemblyFileVersion("1.0.1.0")]
37 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
38 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/GarageControl-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIcons
12 |
13 | CFBundlePrimaryIcon
14 |
15 | CFBundleIconFiles
16 |
17 | icon_80x80
18 | icon_58x58
19 | icon_29x29
20 | icon_120x120
21 | icon_57x57.png
22 | icon_114x114.png
23 |
24 |
25 |
26 | CFBundleIdentifier
27 | com.tinkerforge.${PRODUCT_NAME:rfc1034identifier}
28 | CFBundleInfoDictionaryVersion
29 | 6.0
30 | CFBundleName
31 | ${PRODUCT_NAME}
32 | CFBundlePackageType
33 | APPL
34 | CFBundleShortVersionString
35 | 1.0
36 | CFBundleSignature
37 | ????
38 | CFBundleVersion
39 | 1.0
40 | LSRequiresIPhoneOS
41 |
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/PowerOutletControl-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIcons
12 |
13 | CFBundlePrimaryIcon
14 |
15 | CFBundleIconFiles
16 |
17 | icon_80x80
18 | icon_58x58
19 | icon_29x29
20 | icon_120x120
21 | icon_114x114
22 | icon_114x114.png
23 | icon_57x57.png
24 |
25 |
26 |
27 | CFBundleIdentifier
28 | com.tinkerforge.${PRODUCT_NAME:rfc1034identifier}
29 | CFBundleInfoDictionaryVersion
30 | 6.0
31 | CFBundleName
32 | ${PRODUCT_NAME}
33 | CFBundlePackageType
34 | APPL
35 | CFBundleShortVersionString
36 | 1.0
37 | CFBundleSignature
38 | ????
39 | CFBundleVersion
40 | 1.0
41 | LSRequiresIPhoneOS
42 |
43 | UIRequiredDeviceCapabilities
44 |
45 | armv7
46 |
47 | UISupportedInterfaceOrientations
48 |
49 | UIInterfaceOrientationPortrait
50 | UIInterfaceOrientationLandscapeLeft
51 | UIInterfaceOrientationLandscapeRight
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/remote_switch_v2/delphi/RemoteSwitchV2.pas:
--------------------------------------------------------------------------------
1 | program RemoteSwitchV2;
2 |
3 | {$ifdef MSWINDOWS}{$apptype CONSOLE}{$endif}
4 | {$ifdef FPC}{$mode OBJFPC}{$H+}{$endif}
5 |
6 | uses
7 | SysUtils, IPConnection, BrickletIndustrialQuadRelayV2;
8 |
9 | type
10 | TRemoteSwitchV2 = class
11 | private
12 | ipcon: TIPConnection;
13 | iqr: TBrickletIndustrialQuadRelayV2;
14 | public
15 | procedure Execute;
16 | procedure AOn;
17 | procedure AOff;
18 | procedure BOn;
19 | procedure BOff;
20 | end;
21 |
22 | const
23 | HOST = 'localhost';
24 | PORT = 4223;
25 | UID = '2g2gRs'; { Change to your UID }
26 |
27 | var
28 | rs: TRemoteSwitchV2;
29 |
30 | procedure TRemoteSwitchV2.AOn;
31 | begin
32 | { Close channels 0 and 2 for 1.5 seconds }
33 | iqr.SetMonoflop(0, true, 1500);
34 | iqr.SetMonoflop(2, true, 1500);
35 | end;
36 |
37 | procedure TRemoteSwitchV2.AOff;
38 | begin
39 | { Close channels 0 and 3 for 1.5 seconds }
40 | iqr.SetMonoflop(0, true, 1500);
41 | iqr.SetMonoflop(3, true, 1500);
42 | end;
43 |
44 | procedure TRemoteSwitchV2.BOn;
45 | begin
46 | { Close channels 1 and 2 for 1.5 seconds }
47 | iqr.SetMonoflop(1, true, 1500);
48 | iqr.SetMonoflop(2, true, 1500);
49 | end;
50 |
51 | procedure TRemoteSwitchV2.BOff;
52 | begin
53 | { Close channels 1 and 3 for 1.5 seconds }
54 | iqr.SetMonoflop(1, true, 1500);
55 | iqr.SetMonoflop(3, true, 1500);
56 | end;
57 |
58 | procedure TRemoteSwitchV2.Execute;
59 | begin
60 | { Create IP connection }
61 | ipcon := TIPConnection.Create;
62 |
63 | { Create device object }
64 | iqr := TBrickletIndustrialQuadRelayV2.Create(UID, ipcon);
65 |
66 | { Connect to brickd }
67 | ipcon.Connect(HOST, PORT);
68 | { Don't use device before ipcon is connected }
69 |
70 | AOn();
71 | end;
72 |
73 | begin
74 | rs := TRemoteSwitchV2.Create;
75 | rs.Execute;
76 | rs.Destroy;
77 | end.
78 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/import-summary.txt:
--------------------------------------------------------------------------------
1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY
2 | ======================================
3 |
4 | Ignored Files:
5 | --------------
6 | The following files were *not* copied into the new Gradle project; you
7 | should evaluate whether these are still needed in your project and if
8 | so manually move them:
9 |
10 | * ic_launcher-web.png
11 | * proguard-project.txt
12 |
13 | Replaced Jars with Dependencies:
14 | --------------------------------
15 | The importer recognized the following .jar files as third party
16 | libraries and replaced them with Gradle dependencies instead. This has
17 | the advantage that more explicit version information is known, and the
18 | libraries can be updated automatically. However, it is possible that
19 | the .jar file in your project was of an older version than the
20 | dependency we picked, which could render the project not compileable.
21 | You can disable the jar replacement in the import wizard and try again:
22 |
23 | android-support-v4.jar => com.android.support:support-v4:18.0.0
24 |
25 | Moved Files:
26 | ------------
27 | Android Gradle projects use a different directory structure than ADT
28 | Eclipse projects. Here's how the projects were restructured:
29 |
30 | * AndroidManifest.xml => app/src/main/AndroidManifest.xml
31 | * libs/Tinkerforge.jar => app/libs/Tinkerforge.jar
32 | * res/ => app/src/main/res/
33 | * src/ => app/src/main/java/
34 |
35 | Next Steps:
36 | -----------
37 | You can now build the project. The Gradle project needs network
38 | connectivity to download dependencies.
39 |
40 | Bugs:
41 | -----
42 | If for some reason your project does not build, and you determine that
43 | it is due to a bug or limitation of the Eclipse to Gradle importer,
44 | please file a bug at http://b.android.com with category
45 | Component-Tools.
46 |
47 | (This import summary is for your information only, and can be deleted
48 | after import once you are satisfied with the results.)
49 |
--------------------------------------------------------------------------------
/remote_switch_v2/java/RemoteSwitchV2.java:
--------------------------------------------------------------------------------
1 | import com.tinkerforge.IPConnection;
2 | import com.tinkerforge.BrickletIndustrialQuadRelayV2;
3 | import com.tinkerforge.TimeoutException;
4 | import com.tinkerforge.NotConnectedException;
5 |
6 | public class RemoteSwitchV2 {
7 | private static final String HOST = "localhost";
8 | private static final int PORT = 4223;
9 | private static final String UID = "2g2gRs"; // Change to your UID
10 |
11 | private static void a_on(BrickletIndustrialQuadRelayV2 iqr) throws TimeoutException, NotConnectedException {
12 | // Close channels 0 and 2 for 1.5 seconds
13 | iqr.setMonoflop(0, true, 1500);
14 | iqr.setMonoflop(2, true, 1500);
15 | }
16 |
17 | private static void a_off(BrickletIndustrialQuadRelayV2 iqr) throws TimeoutException, NotConnectedException {
18 | // Close channels 0 and 3 for 1.5 seconds
19 | iqr.setMonoflop(0, true, 1500);
20 | iqr.setMonoflop(3, true, 1500);
21 | }
22 |
23 | private static void b_on(BrickletIndustrialQuadRelayV2 iqr) throws TimeoutException, NotConnectedException {
24 | // Close channels 1 and 2 for 1.5 seconds
25 | iqr.setMonoflop(1, true, 1500);
26 | iqr.setMonoflop(2, true, 1500);
27 | }
28 |
29 | private static void b_off(BrickletIndustrialQuadRelayV2 iqr) throws TimeoutException, NotConnectedException {
30 | // Close channels 1 and 3 for 1.5 seconds
31 | iqr.setMonoflop(1, true, 1500);
32 | iqr.setMonoflop(3, true, 1500);
33 | }
34 |
35 | // Note: To make the example code cleaner we do not handle exceptions. Exceptions you
36 | // might normally want to catch are described in the documentation
37 | public static void main(String args[]) throws Exception {
38 | IPConnection ipcon = new IPConnection(); // Create IP connection
39 | BrickletIndustrialQuadRelayV2 iqr = new BrickletIndustrialQuadRelayV2(UID, ipcon); // Create device object
40 |
41 | ipcon.connect(HOST, PORT); // Connect to brickd
42 | // Don't use device before ipcon is connected
43 |
44 | a_on(iqr);
45 |
46 | ipcon.disconnect();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/import-summary.txt:
--------------------------------------------------------------------------------
1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY
2 | ======================================
3 |
4 | Ignored Files:
5 | --------------
6 | The following files were *not* copied into the new Gradle project; you
7 | should evaluate whether these are still needed in your project and if
8 | so manually move them:
9 |
10 | * ic_launcher-web.png
11 | * proguard-project.txt
12 |
13 | Replaced Jars with Dependencies:
14 | --------------------------------
15 | The importer recognized the following .jar files as third party
16 | libraries and replaced them with Gradle dependencies instead. This has
17 | the advantage that more explicit version information is known, and the
18 | libraries can be updated automatically. However, it is possible that
19 | the .jar file in your project was of an older version than the
20 | dependency we picked, which could render the project not compileable.
21 | You can disable the jar replacement in the import wizard and try again:
22 |
23 | android-support-v4.jar => com.android.support:support-v4:18.0.0
24 |
25 | Moved Files:
26 | ------------
27 | Android Gradle projects use a different directory structure than ADT
28 | Eclipse projects. Here's how the projects were restructured:
29 |
30 | * AndroidManifest.xml => app/src/main/AndroidManifest.xml
31 | * assets/ => app/src/main/assets
32 | * libs/Tinkerforge.jar => app/libs/Tinkerforge.jar
33 | * res/ => app/src/main/res/
34 | * src/ => app/src/main/java/
35 |
36 | Next Steps:
37 | -----------
38 | You can now build the project. The Gradle project needs network
39 | connectivity to download dependencies.
40 |
41 | Bugs:
42 | -----
43 | If for some reason your project does not build, and you determine that
44 | it is due to a bug or limitation of the Eclipse to Gradle importer,
45 | please file a bug at http://b.android.com with category
46 | Component-Tools.
47 |
48 | (This import summary is for your information only, and can be deleted
49 | after import once you are satisfied with the results.)
50 |
--------------------------------------------------------------------------------
/smoke_detector_v2/ruby/smoke_detector_v2.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # -*- ruby encoding: utf-8 -*-
3 |
4 | require 'tinkerforge/ip_connection'
5 | require 'tinkerforge/bricklet_industrial_digital_in_4_v2'
6 |
7 | include Tinkerforge
8 |
9 | HOST = 'localhost'
10 | PORT = 4223
11 |
12 | idi4 = nil
13 |
14 | ipcon = IPConnection.new
15 | while true
16 | begin
17 | ipcon.connect HOST, PORT
18 | break
19 | rescue Exception => e
20 | puts 'Connection Error: ' + e
21 | sleep 1
22 | end
23 | end
24 |
25 | ipcon.register_callback(IPConnection::CALLBACK_ENUMERATE) do |uid, connected_uid, position,
26 | hardware_version, firmware_version,
27 | device_identifier, enumeration_type|
28 | if enumeration_type == IPConnection::ENUMERATION_TYPE_CONNECTED or
29 | enumeration_type == IPConnection::ENUMERATION_TYPE_AVAILABLE
30 | if device_identifier == BrickletIndustrialDigitalIn4V2::DEVICE_IDENTIFIER
31 | begin
32 | idi4 = BrickletIndustrialDigitalIn4V2.new uid, ipcon
33 | idi4.set_all_value_callback_configuration 10000, true
34 | idi4.register_callback(BrickletIndustrialDigitalIn4V2::CALLBACK_ALL_VALUE) do |changed, value|
35 | puts 'Fire! Fire!'
36 | end
37 | puts 'Industrial Digital In 4 V2 initialized'
38 | rescue Exception => e
39 | idi4 = nil
40 | puts 'Industrial Digital In 4 V2 init failed: ' + e
41 | end
42 | end
43 | end
44 | end
45 |
46 | ipcon.register_callback(IPConnection::CALLBACK_CONNECTED) do |connected_reason|
47 | if connected_reason == IPConnection::CONNECT_REASON_AUTO_RECONNECT
48 | puts 'Auto Reconnect'
49 | while true
50 | begin
51 | ipcon.enumerate
52 | break
53 | rescue Exception => e
54 | puts 'Enumerate Error: ' + e
55 | sleep 1
56 | end
57 | end
58 | end
59 | end
60 |
61 | while true
62 | begin
63 | ipcon.enumerate
64 | break
65 | rescue Exception => e
66 | puts 'Enumerate Error: ' + e
67 | sleep 1
68 | end
69 | end
70 |
71 | puts 'Press key to exit'
72 | $stdin.gets
73 | ipcon.disconnect
74 |
--------------------------------------------------------------------------------
/smoke_detector/ruby/smoke_detector.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # -*- ruby encoding: utf-8 -*-
3 |
4 | require 'tinkerforge/ip_connection'
5 | require 'tinkerforge/bricklet_industrial_digital_in_4'
6 |
7 | include Tinkerforge
8 |
9 | HOST = 'localhost'
10 | PORT = 4223
11 |
12 | idi4 = nil
13 |
14 | ipcon = IPConnection.new
15 | while true
16 | begin
17 | ipcon.connect HOST, PORT
18 | break
19 | rescue Exception => e
20 | puts 'Connection Error: ' + e
21 | sleep 1
22 | end
23 | end
24 |
25 | ipcon.register_callback(IPConnection::CALLBACK_ENUMERATE) do |uid, connected_uid, position,
26 | hardware_version, firmware_version,
27 | device_identifier, enumeration_type|
28 | if enumeration_type == IPConnection::ENUMERATION_TYPE_CONNECTED or
29 | enumeration_type == IPConnection::ENUMERATION_TYPE_AVAILABLE
30 | if device_identifier == BrickletIndustrialDigitalIn4::DEVICE_IDENTIFIER
31 | begin
32 | idi4 = BrickletIndustrialDigitalIn4.new uid, ipcon
33 | idi4.set_debounce_period 10000
34 | idi4.set_interrupt 15
35 | idi4.register_callback(BrickletIndustrialDigitalIn4::CALLBACK_INTERRUPT) do |interrupt_mask, value_mask|
36 | if value_mask > 0
37 | puts 'Fire! Fire!'
38 | end
39 | end
40 | puts 'Industrial Digital In 4 initialized'
41 | rescue Exception => e
42 | idi4 = nil
43 | puts 'Industrial Digital In 4 init failed: ' + e
44 | end
45 | end
46 | end
47 | end
48 |
49 | ipcon.register_callback(IPConnection::CALLBACK_CONNECTED) do |connected_reason|
50 | if connected_reason == IPConnection::CONNECT_REASON_AUTO_RECONNECT
51 | puts 'Auto Reconnect'
52 | while true
53 | begin
54 | ipcon.enumerate
55 | break
56 | rescue Exception => e
57 | puts 'Enumerate Error: ' + e
58 | sleep 1
59 | end
60 | end
61 | end
62 | end
63 |
64 | while true
65 | begin
66 | ipcon.enumerate
67 | break
68 | rescue Exception => e
69 | puts 'Enumerate Error: ' + e
70 | sleep 1
71 | end
72 | end
73 |
74 | puts 'Press key to exit'
75 | $stdin.gets
76 | ipcon.disconnect
77 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/ios/GarageControl/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import "ViewController.h"
4 |
5 | @implementation AppDelegate
6 |
7 | @synthesize window = _window;
8 | @synthesize viewController = _viewController;
9 |
10 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
11 | {
12 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
13 | // Override point for customization after application launch.
14 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
15 | self.window.rootViewController = self.viewController;
16 | [self.window makeKeyAndVisible];
17 |
18 | return YES;
19 | }
20 |
21 | - (void)applicationWillResignActive:(UIApplication *)application
22 | {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | - (void)applicationDidEnterBackground:(UIApplication *)application
28 | {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | [self.viewController saveState];
32 | }
33 |
34 | - (void)applicationWillEnterForeground:(UIApplication *)application
35 | {
36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
37 | }
38 |
39 | - (void)applicationDidBecomeActive:(UIApplication *)application
40 | {
41 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
42 | [self.viewController restoreState];
43 | }
44 |
45 | - (void)applicationWillTerminate:(UIApplication *)application
46 | {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/ios/PowerOutletControl/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import "ViewController.h"
4 |
5 | @implementation AppDelegate
6 |
7 | @synthesize window = _window;
8 | @synthesize viewController = _viewController;
9 |
10 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
11 | {
12 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
13 | // Override point for customization after application launch.
14 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
15 | self.window.rootViewController = self.viewController;
16 | [self.window makeKeyAndVisible];
17 |
18 | return YES;
19 | }
20 |
21 | - (void)applicationWillResignActive:(UIApplication *)application
22 | {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | - (void)applicationDidEnterBackground:(UIApplication *)application
28 | {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | [self.viewController saveState];
32 | }
33 |
34 | - (void)applicationWillEnterForeground:(UIApplication *)application
35 | {
36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
37 | }
38 |
39 | - (void)applicationDidBecomeActive:(UIApplication *)application
40 | {
41 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
42 | [self.viewController restoreState];
43 | }
44 |
45 | - (void)applicationWillTerminate:(UIApplication *)application
46 | {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/android/PowerOutletControl_Studio/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/smoke_detector_v2/php/SmokeDetectorV2.php:
--------------------------------------------------------------------------------
1 | ipcon = new IPConnection();
17 | $this->brickletIndustrialDigitalIn4V2 = null;
18 |
19 | while(true) {
20 | try {
21 | $this->ipcon->connect(self::HOST, self::PORT);
22 | break;
23 | } catch(Exception $e) {
24 | sleep(1);
25 | }
26 | }
27 |
28 | $this->ipcon->registerCallback(IPConnection::CALLBACK_ENUMERATE,
29 | array($this, 'cb_enumerate'));
30 | $this->ipcon->registerCallback(IPConnection::CALLBACK_CONNECTED,
31 | array($this, 'cb_connected'));
32 |
33 | while(true) {
34 | try {
35 | $this->ipcon->enumerate();
36 | break;
37 | } catch(Exception $e) {
38 | sleep(1);
39 | }
40 | }
41 | }
42 |
43 | function cb_interrupt($changed, $value)
44 | {
45 | echo "Fire! Fire!\n";
46 | }
47 |
48 | function cb_enumerate($uid, $connectedUid, $position, $hardwareVersion,
49 | $firmwareVersion, $deviceIdentifier, $enumerationType)
50 | {
51 | if($enumerationType == IPConnection::ENUMERATION_TYPE_CONNECTED ||
52 | $enumerationType == IPConnection::ENUMERATION_TYPE_AVAILABLE) {
53 | if($deviceIdentifier == BrickletIndustrialDigitalIn4V2::DEVICE_IDENTIFIER) {
54 | try {
55 | $this->brickletIndustrialDigitalIn4V2 = new BrickletIndustrialDigitalIn4V2($uid, $this->ipcon);
56 | $this->brickletIndustrialDigitalIn4V2->setAllValueCallbackConfiguration(10000, True);
57 | $this->brickletIndustrialDigitalIn4V2->registerCallback(BrickletIndustrialDigitalIn4V2::CALLBACK_ALL_VALUE,
58 | array($this, 'cb_interrupt'));
59 | echo "Industrial Digital In 4 V2 initialized\n";
60 | } catch(Exception $e) {
61 | $this->BrickletIndustrialDigitalIn4V2 = null;
62 | echo "Industrial Digital In 4 V2 init failed: $e\n";
63 | }
64 | }
65 | }
66 | }
67 |
68 | function cb_connected($connectedReason)
69 | {
70 | if($connectedReason == IPConnection::CONNECT_REASON_AUTO_RECONNECT) {
71 | echo "Auto Reconnect\n";
72 |
73 | while(true) {
74 | try {
75 | $this->ipcon->enumerate();
76 | break;
77 | } catch(Exception $e) {
78 | sleep(1);
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
85 | $smokeDetector = new SmokeDetector();
86 | echo "Press ctrl+c to exit\n";
87 | $smokeDetector->ipcon->dispatchCallbacks(-1);
88 |
89 | ?>
90 |
--------------------------------------------------------------------------------
/smoke_detector/php/SmokeDetector.php:
--------------------------------------------------------------------------------
1 | ipcon = new IPConnection();
17 | $this->brickletIndustrialDigitalIn4 = null;
18 |
19 | while(true) {
20 | try {
21 | $this->ipcon->connect(self::HOST, self::PORT);
22 | break;
23 | } catch(Exception $e) {
24 | sleep(1);
25 | }
26 | }
27 |
28 | $this->ipcon->registerCallback(IPConnection::CALLBACK_ENUMERATE,
29 | array($this, 'cb_enumerate'));
30 | $this->ipcon->registerCallback(IPConnection::CALLBACK_CONNECTED,
31 | array($this, 'cb_connected'));
32 |
33 | while(true) {
34 | try {
35 | $this->ipcon->enumerate();
36 | break;
37 | } catch(Exception $e) {
38 | sleep(1);
39 | }
40 | }
41 | }
42 |
43 | function cb_interrupt($interruptMask, $valueMask)
44 | {
45 | if ($valueMask > 0) {
46 | echo "Fire! Fire!\n";
47 | }
48 | }
49 |
50 | function cb_enumerate($uid, $connectedUid, $position, $hardwareVersion,
51 | $firmwareVersion, $deviceIdentifier, $enumerationType)
52 | {
53 | if($enumerationType == IPConnection::ENUMERATION_TYPE_CONNECTED ||
54 | $enumerationType == IPConnection::ENUMERATION_TYPE_AVAILABLE) {
55 | if($deviceIdentifier == BrickletIndustrialDigitalIn4::DEVICE_IDENTIFIER) {
56 | try {
57 | $this->brickletIndustrialDigitalIn4 = new BrickletIndustrialDigitalIn4($uid, $this->ipcon);
58 | $this->brickletIndustrialDigitalIn4->setDebouncePeriod(10000);
59 | $this->brickletIndustrialDigitalIn4->setInterrupt(15);
60 | $this->brickletIndustrialDigitalIn4->registerCallback(BrickletIndustrialDigitalIn4::CALLBACK_INTERRUPT,
61 | array($this, 'cb_interrupt'));
62 | echo "Industrial Digital In 4 initialized\n";
63 | } catch(Exception $e) {
64 | $this->brickletIndustrialDigitalIn4 = null;
65 | echo "Industrial Digital In 4 init failed: $e\n";
66 | }
67 | }
68 | }
69 | }
70 |
71 | function cb_connected($connectedReason)
72 | {
73 | if($connectedReason == IPConnection::CONNECT_REASON_AUTO_RECONNECT) {
74 | echo "Auto Reconnect\n";
75 |
76 | while(true) {
77 | try {
78 | $this->ipcon->enumerate();
79 | break;
80 | } catch(Exception $e) {
81 | sleep(1);
82 | }
83 | }
84 | }
85 | }
86 | }
87 |
88 | $smokeDetector = new SmokeDetector();
89 | echo "Press ctrl+c to exit\n";
90 | $smokeDetector->ipcon->dispatchCallbacks(-1);
91 |
92 | ?>
93 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/windows_phone/GarageControl/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/smoke_detector_v2/csharp/SmokeDetectorV2.cs:
--------------------------------------------------------------------------------
1 | using Tinkerforge;
2 |
3 | class SmokeDetectorV2
4 | {
5 | private static string HOST = "localhost";
6 | private static int PORT = 4223;
7 |
8 | private static IPConnection ipcon = null;
9 | private static BrickletIndustrialDigitalIn4V2 brickletIndustrialDigitalIn4V2 = null;
10 |
11 | static void InterruptCB(BrickletIndustrialDigitalIn4V2 sender, bool[] changed, bool[] value)
12 | {
13 | System.Console.WriteLine("Fire! Fire!");
14 | }
15 |
16 | static void EnumerateCB(IPConnection sender, string UID, string connectedUID, char position,
17 | short[] hardwareVersion, short[] firmwareVersion,
18 | int deviceIdentifier, short enumerationType)
19 | {
20 | if(enumerationType == IPConnection.ENUMERATION_TYPE_CONNECTED ||
21 | enumerationType == IPConnection.ENUMERATION_TYPE_AVAILABLE)
22 | {
23 | if(deviceIdentifier == BrickletIndustrialDigitalIn4V2.DEVICE_IDENTIFIER)
24 | {
25 | try
26 | {
27 | brickletIndustrialDigitalIn4V2 = new BrickletIndustrialDigitalIn4V2(UID, ipcon);
28 | brickletIndustrialDigitalIn4V2.SetAllValueCallbackConfiguration(10000, true);
29 | brickletIndustrialDigitalIn4V2.AllValueCallback += InterruptCB;
30 | System.Console.WriteLine("Industrial Digital In 4 V2 initialized");
31 | }
32 | catch(TinkerforgeException e)
33 | {
34 | System.Console.WriteLine("Industrial Digital In 4 V2 init failed: " + e.Message);
35 | brickletIndustrialDigitalIn4V2 = null;
36 | }
37 | }
38 | }
39 | }
40 |
41 | static void ConnectedCB(IPConnection sender, short connectedReason)
42 | {
43 | if(connectedReason == IPConnection.CONNECT_REASON_AUTO_RECONNECT)
44 | {
45 | System.Console.WriteLine("Auto Reconnect");
46 |
47 | while(true)
48 | {
49 | try
50 | {
51 | ipcon.Enumerate();
52 | break;
53 | }
54 | catch(NotConnectedException e)
55 | {
56 | System.Console.WriteLine("Enumeration Error: " + e.Message);
57 | System.Threading.Thread.Sleep(1000);
58 | }
59 | }
60 | }
61 | }
62 |
63 | static void Main()
64 | {
65 | ipcon = new IPConnection();
66 | while(true)
67 | {
68 | try
69 | {
70 | ipcon.Connect(HOST, PORT);
71 | break;
72 | }
73 | catch(System.Net.Sockets.SocketException e)
74 | {
75 | System.Console.WriteLine("Connection Error: " + e.Message);
76 | System.Threading.Thread.Sleep(1000);
77 | }
78 | }
79 |
80 | ipcon.EnumerateCallback += EnumerateCB;
81 | ipcon.Connected += ConnectedCB;
82 |
83 | while(true)
84 | {
85 | try
86 | {
87 | ipcon.Enumerate();
88 | break;
89 | }
90 | catch(NotConnectedException e)
91 | {
92 | System.Console.WriteLine("Enumeration Error: " + e.Message);
93 | System.Threading.Thread.Sleep(1000);
94 | }
95 | }
96 |
97 | System.Console.WriteLine("Press enter to exit");
98 | System.Console.ReadLine();
99 | ipcon.Disconnect();
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/smoke_detector/csharp/SmokeDetector.cs:
--------------------------------------------------------------------------------
1 | using Tinkerforge;
2 |
3 | class SmokeDetector
4 | {
5 | private static string HOST = "localhost";
6 | private static int PORT = 4223;
7 |
8 | private static IPConnection ipcon = null;
9 | private static BrickletIndustrialDigitalIn4 brickletIndustrialDigitalIn4 = null;
10 |
11 | static void InterruptCB(BrickletIndustrialDigitalIn4 sender, int interruptMask, int valueMask)
12 | {
13 | if(valueMask > 0) {
14 | System.Console.WriteLine("Fire! Fire!");
15 | }
16 | }
17 |
18 | static void EnumerateCB(IPConnection sender, string UID, string connectedUID, char position,
19 | short[] hardwareVersion, short[] firmwareVersion,
20 | int deviceIdentifier, short enumerationType)
21 | {
22 | if(enumerationType == IPConnection.ENUMERATION_TYPE_CONNECTED ||
23 | enumerationType == IPConnection.ENUMERATION_TYPE_AVAILABLE)
24 | {
25 | if(deviceIdentifier == BrickletIndustrialDigitalIn4.DEVICE_IDENTIFIER)
26 | {
27 | try
28 | {
29 | brickletIndustrialDigitalIn4 = new BrickletIndustrialDigitalIn4(UID, ipcon);
30 | brickletIndustrialDigitalIn4.SetDebouncePeriod(10000);
31 | brickletIndustrialDigitalIn4.SetInterrupt(15);
32 | brickletIndustrialDigitalIn4.Interrupt += InterruptCB;
33 | System.Console.WriteLine("Industrial Digital In 4 initialized");
34 | }
35 | catch(TinkerforgeException e)
36 | {
37 | System.Console.WriteLine("Industrial Digital In 4 init failed: " + e.Message);
38 | brickletIndustrialDigitalIn4 = null;
39 | }
40 | }
41 | }
42 | }
43 |
44 | static void ConnectedCB(IPConnection sender, short connectedReason)
45 | {
46 | if(connectedReason == IPConnection.CONNECT_REASON_AUTO_RECONNECT)
47 | {
48 | System.Console.WriteLine("Auto Reconnect");
49 |
50 | while(true)
51 | {
52 | try
53 | {
54 | ipcon.Enumerate();
55 | break;
56 | }
57 | catch(NotConnectedException e)
58 | {
59 | System.Console.WriteLine("Enumeration Error: " + e.Message);
60 | System.Threading.Thread.Sleep(1000);
61 | }
62 | }
63 | }
64 | }
65 |
66 | static void Main()
67 | {
68 | ipcon = new IPConnection();
69 | while(true)
70 | {
71 | try
72 | {
73 | ipcon.Connect(HOST, PORT);
74 | break;
75 | }
76 | catch(System.Net.Sockets.SocketException e)
77 | {
78 | System.Console.WriteLine("Connection Error: " + e.Message);
79 | System.Threading.Thread.Sleep(1000);
80 | }
81 | }
82 |
83 | ipcon.EnumerateCallback += EnumerateCB;
84 | ipcon.Connected += ConnectedCB;
85 |
86 | while(true)
87 | {
88 | try
89 | {
90 | ipcon.Enumerate();
91 | break;
92 | }
93 | catch(NotConnectedException e)
94 | {
95 | System.Console.WriteLine("Enumeration Error: " + e.Message);
96 | System.Threading.Thread.Sleep(1000);
97 | }
98 | }
99 |
100 | System.Console.WriteLine("Press enter to exit");
101 | System.Console.ReadLine();
102 | ipcon.Disconnect();
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/power_outlet_control_smart_phone/windows_phone/PowerOutletControl/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/smoke_detector_v2/c/smoke_detector_v2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_digital_in_4_v2.h"
5 |
6 | #define HOST "localhost"
7 | #define PORT 4223
8 |
9 | typedef struct {
10 | IPConnection ipcon;
11 | IndustrialDigitalIn4V2 idi4;
12 | } SmokeDetectorV2;
13 |
14 | void cb_interrupt(uint8_t *changed, uint8_t *value, void *user_data) {
15 | // avoid unused parameter warning
16 | (void)user_data;
17 |
18 | printf("Fire! Fire!\n");
19 | }
20 |
21 | void cb_connected(uint8_t connected_reason, void *user_data) {
22 | SmokeDetectorV2 *sd = (SmokeDetectorV2 *)user_data;
23 |
24 | if(connected_reason == IPCON_CONNECT_REASON_AUTO_RECONNECT) {
25 | printf("Auto Reconnect\n");
26 |
27 | while(true) {
28 | int rc = ipcon_enumerate(&sd->ipcon);
29 | if(rc < 0) {
30 | fprintf(stderr, "Could not enumerate: %d\n", rc);
31 | // TODO: sleep 1s
32 | continue;
33 | }
34 | break;
35 | }
36 | }
37 | }
38 |
39 | void cb_enumerate(const char *uid, const char *connected_uid,
40 | char position, uint8_t hardware_version[3],
41 | uint8_t firmware_version[3], uint16_t device_identifier,
42 | uint8_t enumeration_type, void *user_data) {
43 | SmokeDetectorV2 *sd = (SmokeDetectorV2 *)user_data;
44 |
45 | // avoid unused parameter warning
46 | (void)connected_uid; (void)position; (void)hardware_version; (void)firmware_version;
47 |
48 | if(enumeration_type == IPCON_ENUMERATION_TYPE_CONNECTED ||
49 | enumeration_type == IPCON_ENUMERATION_TYPE_AVAILABLE) {
50 | if(device_identifier == INDUSTRIAL_DIGITAL_IN_4_V2_DEVICE_IDENTIFIER) {
51 | industrial_digital_in_4_v2_create(&sd->idi4, uid, &sd->ipcon);
52 | industrial_digital_in_4_v2_register_callback(&sd->idi4,
53 | INDUSTRIAL_DIGITAL_IN_4_V2_CALLBACK_ALL_VALUE,
54 | (void *)cb_interrupt,
55 | (void *)sd);
56 | int rc = industrial_digital_in_4_v2_set_all_value_callback_configuration(&sd->idi4, 10000, true);
57 |
58 | if(rc < 0) {
59 | fprintf(stderr, "Industrial Digital In 4 V2 init failed: %d\n", rc);
60 | } else {
61 | printf("Industrial Digital In 4 V2 initialized\n");
62 | }
63 | }
64 | }
65 | }
66 |
67 | int main(void) {
68 | SmokeDetectorV2 sd;
69 |
70 | ipcon_create(&sd.ipcon);
71 |
72 | while(true) {
73 | int rc = ipcon_connect(&sd.ipcon, HOST, PORT);
74 | if(rc < 0) {
75 | fprintf(stderr, "Could not connect to brickd: %d\n", rc);
76 | // TODO: sleep 1s
77 | continue;
78 | }
79 | break;
80 | }
81 |
82 | ipcon_register_callback(&sd.ipcon,
83 | IPCON_CALLBACK_ENUMERATE,
84 | (void *)cb_enumerate,
85 | (void *)&sd);
86 |
87 | ipcon_register_callback(&sd.ipcon,
88 | IPCON_CALLBACK_CONNECTED,
89 | (void *)cb_connected,
90 | (void *)&sd);
91 |
92 | while(true) {
93 | int rc = ipcon_enumerate(&sd.ipcon);
94 | if(rc < 0) {
95 | fprintf(stderr, "Could not enumerate: %d\n", rc);
96 | // TODO: sleep 1s
97 | continue;
98 | }
99 | break;
100 | }
101 |
102 | printf("Press key to exit\n");
103 | getchar();
104 | ipcon_destroy(&sd.ipcon);
105 | return 0;
106 | }
107 |
--------------------------------------------------------------------------------
/smoke_detector_v2/java/SmokeDetectorV2.java:
--------------------------------------------------------------------------------
1 | import com.tinkerforge.IPConnection;
2 | import com.tinkerforge.BrickletIndustrialDigitalIn4V2;
3 |
4 | class SmokeListener implements IPConnection.EnumerateListener,
5 | IPConnection.ConnectedListener,
6 | BrickletIndustrialDigitalIn4V2.AllValueListener {
7 | private IPConnection ipcon = null;
8 | private BrickletIndustrialDigitalIn4V2 brickletIndustrialDigitalIn4 = null;
9 |
10 | public SmokeListener(IPConnection ipcon) {
11 | this.ipcon = ipcon;
12 | }
13 |
14 | public void allValue(boolean[] changed, boolean[] value) {
15 | System.out.println("Fire! Fire!");
16 | }
17 |
18 | public void enumerate(String uid, String connectedUid, char position,
19 | short[] hardwareVersion, short[] firmwareVersion,
20 | int deviceIdentifier, short enumerationType) {
21 | if(enumerationType == IPConnection.ENUMERATION_TYPE_CONNECTED ||
22 | enumerationType == IPConnection.ENUMERATION_TYPE_AVAILABLE) {
23 | if(deviceIdentifier == BrickletIndustrialDigitalIn4V2.DEVICE_IDENTIFIER) {
24 | try {
25 | brickletIndustrialDigitalIn4 = new BrickletIndustrialDigitalIn4V2(uid, ipcon);
26 | brickletIndustrialDigitalIn4.setAllValueCallbackConfiguration(10000, true);
27 | brickletIndustrialDigitalIn4.addAllValueListener(this);
28 | System.out.println("Industrial Digital In 4 V2 initialized");
29 | } catch(com.tinkerforge.TinkerforgeException e) {
30 | brickletIndustrialDigitalIn4 = null;
31 | System.out.println("Industrial Digital In 4 V2 init failed: " + e);
32 | }
33 | }
34 | }
35 | }
36 |
37 | public void connected(short connectedReason) {
38 | if(connectedReason == IPConnection.CONNECT_REASON_AUTO_RECONNECT) {
39 | System.out.println("Auto Reconnect");
40 |
41 | while(true) {
42 | try {
43 | ipcon.enumerate();
44 | break;
45 | } catch(com.tinkerforge.NotConnectedException e) {
46 | }
47 |
48 | try {
49 | Thread.sleep(1000);
50 | } catch(InterruptedException ei) {
51 | }
52 | }
53 | }
54 | }
55 | }
56 |
57 | public class SmokeDetectorV2 {
58 | private static final String HOST = "localhost";
59 | private static final int PORT = 4223;
60 | private static IPConnection ipcon = null;
61 | private static SmokeListener smokeListener = null;
62 |
63 | public static void main(String args[]) {
64 | ipcon = new IPConnection();
65 |
66 | while(true) {
67 | try {
68 | ipcon.connect(HOST, PORT);
69 | break;
70 | } catch(com.tinkerforge.TinkerforgeException e) {
71 | }
72 |
73 | try {
74 | Thread.sleep(1000);
75 | } catch(InterruptedException ei) {
76 | }
77 | }
78 |
79 | smokeListener = new SmokeListener(ipcon);
80 | ipcon.addEnumerateListener(smokeListener);
81 | ipcon.addConnectedListener(smokeListener);
82 |
83 | while(true) {
84 | try {
85 | ipcon.enumerate();
86 | break;
87 | } catch(com.tinkerforge.NotConnectedException e) {
88 | }
89 |
90 | try {
91 | Thread.sleep(1000);
92 | } catch(InterruptedException ei) {
93 | }
94 | }
95 |
96 | try {
97 | System.out.println("Press key to exit"); System.in.read();
98 | } catch(java.io.IOException e) {
99 | }
100 |
101 | try {
102 | ipcon.disconnect();
103 | } catch(com.tinkerforge.NotConnectedException e) {
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
18 |
19 |
25 |
26 |
34 |
35 |
41 |
42 |
50 |
51 |
57 |
58 |
66 |
67 |
74 |
75 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/smoke_detector_v2/python/smoke_detector_v2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import socket
5 | import sys
6 | import time
7 | import math
8 | import logging as log
9 | log.basicConfig(level=log.INFO)
10 |
11 | from tinkerforge.ip_connection import IPConnection
12 | from tinkerforge.ip_connection import Error
13 | from tinkerforge.bricklet_industrial_digital_in_4_v2 import IndustrialDigitalIn4V2
14 |
15 |
16 | class SmokeDetector:
17 | HOST = 'localhost'
18 | PORT = 4223
19 |
20 | ipcon = None
21 | idi4 = None
22 |
23 | def __init__(self):
24 | self.ipcon = IPConnection()
25 | while True:
26 | try:
27 | self.ipcon.connect(SmokeDetector.HOST, SmokeDetector.PORT)
28 | break
29 | except Error as e:
30 | log.error('Connection Error: ' + str(e.description))
31 | time.sleep(1)
32 | except socket.error as e:
33 | log.error('Socket error: ' + str(e))
34 | time.sleep(1)
35 |
36 | self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
37 | self.cb_enumerate)
38 | self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
39 | self.cb_connected)
40 |
41 | while True:
42 | try:
43 | self.ipcon.enumerate()
44 | break
45 | except Error as e:
46 | log.error('Enumerate Error: ' + str(e.description))
47 | time.sleep(1)
48 |
49 | def cb_interrupt(self, changed, value):
50 | log.warn('Fire! Fire!')
51 |
52 | def cb_enumerate(self, uid, connected_uid, position, hardware_version,
53 | firmware_version, device_identifier, enumeration_type):
54 | if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
55 | enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
56 | if device_identifier == IndustrialDigitalIn4V2.DEVICE_IDENTIFIER:
57 | try:
58 | self.idi4 = IndustrialDigitalIn4V2(uid, self.ipcon)
59 | self.idi4.set_all_value_callback_configuration(10000, True)
60 | self.idi4.register_callback(IndustrialDigitalIn4V2.CALLBACK_ALL_VALUE,
61 | self.cb_interrupt)
62 | log.info('Industrial Digital In 4 V2 initialized')
63 | except Error as e:
64 | log.error('Industrial Digital In 4 V2 init failed: ' + str(e.description))
65 | self.idi4 = None
66 |
67 | def cb_connected(self, connected_reason):
68 | if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
69 | log.info('Auto Reconnect')
70 |
71 | while True:
72 | try:
73 | self.ipcon.enumerate()
74 | break
75 | except Error as e:
76 | log.error('Enumerate Error: ' + str(e.description))
77 | time.sleep(1)
78 |
79 | if __name__ == "__main__":
80 | log.info('Smoke Detector: Start')
81 |
82 | smoke_detector = SmokeDetector()
83 |
84 | if sys.version_info < (3, 0):
85 | input = raw_input # Compatibility for Python 2.x
86 | input('Press key to exit\n')
87 |
88 | if smoke_detector.ipcon != None:
89 | smoke_detector.ipcon.disconnect()
90 |
91 | log.info('Smoke Detector: End')
92 |
--------------------------------------------------------------------------------
/garage_control_smart_phone/android/GarageControl_Studio/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
18 |
19 |
25 |
26 |
34 |
35 |
41 |
42 |
50 |
51 |
57 |
58 |
66 |
67 |
74 |
75 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/smoke_detector/java/SmokeDetector.java:
--------------------------------------------------------------------------------
1 | import com.tinkerforge.IPConnection;
2 | import com.tinkerforge.BrickletIndustrialDigitalIn4;
3 |
4 | class SmokeListener implements IPConnection.EnumerateListener,
5 | IPConnection.ConnectedListener,
6 | BrickletIndustrialDigitalIn4.InterruptListener {
7 | private IPConnection ipcon = null;
8 | private BrickletIndustrialDigitalIn4 brickletIndustrialDigitalIn4 = null;
9 |
10 | public SmokeListener(IPConnection ipcon) {
11 | this.ipcon = ipcon;
12 | }
13 |
14 | public void interrupt(int interruptMask, int valueMask) {
15 | if(valueMask > 0) {
16 | System.out.println("Fire! Fire!");
17 | }
18 | }
19 |
20 | public void enumerate(String uid, String connectedUid, char position,
21 | short[] hardwareVersion, short[] firmwareVersion,
22 | int deviceIdentifier, short enumerationType) {
23 | if(enumerationType == IPConnection.ENUMERATION_TYPE_CONNECTED ||
24 | enumerationType == IPConnection.ENUMERATION_TYPE_AVAILABLE) {
25 | if(deviceIdentifier == BrickletIndustrialDigitalIn4.DEVICE_IDENTIFIER) {
26 | try {
27 | brickletIndustrialDigitalIn4 = new BrickletIndustrialDigitalIn4(uid, ipcon);
28 | brickletIndustrialDigitalIn4.setDebouncePeriod(10000);
29 | brickletIndustrialDigitalIn4.setInterrupt(15);
30 | brickletIndustrialDigitalIn4.addInterruptListener(this);
31 | System.out.println("Industrial Digital In 4 initialized");
32 | } catch(com.tinkerforge.TinkerforgeException e) {
33 | brickletIndustrialDigitalIn4 = null;
34 | System.out.println("Industrial Digital In 4 init failed: " + e);
35 | }
36 | }
37 | }
38 | }
39 |
40 | public void connected(short connectedReason) {
41 | if(connectedReason == IPConnection.CONNECT_REASON_AUTO_RECONNECT) {
42 | System.out.println("Auto Reconnect");
43 |
44 | while(true) {
45 | try {
46 | ipcon.enumerate();
47 | break;
48 | } catch(com.tinkerforge.NotConnectedException e) {
49 | }
50 |
51 | try {
52 | Thread.sleep(1000);
53 | } catch(InterruptedException ei) {
54 | }
55 | }
56 | }
57 | }
58 | }
59 |
60 | public class SmokeDetector {
61 | private static final String HOST = "localhost";
62 | private static final int PORT = 4223;
63 | private static IPConnection ipcon = null;
64 | private static SmokeListener smokeListener = null;
65 |
66 | public static void main(String args[]) {
67 | ipcon = new IPConnection();
68 |
69 | while(true) {
70 | try {
71 | ipcon.connect(HOST, PORT);
72 | break;
73 | } catch(com.tinkerforge.TinkerforgeException e) {
74 | }
75 |
76 | try {
77 | Thread.sleep(1000);
78 | } catch(InterruptedException ei) {
79 | }
80 | }
81 |
82 | smokeListener = new SmokeListener(ipcon);
83 | ipcon.addEnumerateListener(smokeListener);
84 | ipcon.addConnectedListener(smokeListener);
85 |
86 | while(true) {
87 | try {
88 | ipcon.enumerate();
89 | break;
90 | } catch(com.tinkerforge.NotConnectedException e) {
91 | }
92 |
93 | try {
94 | Thread.sleep(1000);
95 | } catch(InterruptedException ei) {
96 | }
97 | }
98 |
99 | try {
100 | System.out.println("Press key to exit"); System.in.read();
101 | } catch(java.io.IOException e) {
102 | }
103 |
104 | try {
105 | ipcon.disconnect();
106 | } catch(com.tinkerforge.NotConnectedException e) {
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/smoke_detector/c/smoke_detector.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "ip_connection.h"
4 | #include "bricklet_industrial_digital_in_4.h"
5 |
6 | #define HOST "localhost"
7 | #define PORT 4223
8 |
9 | typedef struct {
10 | IPConnection ipcon;
11 | IndustrialDigitalIn4 idi4;
12 | } SmokeDetector;
13 |
14 | void cb_interrupt(uint16_t interrupt_mask, uint16_t value_mask, void *user_data) {
15 | // avoid unused parameter warning
16 | (void)interrupt_mask; (void)user_data;
17 |
18 | if(value_mask > 0) {
19 | printf("Fire! Fire!\n");
20 | }
21 | }
22 |
23 | void cb_connected(uint8_t connected_reason, void *user_data) {
24 | SmokeDetector *sd = (SmokeDetector *)user_data;
25 |
26 | if(connected_reason == IPCON_CONNECT_REASON_AUTO_RECONNECT) {
27 | printf("Auto Reconnect\n");
28 |
29 | while(true) {
30 | int rc = ipcon_enumerate(&sd->ipcon);
31 | if(rc < 0) {
32 | fprintf(stderr, "Could not enumerate: %d\n", rc);
33 | // TODO: sleep 1s
34 | continue;
35 | }
36 | break;
37 | }
38 | }
39 | }
40 |
41 | void cb_enumerate(const char *uid, const char *connected_uid,
42 | char position, uint8_t hardware_version[3],
43 | uint8_t firmware_version[3], uint16_t device_identifier,
44 | uint8_t enumeration_type, void *user_data) {
45 | SmokeDetector *sd = (SmokeDetector *)user_data;
46 |
47 | // avoid unused parameter warning
48 | (void)connected_uid; (void)position; (void)hardware_version; (void)firmware_version;
49 |
50 | if(enumeration_type == IPCON_ENUMERATION_TYPE_CONNECTED ||
51 | enumeration_type == IPCON_ENUMERATION_TYPE_AVAILABLE) {
52 | if(device_identifier == INDUSTRIAL_DIGITAL_IN_4_DEVICE_IDENTIFIER) {
53 | industrial_digital_in_4_create(&sd->idi4, uid, &sd->ipcon);
54 | industrial_digital_in_4_set_debounce_period(&sd->idi4, 10000);
55 | industrial_digital_in_4_register_callback(&sd->idi4,
56 | INDUSTRIAL_DIGITAL_IN_4_CALLBACK_INTERRUPT,
57 | (void (*)(void))cb_interrupt,
58 | (void *)sd);
59 |
60 | int rc = industrial_digital_in_4_set_interrupt(&sd->idi4, 15);
61 | if(rc < 0) {
62 | fprintf(stderr, "Industrial Digital In 4 init failed: %d\n", rc);
63 | } else {
64 | printf("Industrial Digital In 4 initialized\n");
65 | }
66 | }
67 | }
68 | }
69 |
70 | int main(void) {
71 | SmokeDetector sd;
72 |
73 | ipcon_create(&sd.ipcon);
74 |
75 | while(true) {
76 | int rc = ipcon_connect(&sd.ipcon, HOST, PORT);
77 | if(rc < 0) {
78 | fprintf(stderr, "Could not connect to brickd: %d\n", rc);
79 | // TODO: sleep 1s
80 | continue;
81 | }
82 | break;
83 | }
84 |
85 | ipcon_register_callback(&sd.ipcon,
86 | IPCON_CALLBACK_ENUMERATE,
87 | (void (*)(void))cb_enumerate,
88 | (void *)&sd);
89 |
90 | ipcon_register_callback(&sd.ipcon,
91 | IPCON_CALLBACK_CONNECTED,
92 | (void (*)(void))cb_connected,
93 | (void *)&sd);
94 |
95 | while(true) {
96 | int rc = ipcon_enumerate(&sd.ipcon);
97 | if(rc < 0) {
98 | fprintf(stderr, "Could not enumerate: %d\n", rc);
99 | // TODO: sleep 1s
100 | continue;
101 | }
102 | break;
103 | }
104 |
105 | printf("Press key to exit\n");
106 | getchar();
107 | ipcon_destroy(&sd.ipcon);
108 | return 0;
109 | }
110 |
--------------------------------------------------------------------------------
/smoke_detector_v2/vbnet/SmokeDetectorV2.vb:
--------------------------------------------------------------------------------
1 | Imports Tinkerforge
2 |
3 | Module SmokeDetector
4 | Const HOST As String = "localhost"
5 | Const PORT As Integer = 4223
6 |
7 | Private ipcon As IPConnection = Nothing
8 | Private brickletIndustrialDigitalIn4 As BrickletIndustrialDigitalIn4V2 = Nothing
9 |
10 | Sub InterruptCB(ByVal sender As BrickletIndustrialDigitalIn4V2, _
11 | ByVal changed() As Boolean, ByVal value() As Boolean)
12 | System.Console.WriteLine("Fire! Fire!")
13 | End Sub
14 |
15 | Sub EnumerateCB(ByVal sender As IPConnection, ByVal uid As String, _
16 | ByVal connectedUid As String, ByVal position As Char, _
17 | ByVal hardwareVersion() As Short, ByVal firmwareVersion() As Short, _
18 | ByVal deviceIdentifier As Integer, ByVal enumerationType As Short)
19 | If enumerationType = IPConnection.ENUMERATION_TYPE_CONNECTED Or _
20 | enumerationType = IPConnection.ENUMERATION_TYPE_AVAILABLE Then
21 | If deviceIdentifier = BrickletIndustrialDigitalIn4V2.DEVICE_IDENTIFIER Then
22 | Try
23 | brickletIndustrialDigitalIn4 = New BrickletIndustrialDigitalIn4V2(UID, ipcon)
24 | brickletIndustrialDigitalIn4.SetAllValueCallbackConfiguration(10000, true)
25 | AddHandler brickletIndustrialDigitalIn4.AllValueCallback, AddressOf InterruptCB
26 | System.Console.WriteLine("Industrial Digital In 4 V2 initialized")
27 | Catch e As TinkerforgeException
28 | System.Console.WriteLine("Industrial Digital In 4 V2 init failed: " + e.Message)
29 | brickletIndustrialDigitalIn4 = Nothing
30 | End Try
31 | End If
32 | End If
33 | End Sub
34 |
35 | Sub ConnectedCB(ByVal sender As IPConnection, ByVal connectedReason as Short)
36 | If connectedReason = IPConnection.CONNECT_REASON_AUTO_RECONNECT Then
37 | System.Console.WriteLine("Auto Reconnect")
38 | while True
39 | Try
40 | ipcon.Enumerate()
41 | Exit While
42 | Catch e As NotConnectedException
43 | System.Console.WriteLine("Enumeration Error: " + e.Message)
44 | System.Threading.Thread.Sleep(1000)
45 | End Try
46 | End While
47 | End If
48 | End Sub
49 |
50 | Sub Main()
51 | ipcon = New IPConnection()
52 | while True
53 | Try
54 | ipcon.Connect(HOST, PORT)
55 | Exit While
56 | Catch e As System.Net.Sockets.SocketException
57 | System.Console.WriteLine("Connection Error: " + e.Message)
58 | System.Threading.Thread.Sleep(1000)
59 | End Try
60 | End While
61 |
62 | AddHandler ipcon.EnumerateCallback, AddressOf EnumerateCB
63 | AddHandler ipcon.Connected, AddressOf ConnectedCB
64 |
65 | while True
66 | try
67 | ipcon.Enumerate()
68 | Exit While
69 | Catch e As NotConnectedException
70 | System.Console.WriteLine("Enumeration Error: " + e.Message)
71 | System.Threading.Thread.Sleep(1000)
72 | End Try
73 | End While
74 |
75 | System.Console.WriteLine("Press key to exit")
76 | System.Console.ReadLine()
77 | ipcon.Disconnect()
78 | End Sub
79 | End Module
80 |
--------------------------------------------------------------------------------
/smoke_detector/python/smoke_detector.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import socket
5 | import sys
6 | import time
7 | import math
8 | import logging as log
9 | log.basicConfig(level=log.INFO)
10 |
11 | from tinkerforge.ip_connection import IPConnection
12 | from tinkerforge.ip_connection import Error
13 | from tinkerforge.bricklet_industrial_digital_in_4 import IndustrialDigitalIn4
14 |
15 |
16 | class SmokeDetector:
17 | HOST = 'localhost'
18 | PORT = 4223
19 |
20 | ipcon = None
21 | idi4 = None
22 |
23 | def __init__(self):
24 | self.ipcon = IPConnection()
25 | while True:
26 | try:
27 | self.ipcon.connect(SmokeDetector.HOST, SmokeDetector.PORT)
28 | break
29 | except Error as e:
30 | log.error('Connection Error: ' + str(e.description))
31 | time.sleep(1)
32 | except socket.error as e:
33 | log.error('Socket error: ' + str(e))
34 | time.sleep(1)
35 |
36 | self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
37 | self.cb_enumerate)
38 | self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
39 | self.cb_connected)
40 |
41 | while True:
42 | try:
43 | self.ipcon.enumerate()
44 | break
45 | except Error as e:
46 | log.error('Enumerate Error: ' + str(e.description))
47 | time.sleep(1)
48 |
49 | def cb_interrupt(self, interrupt_mask, value_mask):
50 | if value_mask > 0:
51 | log.warn('Fire! Fire!')
52 |
53 | def cb_enumerate(self, uid, connected_uid, position, hardware_version,
54 | firmware_version, device_identifier, enumeration_type):
55 | if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
56 | enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
57 | if device_identifier == IndustrialDigitalIn4.DEVICE_IDENTIFIER:
58 | try:
59 | self.idi4 = IndustrialDigitalIn4(uid, self.ipcon)
60 | self.idi4.set_debounce_period(10000)
61 | self.idi4.set_interrupt(15)
62 | self.idi4.register_callback(IndustrialDigitalIn4.CALLBACK_INTERRUPT,
63 | self.cb_interrupt)
64 | log.info('Industrial Digital In 4 initialized')
65 | except Error as e:
66 | log.error('Industrial Digital In 4 init failed: ' + str(e.description))
67 | self.idi4 = None
68 |
69 | def cb_connected(self, connected_reason):
70 | if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
71 | log.info('Auto Reconnect')
72 |
73 | while True:
74 | try:
75 | self.ipcon.enumerate()
76 | break
77 | except Error as e:
78 | log.error('Enumerate Error: ' + str(e.description))
79 | time.sleep(1)
80 |
81 | if __name__ == "__main__":
82 | log.info('Smoke Detector: Start')
83 |
84 | smoke_detector = SmokeDetector()
85 |
86 | if sys.version_info < (3, 0):
87 | input = raw_input # Compatibility for Python 2.x
88 | input('Press key to exit\n')
89 |
90 | if smoke_detector.ipcon != None:
91 | smoke_detector.ipcon.disconnect()
92 |
93 | log.info('Smoke Detector: End')
94 |
--------------------------------------------------------------------------------
/doorbell_notifier_v2/python/doorbell_notifier_v2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import socket
5 | import sys
6 | import time
7 | import math
8 | import logging as log
9 | log.basicConfig(level=log.INFO)
10 |
11 | from tinkerforge.ip_connection import IPConnection
12 | from tinkerforge.ip_connection import Error
13 | from tinkerforge.bricklet_industrial_digital_in_4_v2 import IndustrialDigitalIn4V2
14 |
15 | class DoorbellNotifier:
16 | HOST = 'localhost'
17 | PORT = 4223
18 | ipcon = None
19 | idi4 = None
20 |
21 | def __init__(self):
22 | self.ipcon = IPConnection()
23 | while True:
24 | try:
25 | self.ipcon.connect(DoorbellNotifier.HOST, DoorbellNotifier.PORT)
26 | break
27 | except Error as e:
28 | log.error('Connection Error: ' + str(e.description))
29 | time.sleep(1)
30 | except socket.error as e:
31 | log.error('Socket error: ' + str(e))
32 | time.sleep(1)
33 |
34 | self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
35 | self.cb_enumerate)
36 | self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
37 | self.cb_connected)
38 |
39 | while True:
40 | try:
41 | self.ipcon.enumerate()
42 | break
43 | except Error as e:
44 | log.error('Enumerate Error: ' + str(e.description))
45 | time.sleep(1)
46 |
47 | def cb_interrupt(self, changed, value):
48 | log.warn('Ring Ring Ring!')
49 |
50 | def cb_enumerate(self, uid, connected_uid, position, hardware_version,
51 | firmware_version, device_identifier, enumeration_type):
52 | if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
53 | enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
54 | if device_identifier == IndustrialDigitalIn4V2.DEVICE_IDENTIFIER:
55 | try:
56 | self.idi4 = IndustrialDigitalIn4V2(uid, self.ipcon)
57 |
58 | self.idi4.set_all_value_callback_configuration(10000, True)
59 | self.idi4.register_callback(IndustrialDigitalIn4V2.CALLBACK_ALL_VALUE,
60 | self.cb_interrupt)
61 |
62 | log.info('Industrial Digital In 4 V2 initialized')
63 | except Error as e:
64 | log.error('Industrial Digital In 4 V2 init failed: ' + str(e.description))
65 |
66 | self.idi4 = None
67 |
68 | def cb_connected(self, connected_reason):
69 | if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
70 | log.info('Auto Reconnect')
71 |
72 | while True:
73 | try:
74 | self.ipcon.enumerate()
75 | break
76 | except Error as e:
77 | log.error('Enumerate Error: ' + str(e.description))
78 | time.sleep(1)
79 |
80 | if __name__ == "__main__":
81 | log.info('Doorbell Notifier: Start')
82 |
83 | doorbell_notifier = DoorbellNotifier()
84 |
85 | if sys.version_info < (3, 0):
86 | input = raw_input # Compatibility for Python 2.x
87 | input('Press key to exit\n')
88 |
89 | if doorbell_notifier.ipcon != None:
90 | doorbell_notifier.ipcon.disconnect()
91 |
92 | log.info('Doorbell Notifier: End')
93 |
--------------------------------------------------------------------------------
/doorbell_notifier/python/doorbell_notifier.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import socket
5 | import sys
6 | import time
7 | import math
8 | import logging as log
9 | log.basicConfig(level=log.INFO)
10 |
11 | from tinkerforge.ip_connection import IPConnection
12 | from tinkerforge.ip_connection import Error
13 | from tinkerforge.bricklet_industrial_digital_in_4 import IndustrialDigitalIn4
14 |
15 |
16 | class DoorbellNotifier:
17 | HOST = 'localhost'
18 | PORT = 4223
19 |
20 | ipcon = None
21 | idi4 = None
22 |
23 | def __init__(self):
24 | self.ipcon = IPConnection()
25 | while True:
26 | try:
27 | self.ipcon.connect(DoorbellNotifier.HOST, DoorbellNotifier.PORT)
28 | break
29 | except Error as e:
30 | log.error('Connection Error: ' + str(e.description))
31 | time.sleep(1)
32 | except socket.error as e:
33 | log.error('Socket error: ' + str(e))
34 | time.sleep(1)
35 |
36 | self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
37 | self.cb_enumerate)
38 | self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
39 | self.cb_connected)
40 |
41 | while True:
42 | try:
43 | self.ipcon.enumerate()
44 | break
45 | except Error as e:
46 | log.error('Enumerate Error: ' + str(e.description))
47 | time.sleep(1)
48 |
49 | def cb_interrupt(self, interrupt_mask, value_mask):
50 | if value_mask > 0:
51 | log.warn('Ring Ring Ring!')
52 |
53 | def cb_enumerate(self, uid, connected_uid, position, hardware_version,
54 | firmware_version, device_identifier, enumeration_type):
55 | if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
56 | enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
57 | if device_identifier == IndustrialDigitalIn4.DEVICE_IDENTIFIER:
58 | try:
59 | self.idi4 = IndustrialDigitalIn4(uid, self.ipcon)
60 | self.idi4.set_debounce_period(10000)
61 | self.idi4.set_interrupt(15)
62 | self.idi4.register_callback(IndustrialDigitalIn4.CALLBACK_INTERRUPT,
63 | self.cb_interrupt)
64 | log.info('Industrial Digital In 4 initialized')
65 | except Error as e:
66 | log.error('Industrial Digital In 4 init failed: ' + str(e.description))
67 | self.idi4 = None
68 |
69 | def cb_connected(self, connected_reason):
70 | if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
71 | log.info('Auto Reconnect')
72 |
73 | while True:
74 | try:
75 | self.ipcon.enumerate()
76 | break
77 | except Error as e:
78 | log.error('Enumerate Error: ' + str(e.description))
79 | time.sleep(1)
80 |
81 | if __name__ == "__main__":
82 | log.info('Doorbell Notifier: Start')
83 |
84 | doorbell_notifier = DoorbellNotifier()
85 |
86 | if sys.version_info < (3, 0):
87 | input = raw_input # Compatibility for Python 2.x
88 | input('Press key to exit\n')
89 |
90 | if doorbell_notifier.ipcon != None:
91 | doorbell_notifier.ipcon.disconnect()
92 |
93 | log.info('Doorbell Notifier: End')
94 |
--------------------------------------------------------------------------------
/smoke_detector/vbnet/SmokeDetector.vb:
--------------------------------------------------------------------------------
1 | Imports Tinkerforge
2 |
3 | Module SmokeDetector
4 | Const HOST As String = "localhost"
5 | Const PORT As Integer = 4223
6 |
7 | Private ipcon As IPConnection = Nothing
8 | Private brickletIndustrialDigitalIn4 As BrickletIndustrialDigitalIn4 = Nothing
9 |
10 | Sub InterruptCB(ByVal sender As BrickletIndustrialDigitalIn4, _
11 | ByVal interruptMask As Integer, ByVal valueMask As Integer)
12 | If valueMask > 0 Then
13 | System.Console.WriteLine("Fire! Fire!")
14 | End If
15 | End Sub
16 |
17 | Sub EnumerateCB(ByVal sender As IPConnection, ByVal uid As String, _
18 | ByVal connectedUid As String, ByVal position As Char, _
19 | ByVal hardwareVersion() As Short, ByVal firmwareVersion() As Short, _
20 | ByVal deviceIdentifier As Integer, ByVal enumerationType As Short)
21 | If enumerationType = IPConnection.ENUMERATION_TYPE_CONNECTED Or _
22 | enumerationType = IPConnection.ENUMERATION_TYPE_AVAILABLE Then
23 | If deviceIdentifier = BrickletIndustrialDigitalIn4.DEVICE_IDENTIFIER Then
24 | Try
25 | brickletIndustrialDigitalIn4 = New BrickletIndustrialDigitalIn4(UID, ipcon)
26 | brickletIndustrialDigitalIn4.SetDebouncePeriod(10000)
27 | brickletIndustrialDigitalIn4.SetInterrupt(15)
28 | AddHandler brickletIndustrialDigitalIn4.Interrupt, AddressOf InterruptCB
29 | System.Console.WriteLine("Industrial Digital In 4 initialized")
30 | Catch e As TinkerforgeException
31 | System.Console.WriteLine("Industrial Digital In 4 init failed: " + e.Message)
32 | brickletIndustrialDigitalIn4 = Nothing
33 | End Try
34 | End If
35 | End If
36 | End Sub
37 |
38 | Sub ConnectedCB(ByVal sender As IPConnection, ByVal connectedReason as Short)
39 | If connectedReason = IPConnection.CONNECT_REASON_AUTO_RECONNECT Then
40 | System.Console.WriteLine("Auto Reconnect")
41 | while True
42 | Try
43 | ipcon.Enumerate()
44 | Exit While
45 | Catch e As NotConnectedException
46 | System.Console.WriteLine("Enumeration Error: " + e.Message)
47 | System.Threading.Thread.Sleep(1000)
48 | End Try
49 | End While
50 | End If
51 | End Sub
52 |
53 | Sub Main()
54 | ipcon = New IPConnection()
55 | while True
56 | Try
57 | ipcon.Connect(HOST, PORT)
58 | Exit While
59 | Catch e As System.Net.Sockets.SocketException
60 | System.Console.WriteLine("Connection Error: " + e.Message)
61 | System.Threading.Thread.Sleep(1000)
62 | End Try
63 | End While
64 |
65 | AddHandler ipcon.EnumerateCallback, AddressOf EnumerateCB
66 | AddHandler ipcon.Connected, AddressOf ConnectedCB
67 |
68 | while True
69 | try
70 | ipcon.Enumerate()
71 | Exit While
72 | Catch e As NotConnectedException
73 | System.Console.WriteLine("Enumeration Error: " + e.Message)
74 | System.Threading.Thread.Sleep(1000)
75 | End Try
76 | End While
77 |
78 | System.Console.WriteLine("Press key to exit")
79 | System.Console.ReadLine()
80 | ipcon.Disconnect()
81 | End Sub
82 | End Module
83 |
--------------------------------------------------------------------------------
/smoke_detector_v2/delphi/SmokeDetectorV2.pas:
--------------------------------------------------------------------------------
1 | program SmokeDetectorV2;
2 |
3 | {$ifdef MSWINDOWS}{$apptype CONSOLE}{$endif}
4 | {$ifdef FPC}{$mode OBJFPC}{$H+}{$endif}
5 |
6 | uses
7 | SysUtils, IPConnection, Device, BrickletIndustrialDigitalIn4V2;
8 |
9 | const
10 | HOST = 'localhost';
11 | PORT = 4223;
12 |
13 | type
14 | TSmokeDetector = class
15 | private
16 | ipcon: TIPConnection;
17 | brickletIndustrialDigitalIn4: TBrickletIndustrialDigitalIn4V2;
18 | public
19 | constructor Create;
20 | destructor Destroy; override;
21 | procedure ConnectedCB(sender: TIPConnection; const connectedReason: byte);
22 | procedure EnumerateCB(sender: TIPConnection; const uid: string;
23 | const connectedUid: string; const position: char;
24 | const hardwareVersion: TVersionNumber;
25 | const firmwareVersion: TVersionNumber;
26 | const deviceIdentifier: word; const enumerationType: byte);
27 | procedure InterruptCB(sender: TBrickletIndustrialDigitalIn4V2; const changed: TArray0To3OfBoolean; const value: TArray0To3OfBoolean);
28 | procedure Execute;
29 | end;
30 |
31 | var
32 | sd: TSmokeDetector;
33 |
34 | constructor TSmokeDetector.Create;
35 | begin
36 | ipcon := nil;
37 | brickletIndustrialDigitalIn4 := nil;
38 | end;
39 |
40 | destructor TSmokeDetector.Destroy;
41 | begin
42 | if (brickletIndustrialDigitalIn4 <> nil) then brickletIndustrialDigitalIn4.Destroy;
43 | if (ipcon <> nil) then ipcon.Destroy;
44 | inherited Destroy;
45 | end;
46 |
47 | procedure TSmokeDetector.ConnectedCB(sender: TIPConnection; const connectedReason: byte);
48 | begin
49 | if (connectedReason = IPCON_CONNECT_REASON_AUTO_RECONNECT) then begin
50 | WriteLn('Auto Reconnect');
51 | while (true) do begin
52 | try
53 | ipcon.Enumerate;
54 | break;
55 | except
56 | on e: Exception do begin
57 | WriteLn('Enumeration Error: ' + e.Message);
58 | Sleep(1000);
59 | end;
60 | end;
61 | end;
62 | end;
63 | end;
64 |
65 | procedure TSmokeDetector.EnumerateCB(sender: TIPConnection; const uid: string;
66 | const connectedUid: string; const position: char;
67 | const hardwareVersion: TVersionNumber;
68 | const firmwareVersion: TVersionNumber;
69 | const deviceIdentifier: word; const enumerationType: byte);
70 | begin
71 | if ((enumerationType = IPCON_ENUMERATION_TYPE_CONNECTED) or
72 | (enumerationType = IPCON_ENUMERATION_TYPE_AVAILABLE)) then begin
73 | if (deviceIdentifier = BRICKLET_INDUSTRIAL_DIGITAL_IN_4_V2_DEVICE_IDENTIFIER) then begin
74 | try
75 | brickletIndustrialDigitalIn4 := TBrickletIndustrialDigitalIn4V2.Create(uid, ipcon);
76 | brickletIndustrialDigitalIn4.SetAllValueCallbackConfiguration(10000, true);
77 | brickletIndustrialDigitalIn4.OnAllValue := {$ifdef FPC}@{$endif}InterruptCB;
78 | WriteLn('Industrial Digital In 4 V2 initialized');
79 | except
80 | on e: Exception do begin
81 | WriteLn('Industrial Digital In 4 V2 init failed: ' + e.Message);
82 | brickletIndustrialDigitalIn4 := nil;
83 | end;
84 | end;
85 | end;
86 | end;
87 | end;
88 |
89 | procedure TSmokeDetector.InterruptCB(sender: TBrickletIndustrialDigitalIn4V2; const changed: TArray0To3OfBoolean; const value: TArray0To3OfBoolean);
90 | begin
91 | WriteLn('Fire! Fire!');
92 | end;
93 |
94 | procedure TSmokeDetector.Execute;
95 | begin
96 | ipcon := TIPConnection.Create;
97 | while (true) do begin
98 | try
99 | ipcon.Connect(HOST, PORT);
100 | break;
101 | except
102 | on e: Exception do begin
103 | WriteLn('Connection Error: ' + e.Message);
104 | Sleep(1000);
105 | end;
106 | end;
107 | end;
108 | ipcon.OnEnumerate := {$ifdef FPC}@{$endif}EnumerateCB;
109 | ipcon.OnConnected := {$ifdef FPC}@{$endif}ConnectedCB;
110 | while (true) do begin
111 | try
112 | ipcon.Enumerate;
113 | break;
114 | except
115 | on e: Exception do begin
116 | WriteLn('Enumeration Error: ' + e.Message);
117 | Sleep(1000);
118 | end;
119 | end;
120 | end;
121 | WriteLn('Press key to exit');
122 | ReadLn;
123 | end;
124 |
125 | begin
126 | sd := TSmokeDetector.Create;
127 | sd.Execute;
128 | sd.Destroy;
129 | end.
130 |
--------------------------------------------------------------------------------
/smoke_detector/delphi/SmokeDetector.pas:
--------------------------------------------------------------------------------
1 | program SmokeDetector;
2 |
3 | {$ifdef MSWINDOWS}{$apptype CONSOLE}{$endif}
4 | {$ifdef FPC}{$mode OBJFPC}{$H+}{$endif}
5 |
6 | uses
7 | SysUtils, IPConnection, Device, BrickletIndustrialDigitalIn4;
8 |
9 | const
10 | HOST = 'localhost';
11 | PORT = 4223;
12 |
13 | type
14 | TSmokeDetector = class
15 | private
16 | ipcon: TIPConnection;
17 | brickletIndustrialDigitalIn4: TBrickletIndustrialDigitalIn4;
18 | public
19 | constructor Create;
20 | destructor Destroy; override;
21 | procedure ConnectedCB(sender: TIPConnection; const connectedReason: byte);
22 | procedure EnumerateCB(sender: TIPConnection; const uid: string;
23 | const connectedUid: string; const position: char;
24 | const hardwareVersion: TVersionNumber;
25 | const firmwareVersion: TVersionNumber;
26 | const deviceIdentifier: word; const enumerationType: byte);
27 | procedure InterruptCB(sender: TBrickletIndustrialDigitalIn4; const interruptMask: word; const valueMask: word);
28 | procedure Execute;
29 | end;
30 |
31 | var
32 | sd: TSmokeDetector;
33 |
34 | constructor TSmokeDetector.Create;
35 | begin
36 | ipcon := nil;
37 | brickletIndustrialDigitalIn4 := nil;
38 | end;
39 |
40 | destructor TSmokeDetector.Destroy;
41 | begin
42 | if (brickletIndustrialDigitalIn4 <> nil) then brickletIndustrialDigitalIn4.Destroy;
43 | if (ipcon <> nil) then ipcon.Destroy;
44 | inherited Destroy;
45 | end;
46 |
47 | procedure TSmokeDetector.ConnectedCB(sender: TIPConnection; const connectedReason: byte);
48 | begin
49 | if (connectedReason = IPCON_CONNECT_REASON_AUTO_RECONNECT) then begin
50 | WriteLn('Auto Reconnect');
51 | while (true) do begin
52 | try
53 | ipcon.Enumerate;
54 | break;
55 | except
56 | on e: Exception do begin
57 | WriteLn('Enumeration Error: ' + e.Message);
58 | Sleep(1000);
59 | end;
60 | end;
61 | end;
62 | end;
63 | end;
64 |
65 | procedure TSmokeDetector.EnumerateCB(sender: TIPConnection; const uid: string;
66 | const connectedUid: string; const position: char;
67 | const hardwareVersion: TVersionNumber;
68 | const firmwareVersion: TVersionNumber;
69 | const deviceIdentifier: word; const enumerationType: byte);
70 | begin
71 | if ((enumerationType = IPCON_ENUMERATION_TYPE_CONNECTED) or
72 | (enumerationType = IPCON_ENUMERATION_TYPE_AVAILABLE)) then begin
73 | if (deviceIdentifier = BRICKLET_INDUSTRIAL_DIGITAL_IN_4_DEVICE_IDENTIFIER) then begin
74 | try
75 | brickletIndustrialDigitalIn4 := TBrickletIndustrialDigitalIn4.Create(uid, ipcon);
76 | brickletIndustrialDigitalIn4.SetDebouncePeriod(10000);
77 | brickletIndustrialDigitalIn4.SetInterrupt(15);
78 | brickletIndustrialDigitalIn4.OnInterrupt := {$ifdef FPC}@{$endif}InterruptCB;
79 | WriteLn('Industrial Digital In 4 initialized');
80 | except
81 | on e: Exception do begin
82 | WriteLn('Industrial Digital In 4 init failed: ' + e.Message);
83 | brickletIndustrialDigitalIn4 := nil;
84 | end;
85 | end;
86 | end;
87 | end;
88 | end;
89 |
90 | procedure TSmokeDetector.InterruptCB(sender: TBrickletIndustrialDigitalIn4; const interruptMask: word; const valueMask: word);
91 | begin
92 | if (valueMask > 0) then begin
93 | WriteLn('Fire! Fire!');
94 | end;
95 | end;
96 |
97 | procedure TSmokeDetector.Execute;
98 | begin
99 | ipcon := TIPConnection.Create;
100 | while (true) do begin
101 | try
102 | ipcon.Connect(HOST, PORT);
103 | break;
104 | except
105 | on e: Exception do begin
106 | WriteLn('Connection Error: ' + e.Message);
107 | Sleep(1000);
108 | end;
109 | end;
110 | end;
111 | ipcon.OnEnumerate := {$ifdef FPC}@{$endif}EnumerateCB;
112 | ipcon.OnConnected := {$ifdef FPC}@{$endif}ConnectedCB;
113 | while (true) do begin
114 | try
115 | ipcon.Enumerate;
116 | break;
117 | except
118 | on e: Exception do begin
119 | WriteLn('Enumeration Error: ' + e.Message);
120 | Sleep(1000);
121 | end;
122 | end;
123 | end;
124 | WriteLn('Press key to exit');
125 | ReadLn;
126 | end;
127 |
128 | begin
129 | sd := TSmokeDetector.Create;
130 | sd.Execute;
131 | sd.Destroy;
132 | end.
133 |
--------------------------------------------------------------------------------
/remote_switch_gui/csharp/RemoteSwitchGUI.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 | using System.Drawing;
3 | using System.Threading;
4 | using Tinkerforge;
5 |
6 | class RemoteSwitchGUI : Form
7 | {
8 | private static string HOST = "localhost";
9 | private static int PORT = 4223;
10 |
11 | private Panel panel = null;
12 | private Button buttonAOn = null;
13 | private Button buttonAOff = null;
14 | private Button buttonBOn = null;
15 | private Button buttonBOff = null;
16 | private ListBox listBox = null;
17 |
18 | private IPConnection ipcon = null;
19 | private BrickletIndustrialQuadRelay brickletIndustrialQuadRelay = null;
20 |
21 | public RemoteSwitchGUI()
22 | {
23 | Text = "Remote Switch GUI 1.0.1";
24 | Size = new Size(300, 500);
25 | MinimumSize = new Size(260, 200);
26 |
27 | panel = new Panel();
28 | panel.Parent = this;
29 | panel.Height = 40;
30 | panel.Dock = DockStyle.Top;
31 |
32 | listBox = new ListBox();
33 | listBox.Parent = this;
34 | listBox.Dock = DockStyle.Fill;
35 | listBox.BringToFront();
36 |
37 | buttonAOn = CreateButton("A On", 10, (1 << 0) | (1 << 2));
38 | buttonAOff = CreateButton("A Off", 70, (1 << 0) | (1 << 3));
39 | buttonBOn = CreateButton("B On", 130, (1 << 1) | (1 << 2));
40 | buttonBOff = CreateButton("B Off", 190, (1 << 1) | (1 << 3));
41 |
42 | Load += delegate(object sender, System.EventArgs e)
43 | {
44 | Thread thread = new Thread(delegate() { Connect(); });
45 | thread.IsBackground = true;
46 | thread.Start();
47 | };
48 | }
49 |
50 | private Button CreateButton(string name, int x, int selectionMask)
51 | {
52 | Button button = new Button();
53 |
54 | button.Text = name;
55 | button.Parent = panel;
56 | button.Width = 50;
57 | button.Location = new Point(x, 10);
58 |
59 | button.Click += delegate(object sender, System.EventArgs e)
60 | {
61 | TriggerSwitch(name, selectionMask);
62 | };
63 |
64 | return button;
65 | }
66 |
67 | private void Log(string message)
68 | {
69 | Invoke((MethodInvoker) delegate() { listBox.Items.Add(message); });
70 | }
71 |
72 | private void Connect()
73 | {
74 | Log("Connecting to " + HOST + ":" + PORT);
75 |
76 | ipcon = new IPConnection();
77 | while(true)
78 | {
79 | try
80 | {
81 | ipcon.Connect(HOST, PORT);
82 | break;
83 | }
84 | catch(System.Net.Sockets.SocketException e)
85 | {
86 | Log("Connection Error: " + e.Message);
87 | Thread.Sleep(1000);
88 | }
89 | }
90 |
91 | ipcon.EnumerateCallback += EnumerateCB;
92 | ipcon.Connected += ConnectedCB;
93 |
94 | while(true)
95 | {
96 | try
97 | {
98 | ipcon.Enumerate();
99 | break;
100 | }
101 | catch(NotConnectedException e)
102 | {
103 | Log("Enumeration Error: " + e.Message);
104 | Thread.Sleep(1000);
105 | }
106 | }
107 |
108 | Log("Connected");
109 | }
110 |
111 | private void TriggerSwitch(string name, int selectionMask)
112 | {
113 | if(brickletIndustrialQuadRelay == null) {
114 | Log("No Industrial Quad Relay Bricklet found");
115 | return;
116 | }
117 |
118 | try
119 | {
120 | brickletIndustrialQuadRelay.SetMonoflop(selectionMask, 15, 500);
121 | Log("Triggered '" + name + "'");
122 | }
123 | catch(TinkerforgeException e)
124 | {
125 | Log("Trigger '" + name + "' Error: " + e.Message);
126 | }
127 | }
128 |
129 | private void EnumerateCB(IPConnection sender, string UID, string connectedUID, char position,
130 | short[] hardwareVersion, short[] firmwareVersion,
131 | int deviceIdentifier, short enumerationType)
132 | {
133 | if(enumerationType == IPConnection.ENUMERATION_TYPE_CONNECTED ||
134 | enumerationType == IPConnection.ENUMERATION_TYPE_AVAILABLE)
135 | {
136 | if(deviceIdentifier == BrickletIndustrialQuadRelay.DEVICE_IDENTIFIER)
137 | {
138 | try
139 | {
140 | brickletIndustrialQuadRelay = new BrickletIndustrialQuadRelay(UID, ipcon);
141 | Log("Industrial Quad Relay initialized");
142 | }
143 | catch(TinkerforgeException e)
144 | {
145 | Log("Industrial Quad Relay init failed: " + e.Message);
146 | brickletIndustrialQuadRelay = null;
147 | }
148 | }
149 | }
150 | }
151 |
152 | private void ConnectedCB(IPConnection sender, short connectedReason)
153 | {
154 | if(connectedReason == IPConnection.CONNECT_REASON_AUTO_RECONNECT)
155 | {
156 | Log("Auto Reconnect");
157 |
158 | while(true)
159 | {
160 | try
161 | {
162 | ipcon.Enumerate();
163 | break;
164 | }
165 | catch(NotConnectedException e)
166 | {
167 | Log("Enumeration Error: " + e.Message);
168 | Thread.Sleep(1000);
169 | }
170 | }
171 | }
172 | }
173 |
174 | static public void Main()
175 | {
176 | Application.Run(new RemoteSwitchGUI());
177 | }
178 | }
179 |
--------------------------------------------------------------------------------