Here is my second project for the parts I got
This is the setup I ended up with:
*Note, I should have added a resistor to the LED hooked up to the PCF, 330 ohm should be fine.
The code for this project was simple. With this setup, I can just send the byte I receive from the PCF hooked to the button straight to the PCF hooked up to the LED.
Here is the result:
This project has a lot more going on with it then it seems. The LED and button are neither connected to each other or the Arduino directly; They are each hooked to their own PCF chip. So this is really a project about getting three devices to talk aver I2C, one master (the Arduino), and two slaves (the PCF chips). This really shows off how nice the PCF's are, since they all talk to the Arduino though the same two wires.
Here is my code:
No comments:
Post a Comment