This project involves designing a master-slave microcontroller system using Tinkercad. The system utilizes two Arduino boards to monitor environmental conditions and control physical outputs based on a predefined state machine.
Before beginning, please review the following tutorials on Arduino basics and circuit design:
- 2x Arduino Boards (Configured to communicate in a Master-Slave setup)
- Sensor Arduino (Master):
- Photoresistor (LDR)
- Gas Sensor
- Temperature Sensor
- Servo Motor
- Piezo Buzzer
- Display/Control Arduino (Slave):
- LCD Screen
- IR Sensor and Remote
- please use a 1Kohm Resister as your gas sensor pulldown resistor.
- You must use I2C to make the Arduino's communicate
- You may use a normal screen or an I2C screen, however using an I2C screen would be awarded extra points if BOTH the other code and the screen work properly.
The system must operate strictly based on the following states and conditions:
- Trigger: System is powered on.
- Action: Sensors are powered but inactive. The system waits for an activation command via the IR remote.
- LCD Output:
"AWAITING RITUAL"
- Trigger: Activation command received from the IR remote.
- Action: The Master Arduino actively polls the photoresistor and gas sensor.
- Controls: The user can press a button on the IR remote to toggle the LCD display between showing ambient light levels and gas/air purity percentages.
- Trigger: Gas sensor reads >180 units of volatile compounds.
- Action: Overrides standard LCD telemetry.
- LCD Output:
"TOXIC PURGE" - Resolution: The system stays in this state until gas levels drop below 130 units, returning automatically to State 1.
- Trigger: Photoresistor detects a sudden, absolute drop in ambient light.
- Action: The system ignores standard IR commands until lighting is restored and logs the event.
- LCD Output:
"NOCTIS PROTOCOL"
- Trigger: Temperature sensor registers above 45°C.
- Action: This state strictly overrides States 0, 1, 2, and 3. The servo motor actuates to 180 degrees (simulating emergency venting).
- LCD Output:
"COOKED" - Resolution: Requires a manual reset command sent via the IR Remote to exit this state.
- Trigger: A combination of State 2 and State 3 occurring simultaneously (excluding State 4).
- Action: The Piezo buzzer sounds continuously.
- LCD Output:
"MULTIPLE PROBLEMS DETECTED" - Resolution: Automatically resolves to the appropriate state if the sensor readings change.
- Submit a .txt file with a link to the tinkercad task as a comment in your code.
- Follow the main Induction Repo's submission guidelines.
- Added pulldown resistor reccomendations
- gas sensor threshold changed to 180 instead of 130