L3G4200D Gyroscope not return values of axes


I try to retrieve the values of the l3G4200d gyroscope by spinnaker but I do not receive anything on the MISO line.
I simply actively have the sensor enabled by enabling the CTRL_REG1 register and enabled all available axis values.

You can look at my code for me, what could be the problem please, I will attach the datasheets that I use for the sensor

#include <SPI.h>

#define CTRL_REG1 0x20
#define CTRL_REG2 0x21
#define CTRL_REG3 0x22
#define CTRL_REG4 0x23
#define CTRL_REG5 0x24
// Declaration des variables
const int chipSelectPin = 10;

void setup() {

   Serial.println("Start SPI");
  // start the SPI library:
  // initalize the  data ready and chip select pins:
  pinMode(chipSelectPin, OUTPUT);

void loop() {
  // put your main code here, to run repeatedly:
  int tempData = readRegister();
  Serial.println("Données recu:");
int readRegister(){
    digitalWrite(chipSelectPin, LOW);
    unsigned char highByteA  = SPI.transfer(0x00);  // Read High Byte of RESA
    unsigned char lowByteA = SPI.transfer(0x00);
    unsigned charresult = highByteA;
    digitalWrite(chipSelectPin, HIGH);
   strcat(result ,lowByteA )
   // return the result:
   return (result);
void writeRegister(byte thisRegister, byte thisValue) {

  // take the chip select low to select the device:
  digitalWrite(chipSelectPin, LOW);
 SPI.transfer(thisRegister); //Send register location

  // take the chip select high to de-select:
  digitalWrite(chipSelectPin, HIGH);

datasheets :

You sure that's a legitimate address command ?????? :thinking: :thinking: :thinking:
that doesn't compile like that

Yes but when I remove that I still have the same problem no reception of the slave

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.