diff --git a/.gitignore b/.gitignore
index fbf9197..d7129dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -337,4 +337,5 @@ ASALocalRun/
.localhistory/
# BeatPulse healthcheck temp database
-healthchecksdb
\ No newline at end of file
+healthchecksdb
+/SensingMyselfDevice/SensingMyselfDevice/out/ARM-Debug
diff --git a/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj b/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj
deleted file mode 100644
index c1a83a7..0000000
--- a/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
- Debug
- ARM
-
-
- Release
- ARM
-
-
-
- {332b66f9-46dd-46a8-9cd0-0b6e512577e9}
- AzureSphere
- HeartRate4
- 15.0
- Linux
- 1.0
- Generic
- {D51BCBC9-82E9-4017-911E-C93873C4EA2B}
- Device
- GCC_AzureSphere_1_0
- $(MSBuildProjectDirectory)\Inc\Public
- $(MSBuildProjectDirectory)\Inc\Public
-
-
-
- true
- 2
- StaticLibrary
-
-
- false
- 2
- StaticLibrary
-
-
-
-
-
-
-
-
- -Werror=implicit-function-declaration %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj.filters b/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj.filters
deleted file mode 100644
index e865f97..0000000
--- a/SensingMyselfDevice/HeartRate4/HeartRate4.vcxproj.filters
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
-
\ No newline at end of file
diff --git a/SensingMyselfDevice/SensingMyselfDevice.sln b/SensingMyselfDevice/SensingMyselfDevice.sln
deleted file mode 100644
index 01bb305..0000000
--- a/SensingMyselfDevice/SensingMyselfDevice.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29324.140
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SensingMyselfDevice", "SensingMyselfDevice\SensingMyselfDevice.vcxproj", "{CE7E0595-8EC6-4B74-8216-03075DA17F47}"
- ProjectSection(ProjectDependencies) = postProject
- {332B66F9-46DD-46A8-9CD0-0B6E512577E9} = {332B66F9-46DD-46A8-9CD0-0B6E512577E9}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HeartRate4", "HeartRate4\HeartRate4.vcxproj", "{332B66F9-46DD-46A8-9CD0-0B6E512577E9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM = Debug|ARM
- Release|ARM = Release|ARM
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CE7E0595-8EC6-4B74-8216-03075DA17F47}.Debug|ARM.ActiveCfg = Debug|ARM
- {CE7E0595-8EC6-4B74-8216-03075DA17F47}.Debug|ARM.Build.0 = Debug|ARM
- {CE7E0595-8EC6-4B74-8216-03075DA17F47}.Release|ARM.ActiveCfg = Release|ARM
- {CE7E0595-8EC6-4B74-8216-03075DA17F47}.Release|ARM.Build.0 = Release|ARM
- {332B66F9-46DD-46A8-9CD0-0B6E512577E9}.Debug|ARM.ActiveCfg = Debug|ARM
- {332B66F9-46DD-46A8-9CD0-0B6E512577E9}.Debug|ARM.Build.0 = Debug|ARM
- {332B66F9-46DD-46A8-9CD0-0B6E512577E9}.Release|ARM.ActiveCfg = Release|ARM
- {332B66F9-46DD-46A8-9CD0-0B6E512577E9}.Release|ARM.Build.0 = Release|ARM
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {20D2EAD2-083D-4157-B40A-0EC6FC888BEF}
- EndGlobalSection
-EndGlobal
diff --git a/SensingMyselfDevice/SensingMyselfDevice/CMakeLists.txt b/SensingMyselfDevice/SensingMyselfDevice/CMakeLists.txt
new file mode 100644
index 0000000..59d80cd
--- /dev/null
+++ b/SensingMyselfDevice/SensingMyselfDevice/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+cmake_minimum_required(VERSION 3.10)
+
+project(SensingMyself C)
+
+azsphere_configure_tools(TOOLS_REVISION "20.04")
+azsphere_configure_api(TARGET_API_SET "5+Beta2004")
+
+add_executable(${PROJECT_NAME} main.c azure_iot_utilities.c parson.c max30102.c oledc_driver.c oledc_hal.c algorithm_by_RF.c )
+target_include_directories(${PROJECT_NAME} PUBLIC ${AZURE_SPHERE_API_SET_DIR}/usr/include/azureiot)
+target_compile_definitions(${PROJECT_NAME} PUBLIC AZURE_IOT_HUB_CONFIGURED)
+target_link_libraries(${PROJECT_NAME} m azureiot applibs pthread gcc_s c)
+
+target_compile_options(${PROJECT_NAME} PRIVATE -w)
+
+azsphere_target_add_image_package(${PROJECT_NAME})
diff --git a/SensingMyselfDevice/SensingMyselfDevice/CMakeSettings.json b/SensingMyselfDevice/SensingMyselfDevice/CMakeSettings.json
new file mode 100644
index 0000000..fdcf158
--- /dev/null
+++ b/SensingMyselfDevice/SensingMyselfDevice/CMakeSettings.json
@@ -0,0 +1,47 @@
+{
+ "environments": [
+ {
+ "environment": "AzureSphere"
+ }
+ ],
+ "configurations": [
+ {
+ "name": "ARM-Debug",
+ "generator": "Ninja",
+ "configurationType": "Debug",
+ "inheritEnvironments": [
+ "AzureSphere"
+ ],
+ "buildRoot": "${projectDir}\\out\\${name}",
+ "installRoot": "${projectDir}\\install\\${name}",
+ "cmakeToolchain": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake",
+ "buildCommandArgs": "-v",
+ "ctestCommandArgs": "",
+ "variables": [
+ {
+ "name": "AZURE_SPHERE_TARGET_API_SET",
+ "value": "latest-beta"
+ }
+ ]
+ },
+ {
+ "name": "ARM-Release",
+ "generator": "Ninja",
+ "configurationType": "Release",
+ "inheritEnvironments": [
+ "AzureSphere"
+ ],
+ "buildRoot": "${projectDir}\\out\\${name}",
+ "installRoot": "${projectDir}\\install\\${name}",
+ "cmakeToolchain": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake",
+ "buildCommandArgs": "-v",
+ "ctestCommandArgs": "",
+ "variables": [
+ {
+ "name": "AZURE_SPHERE_TARGET_API_SET",
+ "value": "latest-beta"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/SensingMyselfDevice/HeartRate4/HeartRate4.c b/SensingMyselfDevice/SensingMyselfDevice/HeartRate4.c
similarity index 96%
rename from SensingMyselfDevice/HeartRate4/HeartRate4.c
rename to SensingMyselfDevice/SensingMyselfDevice/HeartRate4.c
index 77f9226..6662768 100644
--- a/SensingMyselfDevice/HeartRate4/HeartRate4.c
+++ b/SensingMyselfDevice/SensingMyselfDevice/HeartRate4.c
@@ -1 +1 @@
-#include
+#include
diff --git a/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj b/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj
deleted file mode 100644
index cfc1256..0000000
--- a/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
- Debug
- ARM
-
-
- Release
- ARM
-
-
-
- {ce7e0595-8ec6-4b74-8216-03075da17f47}
- AzureSphere
- SensingMe
- 15.0
- Linux
- 1.0
- Generic
- {D51BCBC9-82E9-4017-911E-C93873C4EA2B}
- Device
- GCC_AzureSphere_1_0
-
-
-
- true
- 3+Beta1909
-
-
- false
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {332b66f9-46dd-46a8-9cd0-0b6e512577e9}
-
-
-
-
-
-
- -Werror=implicit-function-declaration %(AdditionalOptions)
- ../HeartRate4;%(AdditionalIncludeDirectories)
-
-
- applibs;pthread;gcc_s;c;azureiot
- -Wl,--no-undefined -nodefaultlibs %(AdditionalOptions)
-
-
-
\ No newline at end of file
diff --git a/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj.filters b/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj.filters
deleted file mode 100644
index 6ab8a1c..0000000
--- a/SensingMyselfDevice/SensingMyselfDevice/SensingMyselfDevice.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
\ No newline at end of file
diff --git a/SensingMyselfDevice/HeartRate4/algorithm_by_RF.c b/SensingMyselfDevice/SensingMyselfDevice/algorithm_by_RF.c
similarity index 100%
rename from SensingMyselfDevice/HeartRate4/algorithm_by_RF.c
rename to SensingMyselfDevice/SensingMyselfDevice/algorithm_by_RF.c
diff --git a/SensingMyselfDevice/HeartRate4/algorithm_by_RF.h b/SensingMyselfDevice/SensingMyselfDevice/algorithm_by_RF.h
similarity index 100%
rename from SensingMyselfDevice/HeartRate4/algorithm_by_RF.h
rename to SensingMyselfDevice/SensingMyselfDevice/algorithm_by_RF.h
diff --git a/SensingMyselfDevice/SensingMyselfDevice/launch.vs.json b/SensingMyselfDevice/SensingMyselfDevice/launch.vs.json
new file mode 100644
index 0000000..26e6d2b
--- /dev/null
+++ b/SensingMyselfDevice/SensingMyselfDevice/launch.vs.json
@@ -0,0 +1,21 @@
+{
+ "version": "0.2.1",
+ "defaults": {},
+ "configurations": [
+ {
+ "type": "azurespheredbg",
+ "name": "GDB Debugger (HLCore)",
+ "project": "CMakeLists.txt",
+ "inheritEnvironments": [
+ "AzureSphere"
+ ],
+ "customLauncher": "AzureSphereLaunchOptions",
+ "workingDirectory": "${workspaceRoot}",
+ "applicationPath": "${debugInfo.target}",
+ "imagePath": "${debugInfo.targetImage}",
+ "targetCore": "HLCore",
+ "targetApiSet": "${env.AzureSphereTargetApiSet}",
+ "partnerComponents": [ "1ee4e525-4456-4a63-a2af-e2a2cb1518e9" ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/SensingMyselfDevice/HeartRate4/max30102.c b/SensingMyselfDevice/SensingMyselfDevice/max30102.c
similarity index 100%
rename from SensingMyselfDevice/HeartRate4/max30102.c
rename to SensingMyselfDevice/SensingMyselfDevice/max30102.c
diff --git a/SensingMyselfDevice/HeartRate4/max30102.h b/SensingMyselfDevice/SensingMyselfDevice/max30102.h
similarity index 100%
rename from SensingMyselfDevice/HeartRate4/max30102.h
rename to SensingMyselfDevice/SensingMyselfDevice/max30102.h