Wire.parseFloat gets not data


i have mma8462q (redbot accelerometer) trying parse data from.  can read data fine first sketch below.  when using wire.read() function 3 values change move accelerometer.    if try parse out array 0.    second sketch try parse out.  ideas?
code: [select]

#include <wire.h>
float test;
void setup()
{
  wire.begin();       
  serial.begin(9600); 
}

void loop()
{
  wire.requestfrom(29, 6); 

  while(wire.available())   
  {
    test = wire.read();
    serial.println(test);
  }
delay(500);
}


parsing
code: [select]

#include <wire.h>
float test[3];
void setup()
{
  wire.begin();       
  serial.begin(9600); 
}

void loop()
{
  floatvalues();
}

void floatvalues()
{
  wire.requestfrom(29, 6);   

  while(wire.available())   
  {
    test[0] = wire.parsefloat();
    serial.println(test[0]);
   test[1] = wire.parsefloat();
   serial.println(test[1]);
   test[2] = wire.parsefloat() ;
   serial.println(test[2]);
  }
  delay(250);
}


quote
i can read data fine first sketch below.

but, not going show get.

quote
the second sketch try parse out.  ideas?

post code compiles. hell float?


Arduino Forum > Using Arduino > Programming Questions > Wire.parseFloat gets not data


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support