LCD, ledcontrollers and output device


  1. screen that tells what may and what not.

  2. two or more led controllers that tells the state of the led (dimming from 0-255). The led controllers have push buttons that needs to send back to the lcd display.

  3. Arduino that combines the ledcontrollers and send it to the pwm board

  4. pwm board with the leds connected too.

I want some advice how too connect them too each other.

please see my schematic.

OP's Pic:

Simple guide for inserting images in a post


I established an connection between LCD arduino(master) and ledcontrollers (two slaves) in two direction with I2C anything.

How it works? Master -> Send flag when changes -> Send request every 2 seconds to receive information Slave -> if master send request infrormation send it too master -> check every loop if received

I think it's not possible to send from slave to slave, If I make the "arduino output" a slave. The connection needs to be a 5ms in stead of 2 seconds to achieve dimming leds (0-255). Soo sending too the master, would be to slow with I2C anything.

I am not sure why you need that many controllers. The Arduino Mega is a microcontroller board based on the ATmega1280 (datasheet). It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. Also the I2C could do what you want but wire length etc without proper hardware will kill it. Consider using a RS-485 physical layer in multi master mode.This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!

I appreciate that. It for short distance use and I need it because I have different loops on the same time. I prefer the I2C over the rs485 for my objective. I will look into that. Thanks.