Things used in this project

Hardware components:
Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout Board
×1
Pi 3 02
Raspberry Pi 3 Model B
×1
Tactile Button Switch
×1
Large Breadboard
×1
Cobbler Breakout Kit
Optional
×1
10K Ω Resistor
×2
220 Ω Resistor
×4
Red LED
×1
Blue LED
×1
Green LED
×1
Yellow LED
×1
11026 02
Jumper wires (generic)
Male-to-Male if using cobbler, Male-to-Female if you are making connections directly to the Raspberry Pi.
×1
Software apps and online services:
W9gt7hzo
Microsoft Azure
10
Microsoft Windows 10 IoT Core
Vs2015logo
Microsoft Visual Studio 2015

Schematics

Fritzing
Connections made directly to the Raspberry Pi.
Sensor_Telemetry.fzz
Breadboard
Connections made directly to the Raspberry Pi.
Sensor telemetry bb
Schematic
Connections made directly to the Raspberry Pi.
Sensor telemetry schem
Fritzing
Connections made using Vilros Cobbler.
Sensor_Telemetry_Cobbler.fzz
Breadboard
Connections made using Vilros Cobbler.
Sensor telemetry cobbler bb

Code

SQLSQL
Use this script to create the SensorReadings table in your SQL Server database.
USE [SensorTelemetry];
GO

CREATE TABLE [dbo].[SensorReadings]
    (
      [Id] [NVARCHAR](128) NOT NULL ,
      [TimestampUtc] [DATETIME] NOT NULL ,
      [Source] [INT] NOT NULL ,
      [Temperature] [REAL] NOT NULL ,
      [IsCritical] [INT] NOT NULL ,
      [IsAboveUpperThreshold] [INT] NOT NULL ,
      [IsBelowLowerThreshold] [INT] NOT NULL ,
      [Version] [TIMESTAMP] NULL ,
      [CreatedAt] [DATETIMEOFFSET](7) NULL ,
      [UpdatedAt] [DATETIMEOFFSET](7) NULL ,
      [Deleted] [BIT] NULL ,
      CONSTRAINT [PK_dbo.SensorReadings] PRIMARY KEY NONCLUSTERED ( [Id] ASC )
        WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
               IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
               ALLOW_PAGE_LOCKS = ON )
    );
GO

ALTER TABLE dbo.SensorReadings ADD CONSTRAINT [DF_SensorReadings_Id] DEFAULT (NEWID()) FOR [Id];
GO

ALTER TABLE dbo.SensorReadings ADD CONSTRAINT [DF_SensorReadings_CreatedAt] DEFAULT (SYSUTCDATETIME()) FOR [CreatedAt];
GO

ALTER TABLE dbo.SensorReadings ADD CONSTRAINT [DF_SensorReadings_UpdatedAt] DEFAULT (SYSUTCDATETIME()) FOR [UpdatedAt];
GO

ALTER TABLE dbo.SensorReadings ADD CONSTRAINT [DF_SensorReadings_Deleted] DEFAULT ((0)) FOR [Deleted];
GO
Visual Studio 2015 C# Source Code

Credits

Mysocialphoto
Daniel Porrey
48 projects • 187 followers
I lead a software development team for a large Chicago based organization. I also develop applications personally.
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog