![]() |
|
[Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20) +--- Forum: KC868-A6 (https://www.kincony.com/forum/forumdisplay.php?fid=22) +--- Thread: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code (/showthread.php?tid=1865) |
[Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - KinCony Support - 04-25-2022 [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-DI_code Code: #include "Arduino.h"RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - sunrise - 11-19-2024 not work! manual ? RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - admin - 11-19-2024 ??? RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - tanoshimi - 01-25-2025 It won't compile because it references an external library (PCF8574.h). But there's several libraries called that... I'm not sure which one Kincony uses: https://github.com/RobTillaart/PCF8574 https://github.com/xreef/PCF8574_library ? Or something else? RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - admin - 01-26-2025 here is PCF8574 arduino library we are using.
PCF8574_library.zip (Size: 23.8 MB / Downloads: 595)
RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - tochinet - 06-27-2025 (01-26-2025, 12:59 AM)admin Wrote: here is PCF8574 arduino library we are using. That is the xreef one. BTW, you also need the I2C "Wire.h" library for your project to work. Both libraries (RobTillart and Mischianti) are maintained, and they are both using C++ approach : a chip is an object from PCF8574 class. So the same code is used for bothchips, with only the parameters of the chip stored separately. However, note that one PCF is for digital inputs and the other for relays, so don't expect too much synergies ;-) RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - ksarz - 06-30-2025 Hi! The Arduino.h and pcf8574.h librsrys on must be in the SAME directory or different ones? RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - admin - 06-30-2025 PCF8574 arduino library copy to your arduino system library folder. RE: [Arduino IDE demo source code for KC868-A6]--#07-PCF8574-Digital input code - tochinet - 07-01-2025 (06-30-2025, 02:07 PM)ksarz Wrote: Hi! The Arduino.h and pcf8574.h librsrys on must be in the SAME directory or different ones? The usual rule is that #include <library1.h> // is for libraries in your library forlder #include "library2.h" // is for libraries in the same directory as your .ino file. You can go both ways, but the .zip file given by the admin is 20MB big (lots of "resources', most unrelated to KC868), while the .h and .cpp (the only two files needed) are 40kB. However, if you copy locally (my preference), you'll have to do that in all the directories if you have several programs. BTW, the WifiManager.h library is not by default in my library folder either. I downloaded it using the library manager. The PCF8574 library is there as well, but you may need to scroll down a lot, it is called "PCF8574 library by Renzo Mischianti". It is now version 2.3.7, more recent than the .zip file, but that shouldn't make a difference. |