![]() I'm investigating.Īdding a print(data) after data=get_data() in the while loop prints the entire array that is passed but the data appears erroneous. ![]() The python code will not work because the smbus library hasn't been included - amazing nobody noticed this? Please can you explain how it would work? Wire.write((byte*) &data.buffer, sizeof(data.buffer)) ĪrduinoZURaspberry_I2CmitFLOAT.ino: In function ‘void setup()’:ĪrduinoZURaspberry_I2CmitFLOAT.ino:16:10: error: request for member ‘process’ in ‘data’, which is of non-class type ‘float ’ĪrduinoZURaspberry_I2CmitFLOAT.ino:17:10: error: request for member ‘process’ in ‘data’, which is of non-class type ‘float ’ĪrduinoZURaspberry_I2CmitFLOAT.ino: In function ‘void sendData()’:ĪrduinoZURaspberry_I2CmitFLOAT.ino:40:28: error: request for member ‘buffer’ in ‘data’, which is of non-class type ‘float ’ĪrduinoZURaspberry_I2CmitFLOAT.ino:40:51: error: request for member ‘buffer’ in ‘data’, which is of non-class type ‘float ’ define callbacks for i2c communication _#include define SLAVE_ADDRESS 0x04 define FLOATS_SENT 2 ![]() I tried to do the changes in the Arduino-Code and get following Code: The starting internal device address to read data from is 0x31, then 32 bytes are read out of the device, with the device auto-incrementing the internal read address on each i2c read."īut what's to change there to get it run like it should? I sent the "bus.read_i2c_block_data(address,cmd)" command, which reads 32 bytes from the i2c device. ![]() He's right with the "read_i2c_block_data()": I tried the changes of MikeOchtman but i didn't really understand where the changes to put and what's exactly to delete out of the Arduino Code. I get no error or Invalid Syntax but nothing happens :D I can compile the Arduino-Code and the Python-Code but nothing happens. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |