Argon wire lib problem

#include <PCA9534.h>

/* Example usage for PCA9534 library by Abdulrahman Saleh Khamis. */

int nRSTGP 	=	    0;  // nRSTGP  connected to GPIO-0 as output   
int ENMOTOR	=	    1;  // ENMOTOR  connected to GPIO-1 as output
int MDRIVE1	=	    2;  // MDRIVE1 connected to GPIO-2 as output
int MDRIVE2 =	    3;  // MDRIVE2 connected to GPIO-3 as output
int EP4		=	    4 ; // EP4 LED connected to GPIO-4 as output
int EP5		=	    5;  // EP5 LED connected to GPIO-5 as ou
int ENPRESURE =	6;  // ENPRESURE connected to GPIO-6 as output
int ENULTRA =		7;  // ENULTRA connected to GPIO-7 as output

PCA9534 gpio;

// Helps ensure the application loop is not interrupted by the system
// background processing and network management.

void setup() {
  gpio.pinMode(nRSTGP, OUTPUT);
  gpio.pinMode(ENMOTOR, OUTPUT);
  gpio.pinMode(MDRIVE1, OUTPUT);
  gpio.pinMode(MDRIVE2, OUTPUT);
  gpio.pinMode(EP4, OUTPUT);
  gpio.pinMode(EP5, OUTPUT);
  gpio.pinMode(ENPRESURE, OUTPUT);
  gpio.pinMode(ENULTRA, OUTPUT);
  pinMode(D2, OUTPUT);

void loop() {
  //  gpio.digitalWrite(EP4, HIGH); // LED On
  //  gpio.digitalWrite(EP4, HIGH); // LED Off
  digitalWrite(D2, HIGH);
 //   gpio.digitalWrite(EP5, LOW); // LED On
 //   gpio.digitalWrite(EP5, LOW); // LED Off
  digitalWrite(D2, LOW);

on the scope there is a missing third byte, writing 0x00 or 0xff is not present in the bit stream

this is a show stopper

Have you tried with Wire.endTransmission(true) (although this should be default, it shouldn’t harm to test)?

BTW, what device OS version are you running?

Wire.endTransmission(true) OK i’ll try it

I updated to 1.5.1

Art Sobel
Hardware Engineering
Advanced RISC Technology

Turned out this was TCA9534 with an address of 0x38 instead of 0x20

however the TCA9534 library on the IDE is different and does not want to compile Is it OK to modify the PCA9534 library and include it in my code?

I tested the modified PCA9534 library and it works. I’d like to contribute it to the commons and [shit] can that existing TCA9534 library

1 Like