Template: PCF8574 IO Expansion Board Arduino Guide

From Waveshare Wiki
Jump to: navigation, search

The Arduino example is written for the Arduino UNO. If you want to connect it to other Arduino boards, you may need to change the connection.

Use with Arduino

Hardware connection

PCF8574 Arduino 2.jpg
PCF8574 Arduino Description
VCC 5V Power input
GMD GND Power ground
SDA SDA I2C data input
SCL SCL SCL clock pin

Examples

  • Download the demo codes to your PC and unzip them.
  • Install the Arduino IDE on your PC.
  • Go into PCF8574_Code/Arduino/PCF8574.
  • Run the PCF8574.ino file.
  • Select the correct Board and the Port.
MQ5 Arduino 1.jpg
  • Build the project and upload it to the board.
  • Open the serial monitor of the Arduino IDE or the SSCOM software and check the serial data.
PCF8574 Arduino 1.jpg

Running Effect

  • You can use a multimeter to test the voltage value of each IO port, the normal is that P0~P3 is high, and P4~P7 is low.
  • Open the serial debugging software to show the current level of the 8 IOs.