Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Consider a Temperature Control Project, in which a microcontroller is used to communicate with a temperature sensor. The temperature sensor uses I-wire protocol

In C++ Consider a Temperature Control Project, in which a microcontroller is used to communicate with a temperature sensor. The temperature sensor uses I-wire protocol to send the temperature value represented in 16 bits binary format (one bit everyone second),

The procedure to read the temperature is performed as follows:

1. The Microcontroller sends the 8 bits READ TEMP command (10110011) to the sensor (one bit every one second).

2. When the READ_TEMP command is received by the sensor, it will keep the bus high (1) until the temperature data becomes available.

3. The Microcontroller must waits until the bus become low by the temperature sensor (i.e. temperature data is ready).

4. The Microcontroller starts to read the temperature, which is prepared by the sensor in 2 bytes

Write the C++ Program to print the temperature every 1 minute. Also it is required to display a warning message in the temperature is higher than 32 degree Celsius.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

Define and discuss the nature of ethnocentrism and racism

Answered: 1 week ago