Orion MeWire


#1

Hi, I’m Kaysan

I have a small problem with the Makeblock library.
I wish to communicate between 2 Orion cards with I2C MeWire.

When I test it

#include Makeblock.h

MeWire I2CMASTER (PORT_6, 0x06);

I have this error

C:\....\Arduino\libraries\makeblock\src/MeUltrasonicSensor.cpp:52: multiple definition of `MeUltrasonicSensor::distanceInch(unsigned int)'

libraries\makeblock\Makeblock.cpp.o:C:\...\Arduino\libraries\makeblock\src/Makeblock.cpp:27: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling.

someone can help me ?

thanks


#2

In Makeblock.h

  366 class MeWire: public MePort
  367 {
  368 public:
  369     MeWire(uint8_t address);
  372     MeWire(uint8_t port, uint8_t address);
  374     void setI2CBaseAddress(uint8_t baseAddress);
  375     bool isRunning();
  378     void begin();
  380     byte read(byte dataAddress);
  381     void read(byte dataAddress,uint8_t *buf,int len);
  383     void write(byte dataAddress, byte data);
  384     void request(byte* writeData,byte*readData,int wlen,int rlen);
  385 protected:
  386     int _slaveAddress;
  387 };

#3

Try changing to the Orion library instead of the Makeblock library. The hardware definitions seem to have a conflict.

I am very interested in the implementation, keep us posted!