Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino source code for KC868-A8M]-05 OUTPUT
#1
Code:
#include "Arduino.h"
#include "PCF8574.h"

#define SDA 5
#define SCL 4

PCF8574 pcf8574_RE1(0x24,SDA,SCL);//DO
void setup()
{
    Serial.begin(115200);
for(int i=0;i<=7;i++)
{
   pcf8574_RE1.pinMode(i, OUTPUT);
}
   pcf8574_RE1.begin();

for(int i=0;i<=7;i++)
{
  pcf8574_RE1.digitalWrite(i, LOW);delay(200);
}
for(int i=0;i<=7;i++)
{
  pcf8574_RE1.digitalWrite(i, HIGH);delay(200);
}   
}

void loop()
{
  /******Output is all off by default, and can be turned
on or off manually when pressed by the keypad**************/
for(int i=0;i<=7;i++)
{
  pcf8574_RE1.digitalWrite(i, HIGH);delay(100);
}

}
[Arduino source code for KC868-A8M]-05 OUTPUT


Attached Files
.zip   KC868-A8M_OUTPUT.zip (Size: 664 bytes / Downloads: 142)
Reply


Forum Jump:


Users browsing this thread: