diff --git a/Application/blink/.ccsproject b/Application/blink/.ccsproject
new file mode 100644
index 0000000..47819cb
--- /dev/null
+++ b/Application/blink/.ccsproject
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/blink/.cproject b/Application/blink/.cproject
new file mode 100644
index 0000000..cb1ac99
--- /dev/null
+++ b/Application/blink/.cproject
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/blink/.gitignore b/Application/blink/.gitignore
new file mode 100644
index 0000000..3df573f
--- /dev/null
+++ b/Application/blink/.gitignore
@@ -0,0 +1 @@
+/Debug/
diff --git a/Application/blink/.launches/blink.launch b/Application/blink/.launches/blink.launch
new file mode 100644
index 0000000..0cfb451
--- /dev/null
+++ b/Application/blink/.launches/blink.launch
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/blink/.project b/Application/blink/.project
new file mode 100644
index 0000000..c83ea79
--- /dev/null
+++ b/Application/blink/.project
@@ -0,0 +1,27 @@
+
+
+ blink
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ com.ti.ccstudio.core.ccsNature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/Application/blink/.settings/org.eclipse.cdt.codan.core.prefs b/Application/blink/.settings/org.eclipse.cdt.codan.core.prefs
new file mode 100644
index 0000000..f653028
--- /dev/null
+++ b/Application/blink/.settings/org.eclipse.cdt.codan.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/Application/blink/.settings/org.eclipse.cdt.debug.core.prefs b/Application/blink/.settings/org.eclipse.cdt.debug.core.prefs
new file mode 100644
index 0000000..2adc7b1
--- /dev/null
+++ b/Application/blink/.settings/org.eclipse.cdt.debug.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/Application/blink/.settings/org.eclipse.core.resources.prefs b/Application/blink/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..093dbb9
--- /dev/null
+++ b/Application/blink/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+encoding//Debug/makefile=UTF-8
+encoding//Debug/objects.mk=UTF-8
+encoding//Debug/sources.mk=UTF-8
+encoding//Debug/subdir_rules.mk=UTF-8
+encoding//Debug/subdir_vars.mk=UTF-8
diff --git a/Application/blink/README.md b/Application/blink/README.md
new file mode 100644
index 0000000..4b75bde
--- /dev/null
+++ b/Application/blink/README.md
@@ -0,0 +1,20 @@
+## InK blinking LED
+
+### Hardware requirement
+This demo is developed for [MSP430FR5969 LaunchPad](http://www.ti.com/tool/MSP-EXP430FR5969) with [TI Code Composer Studio™ IDE](http://www.ti.com/design-resources/embedded-development/ccs-development-tools.html).
+
+Mainly the following components on the board are used:
+
+* Button S1 (P4.5) and S2 (P1.1)
+* Red LED 1 (P4.6) and green LED 2 (P1.0)
+* A 32-kHz crystal (Y4)
+
+### Features
+
+* Pushing button S1 triggers the red LED to blink quickly for four times
+* Pushing button S2 triggers the green LED to blink slowly for four times
+* The red LED has higher priority over the green LED, so red LED blinking could preempt green LED blinking
+* Power failure resilience
+ * For example, if power is lost at the second blinking of the green LED, after power is back online the green LED will continue blinking and finish the whole process of blinking four times
+ * Priority and preemption are kept during power failure and could be restored after power recovery
+* Ultra low power enabled by using RTC, LFXT and LPM3
\ No newline at end of file
diff --git a/Application/blink/appinit.c b/Application/blink/appinit.c
new file mode 100644
index 0000000..03ef1a7
--- /dev/null
+++ b/Application/blink/appinit.c
@@ -0,0 +1,82 @@
+// This file is part of InK.
+//
+// author = "Philo Tang"
+// maintainer = "Philo Tang"
+// email = "H.TANG-1@student.tudelft.nl"
+//
+// copyright = "Copyright 2018 Delft University of Technology"
+// license = "LGPL"
+// version = "3.0"
+// status = "Production"
+//
+//
+// InK is free software: you ca n redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#include "ink.h"
+
+#define THREAD1 7
+#define THREAD2 15
+
+extern void thread1_init();
+extern void thread2_init();
+
+// this is the function that will be called only at initial boot by the runtime.
+void __app_init(){
+ thread1_init();
+ thread2_init();
+}
+
+void __app_reboot(){
+ // Configure GPIO
+ P1OUT = 0;
+ P4OUT = 0;
+ P1DIR |= BIT0;
+ P4DIR |= BIT6;
+
+ P1OUT |= BIT1; // Pull-up resistor on P1.1
+ P1REN |= BIT1; // Select pull-up mode for P1.1
+ P1DIR &= ~BIT1;
+ P1IES |= BIT1; // P1.1 Hi/Lo edge
+ P1IFG = 0; // Clear all P1 interrupt flags
+ P1IE |= BIT1; // P1.1 interrupt enabled
+
+ P4OUT |= BIT5; // Pull-up resistor on P4.5
+ P4REN |= BIT5; // Select pull-up mode for P4.5
+ P4DIR &= ~BIT5;
+
+ PJSEL0 = BIT4 | BIT5; // Initialize LFXT pins
+
+ // Configure LFXT 32kHz crystal
+ CSCTL0_H = CSKEY >> 8; // Unlock CS registers
+ CSCTL4 &= ~LFXTOFF; // Enable LFXT
+ do
+ {
+ CSCTL5 &= ~LFXTOFFG; // Clear LFXT fault flag
+ SFRIFG1 &= ~OFIFG;
+ } while (SFRIFG1 & OFIFG); // Test oscillator fault flag
+ CSCTL0_H = 0; // Lock CS registers
+}
+
+_interrupt(PORT1_VECTOR)
+{
+ P1IFG &= ~BIT1; // Clear P1.1 IFG
+ __SIGNAL((P4IN & BIT5) ? THREAD2 : THREAD1);
+ LPM3_EXIT;
+}
+
+_interrupt(RTC_VECTOR)
+{
+ RTCPS1CTL &= ~RT1PSIE; // disable RTC Prescale Timer 1 Interrupt
+ LPM3_EXIT;
+}
diff --git a/Application/blink/lnk_msp430fr5969.cmd b/Application/blink/lnk_msp430fr5969.cmd
new file mode 100644
index 0000000..e6e384d
--- /dev/null
+++ b/Application/blink/lnk_msp430fr5969.cmd
@@ -0,0 +1,345 @@
+/* ============================================================================ */
+/* Copyright (c) 2017, Texas Instruments Incorporated */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions */
+/* are met: */
+/* */
+/* * Redistributions of source code must retain the above copyright */
+/* notice, this list of conditions and the following disclaimer. */
+/* */
+/* * Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* * Neither the name of Texas Instruments Incorporated nor the names of */
+/* its contributors may be used to endorse or promote products derived */
+/* from this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */
+/* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, */
+/* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */
+/* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
+/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */
+/* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */
+/* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
+/* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */
+/* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
+/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/* ============================================================================ */
+
+/******************************************************************************/
+/* lnk_msp430fr5969.cmd - LINKER COMMAND FILE FOR LINKING MSP430FR5969 PROGRAMS */
+/* */
+/* Usage: lnk430 -o -m