72. UART-Based LEDs Control

Design a system where two microcontrollers communicate via UART (Serial Communication) to achieve the following functionalities-

Functionalities

  1. A potentiometer connected to microcontroller1, controls the brightness of an LED2 connected to microcontroller2.
  2. A push button switch connected to microcontroller2, toggles the ON/OFF status of an LED1 connected to microcontroller1.
  3. Serial terminal(e.g., Putty, Arduino IDE) output
    • Microcontroller2 prints the received ADC values [0 to 1023].
    • Microcontroller1 prints the LED1 status [ON or OFF].

Example using two Arduino UNO boards

 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!