├── README.md ├── Raspberry Pi LedButton ├── LedButtonPython │ └── LedButton.py ├── LedButtonSketch │ └── LedButtonSketch.ino ├── abstract.txt ├── screenshot.png ├── setup.txt └── wiring.jpg ├── Windows App ├── RFduinoCompass │ ├── RFduinoCompass.ino │ ├── license.txt │ └── readme.txt ├── RFduinoCompassApp │ ├── .gitattributes │ ├── .gitignore │ ├── License.txt │ ├── RFduino Compass.sln │ ├── RFduino Compass │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── Images │ │ │ │ ├── CompassNeedle.png │ │ │ │ └── CompassRing.png │ │ │ ├── Logo.scale-100.png │ │ │ ├── SmallLogo.scale-100.png │ │ │ ├── SplashScreen.scale-100.png │ │ │ └── StoreLogo.scale-100.png │ │ ├── Common │ │ │ ├── NavigationHelper.cs │ │ │ ├── ObservableDictionary.cs │ │ │ ├── RelayCommand.cs │ │ │ └── SuspensionManager.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── RFduino Compass.csproj │ └── Readme.txt └── libraries │ ├── LSM303 │ ├── LSM303.cpp │ ├── LSM303.h │ └── keywords.txt │ ├── OLEDDisplay │ ├── OLEDDisplay.cpp │ └── OLEDDisplay.h │ ├── RFDuino_Timer2 │ ├── RFduino_Timer2.cpp │ └── RFduino_Timer2.h │ ├── license.txt │ └── readme.txt └── iPhone Apps ├── rfduino ├── AppDelegate.h ├── AppDelegate.m ├── CustomCellBackground.h ├── CustomCellBackground.m ├── RFduino.h ├── RFduino.m ├── RFduinoDelegate.h ├── RFduinoManagerDelegate.h ├── RfduinoManager.h ├── RfduinoManager.m ├── ScanViewController.h └── ScanViewController.m ├── rfduinoBulkDataTransfer ├── rfduinoBulkDataTransfer.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── steve.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ └── xcschemes │ │ ├── rfduinoBulkDataTransfer.xcscheme │ │ └── xcschememanagement.plist └── rfduinoBulkDataTransfer │ ├── AppViewController.h │ ├── AppViewController.m │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json │ ├── en.lproj │ └── InfoPlist.strings │ ├── main.m │ ├── rfduinoBulkDataTransfer-Info.plist │ └── rfduinoBulkDataTransfer-Prefix.pch ├── rfduinoColorWheel ├── icon-144.png ├── icon-72.png ├── icon.png ├── icon@2x.png ├── rfduinoColorWheel.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── steve.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── rfduinoColorWheel.xcscheme │ │ └── xcschememanagement.plist └── rfduinoColorWheel │ ├── AppViewController.h │ ├── AppViewController.m │ ├── AppViewController.xib │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── UIImage+Extras.h │ ├── UIImage+Extras.m │ ├── colorWheel1.png │ ├── en.lproj │ └── InfoPlist.strings │ ├── main.m │ ├── rfduinoColorWheel-Info.plist │ └── rfduinoColorWheel-Prefix.pch ├── rfduinoLedButton ├── icon-144.png ├── icon-72.png ├── icon.png ├── icon@2x.png ├── rfduinoLedButton.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── steve.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── rfduinoLedButton.xcscheme │ │ └── xcschememanagement.plist └── rfduinoLedButton │ ├── AppViewController.h │ ├── AppViewController.m │ ├── AppViewController.xib │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── en.lproj │ └── InfoPlist.strings │ ├── main.m │ ├── off.jpg │ ├── on.jpg │ ├── rfduinoLedButton-Info.plist │ └── rfduinoLedButton-Prefix.pch ├── rfduinoServo ├── icon-144.png ├── icon-72.png ├── icon.png ├── icon@2x.png ├── rfduinoServo.ipa ├── rfduinoServo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── steve.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ └── xcschemes │ │ ├── rfduinoServo.xcscheme │ │ └── xcschememanagement.plist └── rfduinoServo │ ├── AppViewController.h │ ├── AppViewController.m │ ├── AppViewController.xib │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── en.lproj │ └── InfoPlist.strings │ ├── main.m │ ├── rfduinoServo-Info.plist │ ├── rfduinoServo-Prefix.pch │ └── rfduinoServo.ipa └── rfduinoTemperature ├── icon-72.png ├── icon.png ├── icon@2x.png ├── rfduinoTemperature.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── steve.xcuserdatad │ └── xcschemes │ ├── rfduinoTemperature.xcscheme │ └── xcschememanagement.plist └── rfduinoTemperature ├── AppViewController.h ├── AppViewController.m ├── AppViewController.xib ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── en.lproj └── InfoPlist.strings ├── main.m ├── rfduinoTemperature-Info.plist ├── rfduinoTemperature-Prefix.pch └── thermometer.png /README.md: -------------------------------------------------------------------------------- 1 | # RFduinoApps 2 | 3 | This repository contains the iPhone Apps source code and Raspberry Pi integration projects for the RFduino. 4 | 5 | The Arduino board installation files for RFduino are [here](http://github.com/RFduino/RFduino). 6 | -------------------------------------------------------------------------------- /Raspberry Pi LedButton/LedButtonPython/LedButton.py: -------------------------------------------------------------------------------- 1 | import RPi.GPIO as GPIO 2 | import serial 3 | 4 | GPIO.setmode(GPIO.BCM) 5 | 6 | GPIO.setup(17, GPIO.OUT) 7 | GPIO.setup(27, GPIO.IN) 8 | 9 | port = serial.Serial("/dev/ttyUSB0", baudrate=9600) 10 | 11 | def pressed(channel): 12 | port.write("1") 13 | GPIO.remove_event_detect(27) 14 | GPIO.add_event_detect(27, GPIO.FALLING, callback=released, bouncetime=50) 15 | 16 | def released(channel): 17 | port.write("0") 18 | GPIO.remove_event_detect(27) 19 | GPIO.add_event_detect(27, GPIO.RISING, callback=pressed, bouncetime=50) 20 | 21 | GPIO.add_event_detect(27, GPIO.RISING, callback=pressed, bouncetime=50) 22 | 23 | loop = True 24 | while loop: 25 | try: 26 | data = port.read() 27 | GPIO.output(17, data == '1'); 28 | except KeyboardInterrupt: 29 | loop = False 30 | 31 | GPIO.cleanup() 32 | -------------------------------------------------------------------------------- /Raspberry Pi LedButton/LedButtonSketch/LedButtonSketch.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void setup() { 4 | Serial.begin(9600); 5 | 6 | RFduinoBLE.begin(); 7 | } 8 | 9 | void loop() { 10 | if (Serial.available()) 11 | { 12 | char ch = Serial.read(); 13 | RFduinoBLE.send(ch == '1'); 14 | } 15 | } 16 | 17 | void RFduinoBLE_onReceive(char *data, int len) 18 | { 19 | Serial.write(data[0] ? "1" : "0"); 20 | } 21 | -------------------------------------------------------------------------------- /Raspberry Pi LedButton/abstract.txt: -------------------------------------------------------------------------------- 1 | This app demonstrates how to integrate an RFduino and RFduino shield accessories with the Raspberry Pi. The RFduino can be used as a gateway to easily and quickly enable iPhone Support to the Raspberry Pi. 2 | 3 | Attach the RFduino and RGB Shield to the Raspberry Pi as shown in wiring.jpg. 4 | 5 | Following setup.txt instructions to setup Arduino 1.6.0 and RFduino 2.3.1, or download the 16gb sd card image file from http://www.rfduino.com/downloads/raspbian_rfduino.zip. 6 | 7 | Upload the LedButtonSketch to the RFduino. 8 | 9 | Execute the Raspberry Pi python script, "sudo python LedButton.py". 10 | 11 | Download the LedButton iPhone App from the App Store (or Xcode with iPhone App/rfduinoLedButton). 12 | 13 | Connect to the RFduino. 14 | 15 | The button on the iPhone can be used to turn the green led on or off via the Raspberry Pi. The button state of the RGB Shield button A is transmitted to the iPhone via the Raspberry Pi and shown in the application. 16 | -------------------------------------------------------------------------------- /Raspberry Pi LedButton/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Raspberry Pi LedButton/screenshot.png -------------------------------------------------------------------------------- /Raspberry Pi LedButton/setup.txt: -------------------------------------------------------------------------------- 1 | format SD Card 2 | expand NOOBS_v1_4_0.zip 3 | copy to SD Card 4 | 5 | boot on Raspberry PI 6 | change keyboard to US, leave language English UK 7 | install Raspbian 8 | exit raspi-config without changes 9 | 10 | sudo su 11 | apt-get update 12 | apt-get upgrade 13 | apt-get dist-upgrade 14 | reboot 15 | 16 | startx (then logoff) 17 | sudo poweroff 18 | 19 | --- 20 | 21 | ssh pi 22 | 23 | vi .vimrc 24 | set nocompatible 25 | set backspace=indent,eol,start 26 | 27 | sudo su 28 | 29 | vi ~/.vimrc 30 | set nocompatible 31 | set backspace=indent,eol,start 32 | 33 | apt-get install xrdp 34 | 35 | // https://nicohood.wordpress.com/2015/01/24/installing-avr-gcc-4-8-1-and-arduino-ide-1-6-on-raspberry-pi/ 36 | 37 | edit /etc/apt/sources.list 38 | deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi 39 | deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi 40 | 41 | edit /etc/apt/preferences 42 | Package: * 43 | Pin: release n=wheezy 44 | Pin-Priority: 900 45 | 46 | Package: * 47 | Pin: release n=jessie 48 | Pin-Priority: 300 49 | 50 | Package: * 51 | Pin: release o=Raspbian 52 | Pin-Priority: -10 53 | 54 | apt-get update 55 | 56 | apt-get -t jessie install gcc-avr 57 | 58 | apt-get -t jessie install avrdude avr-libc libjssc-java libastylej-jni libcommons-exec-java libcommons-httpclient-java libcommons-logging-java libjmdns-java libjna-java libjsch-java 59 | 60 | wget https://www.dropbox.com/s/k7dftaq8vkrta0t/arduino_1.6.0_all.deb 61 | wget https://www.dropbox.com/s/l9qz49bdzxnp4rm/arduino-core_1.6.0_all.deb 62 | dpkg -i arduino-core_1.6.0_all.deb arduino_1.6.0_all.deb 63 | 64 | mkdir /usr/share/arduino/hardware/tools/avr/etc/ 65 | ln -s /etc/avrdude.conf /usr/share/arduino/hardware/tools/avr/etc/avrdude.conf 66 | 67 | exit 68 | 69 | avr-gcc -v 70 | 71 | remote desktop 72 | menu -> programming -> arduino ide, right-click add to desktop 73 | start arduino 74 | file -> preferences, add compilation/upload verbose, display line numbers 75 | 76 | --- 77 | 78 | ssh pi 79 | 80 | sudo apt-get -t jessie install gcc-arm-none-eabi gdb-arm-none-eabi 81 | arm-none-eabi-gcc -v 82 | 83 | wget http://github.com/RFduino/RFduino/archive/v2.3.1.zip 84 | unzip v2.3.1.zip 85 | cd RFduino-2.3.1 86 | edit platform.txt 87 | uncomment arduino 1.6.1 config, comment arduino 1.6.3 config 88 | uncomment RFDLoader_pi, uncomment RFDLoader_linux 89 | chmod +x RFDLoader_pi 90 | cd .. 91 | sudo mv RFduino-2.3.1 /usr/share/arduino/hardware/arduino/RFduino 92 | 93 | wget http://github.com/RFduino/RFduinoApps/archive/v1.0.zip 94 | unzip v1.0.zip 95 | 96 | remote desktop 192.168.1.48 97 | start arduino 98 | tools -> board -> RFduino 99 | tools -> board -> /dev/ttyUSB0 100 | compile blank sketch to test 101 | upload /home/pi/RFduinoApps-1.0/Raspberry Pi LedButton/LedButtonSketch/LedButtonSketch.ino 102 | 103 | terminal 104 | cd /RFduinoApps-1.0/Raspberry Pi LedButton/LedButtonPython 105 | sudo python LedButton.py 106 | 107 | download the LedButton app from the iPhone App Store 108 | -------------------------------------------------------------------------------- /Raspberry Pi LedButton/wiring.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Raspberry Pi LedButton/wiring.jpg -------------------------------------------------------------------------------- /Windows App/RFduinoCompass/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, RF Digital Corp. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must be on an RF Digital part and reproduce the above copyright notice, 9 | this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 12 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 13 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 14 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 15 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Windows App/RFduinoCompass/readme.txt: -------------------------------------------------------------------------------- 1 | A compass built on an RFduino. The compass uses an LSM303 to calculate heading and an OLED Display to display the current heading. 2 | The LSM303 and OLED Display are connected to the RFduino via the I2C bus. 3 | The RFduino publishes a Bluetooth low energy Service with the current heading and notifies a client when it changes. The compass accepts 4 | a single command to initiate a calibration sequence for the LSM303. -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | bld/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | 19 | # Roslyn cache directories 20 | *.ide/ 21 | 22 | # MSTest test Results 23 | [Tt]est[Rr]esult*/ 24 | [Bb]uild[Ll]og.* 25 | 26 | #NUNIT 27 | *.VisualState.xml 28 | TestResult.xml 29 | 30 | # Build Results of an ATL Project 31 | [Dd]ebugPS/ 32 | [Rr]eleasePS/ 33 | dlldata.c 34 | 35 | *_i.c 36 | *_p.c 37 | *_i.h 38 | *.ilk 39 | *.meta 40 | *.obj 41 | *.pch 42 | *.pdb 43 | *.pgc 44 | *.pgd 45 | *.rsp 46 | *.sbr 47 | *.tlb 48 | *.tli 49 | *.tlh 50 | *.tmp 51 | *.tmp_proj 52 | *.log 53 | *.vspscc 54 | *.vssscc 55 | .builds 56 | *.pidb 57 | *.svclog 58 | *.scc 59 | 60 | # Chutzpah Test files 61 | _Chutzpah* 62 | 63 | # Visual C++ cache files 64 | ipch/ 65 | *.aps 66 | *.ncb 67 | *.opensdf 68 | *.sdf 69 | *.cachefile 70 | 71 | # Visual Studio profiler 72 | *.psess 73 | *.vsp 74 | *.vspx 75 | 76 | # TFS 2012 Local Workspace 77 | $tf/ 78 | 79 | # Guidance Automation Toolkit 80 | *.gpState 81 | 82 | # ReSharper is a .NET coding add-in 83 | _ReSharper*/ 84 | *.[Rr]e[Ss]harper 85 | *.DotSettings.user 86 | 87 | # JustCode is a .NET coding addin-in 88 | .JustCode 89 | 90 | # TeamCity is a build add-in 91 | _TeamCity* 92 | 93 | # DotCover is a Code Coverage Tool 94 | *.dotCover 95 | 96 | # NCrunch 97 | _NCrunch_* 98 | .*crunch*.local.xml 99 | 100 | # MightyMoose 101 | *.mm.* 102 | AutoTest.Net/ 103 | 104 | # Web workbench (sass) 105 | .sass-cache/ 106 | 107 | # Installshield output folder 108 | [Ee]xpress/ 109 | 110 | # DocProject is a documentation generator add-in 111 | DocProject/buildhelp/ 112 | DocProject/Help/*.HxT 113 | DocProject/Help/*.HxC 114 | DocProject/Help/*.hhc 115 | DocProject/Help/*.hhk 116 | DocProject/Help/*.hhp 117 | DocProject/Help/Html2 118 | DocProject/Help/html 119 | 120 | # Click-Once directory 121 | publish/ 122 | 123 | # Publish Web Output 124 | *.[Pp]ublish.xml 125 | *.azurePubxml 126 | ## TODO: Comment the next line if you want to checkin your 127 | ## web deploy settings but do note that will include unencrypted 128 | ## passwords 129 | #*.pubxml 130 | 131 | # NuGet Packages Directory 132 | packages/* 133 | ## TODO: If the tool you use requires repositories.config 134 | ## uncomment the next line 135 | #!packages/repositories.config 136 | 137 | # Enable "build/" folder in the NuGet Packages folder since 138 | # NuGet packages use it for MSBuild targets. 139 | # This line needs to be after the ignore of the build folder 140 | # (and the packages folder if the line above has been uncommented) 141 | !packages/build/ 142 | 143 | # Windows Azure Build Output 144 | csx/ 145 | *.build.csdef 146 | 147 | # Windows Store app package directory 148 | AppPackages/ 149 | 150 | # Others 151 | sql/ 152 | *.Cache 153 | ClientBin/ 154 | [Ss]tyle[Cc]op.* 155 | ~$* 156 | *~ 157 | *.dbmdl 158 | *.dbproj.schemaview 159 | *.pfx 160 | *.publishsettings 161 | node_modules/ 162 | 163 | # RIA/Silverlight projects 164 | Generated_Code/ 165 | 166 | # Backup & report files from converting an old project file 167 | # to a newer Visual Studio version. Backup files are not needed, 168 | # because we have git ;-) 169 | _UpgradeReport_Files/ 170 | Backup*/ 171 | UpgradeLog*.XML 172 | UpgradeLog*.htm 173 | 174 | # SQL Server files 175 | *.mdf 176 | *.ldf 177 | 178 | # Business Intelligence projects 179 | *.rdl.data 180 | *.bim.layout 181 | *.bim_*.settings 182 | 183 | # Microsoft Fakes 184 | FakesAssemblies/ 185 | 186 | # LightSwitch generated files 187 | GeneratedArtifacts/ 188 | _Pvt_Extensions/ 189 | ModelManifest.xml -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/License.txt: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, RF Digital Corp. 3 | // All rights reserved. 4 | 5 | // Redistribution and use in source and binary forms, with or without modification, 6 | // are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 24 | // WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | // THE POSSIBILITY OF SUCH DAMAGE. 26 | // 27 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFduino Compass", "RFduino Compass\RFduino Compass.csproj", "{DC3C60A7-7A93-4851-A501-41F0F87F443E}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{41F1E98F-E62F-4BDE-B9F3-4179213AF2E7}" 9 | ProjectSection(SolutionItems) = preProject 10 | License.txt = License.txt 11 | Readme.txt = Readme.txt 12 | EndProjectSection 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Debug|ARM = Debug|ARM 18 | Debug|x64 = Debug|x64 19 | Debug|x86 = Debug|x86 20 | Release|Any CPU = Release|Any CPU 21 | Release|ARM = Release|ARM 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 29 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|ARM.ActiveCfg = Debug|ARM 30 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|ARM.Build.0 = Debug|ARM 31 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|ARM.Deploy.0 = Debug|ARM 32 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x64.ActiveCfg = Debug|x64 33 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x64.Build.0 = Debug|x64 34 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x64.Deploy.0 = Debug|x64 35 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x86.ActiveCfg = Debug|x86 36 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x86.Build.0 = Debug|x86 37 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Debug|x86.Deploy.0 = Debug|x86 38 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|Any CPU.Deploy.0 = Release|Any CPU 41 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|ARM.ActiveCfg = Release|ARM 42 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|ARM.Build.0 = Release|ARM 43 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|ARM.Deploy.0 = Release|ARM 44 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x64.ActiveCfg = Release|x64 45 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x64.Build.0 = Release|x64 46 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x64.Deploy.0 = Release|x64 47 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x86.ActiveCfg = Release|x86 48 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x86.Build.0 = Release|x86 49 | {DC3C60A7-7A93-4851-A501-41F0F87F443E}.Release|x86.Deploy.0 = Release|x86 50 | EndGlobalSection 51 | GlobalSection(SolutionProperties) = preSolution 52 | HideSolutionNode = FALSE 53 | EndGlobalSection 54 | EndGlobal 55 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/App.xaml: -------------------------------------------------------------------------------- 1 |  29 | 35 | 36 | RFduino Compass 37 | 38 | 39 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/App.xaml.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, RF Digital Corp. 3 | // All rights reserved. 4 | 5 | // Redistribution and use in source and binary forms, with or without modification, 6 | // are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 24 | // WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | // THE POSSIBILITY OF SUCH DAMAGE. 26 | // 27 | using System; 28 | using Windows.ApplicationModel; 29 | using Windows.ApplicationModel.Activation; 30 | using Windows.UI.Xaml; 31 | using Windows.UI.Xaml.Controls; 32 | using Windows.UI.Xaml.Navigation; 33 | 34 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 35 | 36 | namespace RFduino_Compass 37 | { 38 | /// 39 | /// Provides application-specific behavior to supplement the default Application class. 40 | /// 41 | sealed partial class App : Application 42 | { 43 | /// 44 | /// Initializes the singleton application object. This is the first line of authored code 45 | /// executed, and as such is the logical equivalent of main() or WinMain(). 46 | /// 47 | public App() 48 | { 49 | this.InitializeComponent(); 50 | this.Suspending += OnSuspending; 51 | } 52 | 53 | /// 54 | /// Invoked when the application is launched normally by the end user. Other entry points 55 | /// will be used such as when the application is launched to open a specific file. 56 | /// 57 | /// Details about the launch request and process. 58 | protected override void OnLaunched(LaunchActivatedEventArgs e) 59 | { 60 | 61 | #if DEBUG 62 | if (System.Diagnostics.Debugger.IsAttached) 63 | { 64 | this.DebugSettings.EnableFrameRateCounter = true; 65 | } 66 | #endif 67 | 68 | Frame rootFrame = Window.Current.Content as Frame; 69 | 70 | // Do not repeat app initialization when the Window already has content, 71 | // just ensure that the window is active 72 | if (rootFrame == null) 73 | { 74 | // Create a Frame to act as the navigation context and navigate to the first page 75 | rootFrame = new Frame(); 76 | // Set the default language 77 | rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; 78 | 79 | rootFrame.NavigationFailed += OnNavigationFailed; 80 | 81 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 82 | { 83 | //TODO: Load state from previously suspended application 84 | } 85 | 86 | // Place the frame in the current Window 87 | Window.Current.Content = rootFrame; 88 | } 89 | 90 | if (rootFrame.Content == null) 91 | { 92 | // When the navigation stack isn't restored navigate to the first page, 93 | // configuring the new page by passing required information as a navigation 94 | // parameter 95 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 96 | } 97 | // Ensure the current window is active 98 | Window.Current.Activate(); 99 | } 100 | 101 | /// 102 | /// Invoked when Navigation to a certain page fails 103 | /// 104 | /// The Frame which failed navigation 105 | /// Details about the navigation failure 106 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 107 | { 108 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 109 | } 110 | 111 | /// 112 | /// Invoked when application execution is being suspended. Application state is saved 113 | /// without knowing whether the application will be terminated or resumed with the contents 114 | /// of memory still intact. 115 | /// 116 | /// The source of the suspend request. 117 | /// Details about the suspend request. 118 | private void OnSuspending(object sender, SuspendingEventArgs e) 119 | { 120 | var deferral = e.SuspendingOperation.GetDeferral(); 121 | //TODO: Save application state and stop any background activity 122 | deferral.Complete(); 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/Images/CompassNeedle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/Images/CompassNeedle.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/Images/CompassRing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/Images/CompassRing.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/Logo.scale-100.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/SmallLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/SmallLogo.scale-100.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RFduino/RFduinoApps/b7d20fe2fa606f56f65a66a3dc63861544bb1292/Windows App/RFduinoCompassApp/RFduino Compass/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Common/ObservableDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Windows.Foundation.Collections; 5 | 6 | namespace RFduino_Compass.Common 7 | { 8 | /// 9 | /// Implementation of IObservableMap that supports reentrancy for use as a default view 10 | /// model. 11 | /// 12 | public class ObservableDictionary : IObservableMap 13 | { 14 | private class ObservableDictionaryChangedEventArgs : IMapChangedEventArgs 15 | { 16 | public ObservableDictionaryChangedEventArgs(CollectionChange change, string key) 17 | { 18 | this.CollectionChange = change; 19 | this.Key = key; 20 | } 21 | 22 | public CollectionChange CollectionChange { get; private set; } 23 | public string Key { get; private set; } 24 | } 25 | 26 | private Dictionary _dictionary = new Dictionary(); 27 | public event MapChangedEventHandler MapChanged; 28 | 29 | private void InvokeMapChanged(CollectionChange change, string key) 30 | { 31 | var eventHandler = MapChanged; 32 | if (eventHandler != null) 33 | { 34 | eventHandler(this, new ObservableDictionaryChangedEventArgs(change, key)); 35 | } 36 | } 37 | 38 | public void Add(string key, object value) 39 | { 40 | this._dictionary.Add(key, value); 41 | this.InvokeMapChanged(CollectionChange.ItemInserted, key); 42 | } 43 | 44 | public void Add(KeyValuePair item) 45 | { 46 | this.Add(item.Key, item.Value); 47 | } 48 | 49 | public bool Remove(string key) 50 | { 51 | if (this._dictionary.Remove(key)) 52 | { 53 | this.InvokeMapChanged(CollectionChange.ItemRemoved, key); 54 | return true; 55 | } 56 | return false; 57 | } 58 | 59 | public bool Remove(KeyValuePair item) 60 | { 61 | object currentValue; 62 | if (this._dictionary.TryGetValue(item.Key, out currentValue) && 63 | Object.Equals(item.Value, currentValue) && this._dictionary.Remove(item.Key)) 64 | { 65 | this.InvokeMapChanged(CollectionChange.ItemRemoved, item.Key); 66 | return true; 67 | } 68 | return false; 69 | } 70 | 71 | public object this[string key] 72 | { 73 | get 74 | { 75 | return this._dictionary[key]; 76 | } 77 | set 78 | { 79 | this._dictionary[key] = value; 80 | this.InvokeMapChanged(CollectionChange.ItemChanged, key); 81 | } 82 | } 83 | 84 | public void Clear() 85 | { 86 | var priorKeys = this._dictionary.Keys.ToArray(); 87 | this._dictionary.Clear(); 88 | foreach (var key in priorKeys) 89 | { 90 | this.InvokeMapChanged(CollectionChange.ItemRemoved, key); 91 | } 92 | } 93 | 94 | public ICollection Keys 95 | { 96 | get { return this._dictionary.Keys; } 97 | } 98 | 99 | public bool ContainsKey(string key) 100 | { 101 | return this._dictionary.ContainsKey(key); 102 | } 103 | 104 | public bool TryGetValue(string key, out object value) 105 | { 106 | return this._dictionary.TryGetValue(key, out value); 107 | } 108 | 109 | public ICollection Values 110 | { 111 | get { return this._dictionary.Values; } 112 | } 113 | 114 | public bool Contains(KeyValuePair item) 115 | { 116 | return this._dictionary.Contains(item); 117 | } 118 | 119 | public int Count 120 | { 121 | get { return this._dictionary.Count; } 122 | } 123 | 124 | public bool IsReadOnly 125 | { 126 | get { return false; } 127 | } 128 | 129 | public IEnumerator> GetEnumerator() 130 | { 131 | return this._dictionary.GetEnumerator(); 132 | } 133 | 134 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() 135 | { 136 | return this._dictionary.GetEnumerator(); 137 | } 138 | 139 | public void CopyTo(KeyValuePair[] array, int arrayIndex) 140 | { 141 | int arraySize = array.Length; 142 | foreach (var pair in this._dictionary) 143 | { 144 | if (arrayIndex >= arraySize) break; 145 | array[arrayIndex++] = pair; 146 | } 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/Common/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | 8 | namespace RFduino_Compass.Common 9 | { 10 | /// 11 | /// A command whose sole purpose is to relay its functionality 12 | /// to other objects by invoking delegates. 13 | /// The default return value for the CanExecute method is 'true'. 14 | /// needs to be called whenever 15 | /// is expected to return a different value. 16 | /// 17 | public class RelayCommand : ICommand 18 | { 19 | private readonly Action _execute; 20 | private readonly Func _canExecute; 21 | 22 | /// 23 | /// Raised when RaiseCanExecuteChanged is called. 24 | /// 25 | public event EventHandler CanExecuteChanged; 26 | 27 | /// 28 | /// Creates a new command that can always execute. 29 | /// 30 | /// The execution logic. 31 | public RelayCommand(Action execute) 32 | : this(execute, null) 33 | { 34 | } 35 | 36 | /// 37 | /// Creates a new command. 38 | /// 39 | /// The execution logic. 40 | /// The execution status logic. 41 | public RelayCommand(Action execute, Func canExecute) 42 | { 43 | if (execute == null) 44 | throw new ArgumentNullException("execute"); 45 | _execute = execute; 46 | _canExecute = canExecute; 47 | } 48 | 49 | /// 50 | /// Determines whether this can execute in its current state. 51 | /// 52 | /// 53 | /// Data used by the command. If the command does not require data to be passed, this object can be set to null. 54 | /// 55 | /// true if this command can be executed; otherwise, false. 56 | public bool CanExecute(object parameter) 57 | { 58 | return _canExecute == null ? true : _canExecute(); 59 | } 60 | 61 | /// 62 | /// Executes the on the current command target. 63 | /// 64 | /// 65 | /// Data used by the command. If the command does not require data to be passed, this object can be set to null. 66 | /// 67 | public void Execute(object parameter) 68 | { 69 | _execute(); 70 | } 71 | 72 | /// 73 | /// Method used to raise the event 74 | /// to indicate that the return value of the 75 | /// method has changed. 76 | /// 77 | public void RaiseCanExecuteChanged() 78 | { 79 | var handler = CanExecuteChanged; 80 | if (handler != null) 81 | { 82 | handler(this, EventArgs.Empty); 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Windows App/RFduinoCompassApp/RFduino Compass/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  29 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |