What The 0xFE

Hello Arduino,
It may be a very silly question to many people, but I have no idea what this is and googleing is doing no good at all. Please tell me what this is called and how to interpret it. I have an arduino and plan to use a fuel gauge with it. I have an OLED attached and the fuel gauge wants to use some of the same pins as the OLED. I figured it would be easy enough to change the address of some of them but now I've come to this ( 0x36 ). This doesn't look like A4 to me.

Please help me understand this.

Thank You, John

Now we're getting somewhere ( I think ). The pins they want me to use are A4 and A5 so 54 might work in the library. Now to pick a bit apart and see of they are splitting 54 into two parts and turning them into the analog pin address!

Thank You!!

an edit***
I found it. Now to understand it a bit better will require a touch more learning.

void MAX17043::writeRegister(byte address, byte MSB, byte LSB) {

Wire.beginTransmission(MAX17043_ADDRESS);
Wire.write(address);
Wire.write(MSB);
Wire.write(LSB);
Wire.endTransmission();
}

Here is the library.

.h

// MAX17043/44 library for Arduino
//
// Luca Dentella (http://www.lucadentella.it)

#include "Arduino.h"

#ifndef _MAX17043_H
#define _MAX17043_H

#define MAX17043_ADDRESS	0x36

#define VCELL_REGISTER		0x02
#define SOC_REGISTER		0x04
#define MODE_REGISTER		0x06
#define VERSION_REGISTER	0x08
#define CONFIG_REGISTER		0x0C
#define COMMAND_REGISTER	0xFE


class MAX17043 {

	public:
	
		float getVCell();
		float getSoC();
		int getVersion();
		byte getCompensateValue();
		byte getAlertThreshold();
		void setAlertThreshold(byte threshold);
		boolean inAlert();
		void clearAlert();
		
		void reset();
		void quickStart();
	
	private:

		void readConfigRegister(byte &MSB, byte &LSB);
		void readRegister(byte startAddress, byte &MSB, byte &LSB);
		void writeRegister(byte address, byte MSB, byte LSB);
};

#endif

.cpp

// MAX17043/44 library for Arduino
//
// Luca Dentella (http://www.lucadentella.it)

#include "MAX17043.h"
#include "Wire.h"

float MAX17043::getVCell() {

	byte MSB = 0;
	byte LSB = 0;
	
	readRegister(VCELL_REGISTER, MSB, LSB);
	int value = (MSB << 4) | (LSB >> 4);
	return map(value, 0x000, 0xFFF, 0, 50000) / 10000.0;
	//return value * 0.00125;
}

float MAX17043::getSoC() {
	
	byte MSB = 0;
	byte LSB = 0;
	
	readRegister(SOC_REGISTER, MSB, LSB);
	float decimal = LSB / 256.0;
	return MSB + decimal;	
}

int MAX17043::getVersion() {

	byte MSB = 0;
	byte LSB = 0;
	
	readRegister(VERSION_REGISTER, MSB, LSB);
	return (MSB << 8) | LSB;
}

byte MAX17043::getCompensateValue() {

	byte MSB = 0;
	byte LSB = 0;
	
	readConfigRegister(MSB, LSB);
	return MSB;
}

byte MAX17043::getAlertThreshold() {

	byte MSB = 0;
	byte LSB = 0;
	
	readConfigRegister(MSB, LSB);	
	return 32 - (LSB & 0x1F);
}

void MAX17043::setAlertThreshold(byte threshold) {

	byte MSB = 0;
	byte LSB = 0;
	
	readConfigRegister(MSB, LSB);	
	if(threshold > 32) threshold = 32;
	threshold = 32 - threshold;
	
	writeRegister(CONFIG_REGISTER, MSB, (LSB & 0xE0) | threshold);
}

boolean MAX17043::inAlert() {

	byte MSB = 0;
	byte LSB = 0;
	
	readConfigRegister(MSB, LSB);	
	return LSB & 0x20;
}

void MAX17043::clearAlert() {

	byte MSB = 0;
	byte LSB = 0;
	
	readConfigRegister(MSB, LSB);	
}

void MAX17043::reset() {
	
	writeRegister(COMMAND_REGISTER, 0x00, 0x54);
}

void MAX17043::quickStart() {
	
	writeRegister(MODE_REGISTER, 0x40, 0x00);
}


void MAX17043::readConfigRegister(byte &MSB, byte &LSB) {

	readRegister(CONFIG_REGISTER, MSB, LSB);
}

void MAX17043::readRegister(byte startAddress, byte &MSB, byte &LSB) {

	Wire.beginTransmission(MAX17043_ADDRESS);
	Wire.write(startAddress);
	Wire.endTransmission();
	
	Wire.requestFrom(MAX17043_ADDRESS, 2);
	MSB = Wire.read();
	LSB = Wire.read();
}

void MAX17043::writeRegister(byte address, byte MSB, byte LSB) {

	Wire.beginTransmission(MAX17043_ADDRESS);
	Wire.write(address);
	Wire.write(MSB);
	Wire.write(LSB);
	Wire.endTransmission();
}

Hi Delta,
I understand what defines are. What I was saying is that they are defining the address as 54 in translation. The instructions are to connect the device to pin 4 and pin 5. So if they have defined the address as 0x36 ( 54 ) it would seem that this is the answer I was looking for.

I'm seriously having trouble with this hexadecimal now though. So, what would the hex be for a value of 32?

Thanks again, John

EDIT** found a calculator / converter. still don't understand how this works but the answer is 0x20. So, 0x20 equates to 32. this should allow me to use pins A3 and A2. We shall see. Thanks again for the help!

"The 7-bit slave address is fixed to 6Ch (write)/6Dh (read)"

so this I2C address translates (shifted 1 bit down) to your magic 0x36 / 54...

I stand corrected. :-[
It is nice to know that more than one device can use the same two pins though. I will read up on the link you've posted. Thank you.