Question: Using TinkerCAD software, please write the code on for the two Arduinos (Master and Slave arduino) as follows: The master Arduino operates in one of
Using TinkerCAD software, please write the code on for the two Arduinos (Master and Slave arduino) as follows:
The master Arduino operates in one of two modes. - 1. When t is entered through the serial communication window, the master Arduino will change to temperature mode.
2. The master Arduino sends a command to the Slave Arduino telling it to transmit the ADC value from the temperature sensor.
3. The master Arduino will display the temperature in the serial window in the following format: Temperature (in C) is: xx.xx.
4. The master Arduino will update the temperature reading once a second.
5. When g is entered through the serial communication window, the master Arduino will change to smoke detection mode. The master Arduino sends a command to the Slave Arduino telling it to transmit the ADC value from the gas sensor.
6. The master Arduino will display the status in the serial window as: Normal, Smoke or Fire.
7. The master Arduino will update the gas sensor output once a second. When the system is in temperature mode, changing the gas sensor will have no effect. When the system is in smoke detection mode, changing the temperature sensor will have no effect.
*Please include your code for both Arduinos and a screenshot of your complete circuit. Thanks!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
