Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Libraries
#6
Bonjour à tous,
En utilisant platformIO et après beaucoup d'hésitations, la copie suivante fonctionne :
#include <Arduino.h>
#include <pcf8574.h>
PCF8574 pcf8574(0x24, 04, 15);

void setup() {
Serial.begin(115200);
pcf8574.pinMode (P0, OUTPUT);
pcf8574.pinMode (P1, OUTPUT);
pcf8574.pinMode (P2, OUTPUT);
pcf8574.pinMode (P3, OUTPUT);
pcf8574.pinMode (P4, OUTPUT);
pcf8574.pinMode (P5, OUTPUT);
pcf8574.digitalWrite(P0,HIGH);
pcf8574.digitalWrite(P1,HIGH);
pcf8574.digitalWrite(P2,HIGH);
pcf8574.digitalWrite(P3,HIGH);
pcf8574.digitalWrite(P4,HIGH);
pcf8574.digitalWrite(P5,HIGH);
Serial.print("Init8574 OK ? ");
if (pcf8574.begin())
{Serial.print(" c'est bon");}
else
{Serial.print(" c'est nul");}
Serial.printf(".");
}

void loop() {
delay(1000);
pcf8574.digitalWrite(P0,LOW);
delay(1000);
pcf8574.digitalWrite(P0,HIGH);
Serial.print(".");
}
Si je peux me permettre, platformIO est très agréable pour développer lorsqu'il est bien installé

Bonne fin d'année à tous
Djoii
Reply


Messages In This Thread
Libraries - by Vulcan - 12-20-2022, 04:22 AM
RE: Libraries - by admin - 12-20-2022, 06:14 AM
RE: Libraries - by Vulcan - 12-21-2022, 02:47 PM
RE: Libraries - by Djoii - 12-20-2022, 08:24 AM
RE: Libraries - by admin - 12-22-2022, 01:19 AM
RE: Libraries - by Djoii - 12-30-2022, 05:45 PM
RE: Libraries - by admin - 12-31-2022, 01:32 AM
RE: Libraries - by Djoii - 01-01-2023, 09:34 AM
RE: Libraries - by admin - 01-02-2023, 06:30 AM
RE: Libraries - by Djoii - 01-02-2023, 08:28 PM
RE: Libraries - by admin - 01-03-2023, 01:29 AM
RE: Libraries - by Djoii - 01-04-2023, 06:19 PM
RE: Libraries - by admin - 01-04-2023, 11:56 PM
RE: Libraries - by Djoii - 01-05-2023, 09:34 AM
RE: Libraries - by admin - 01-05-2023, 10:07 AM
RE: Libraries - by Djoii - 01-10-2023, 05:59 PM
RE: Libraries - by admin - 01-11-2023, 01:37 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)