Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 9:190ec4ad9ac7
- Parent:
- 8:7f7c9353bc05
- Child:
- 10:59582af3b94a
--- a/main.cpp Mon Jul 28 10:59:06 2014 +0000 +++ b/main.cpp Tue Jul 29 08:13:00 2014 +0000 @@ -23,6 +23,7 @@ //variables char read_buffer[10]; + int content_buffer[63]; //if you remove this line the program will fail //also make sure that you always send the status back to the host hostCommand = 0; @@ -34,13 +35,28 @@ break; } case 1: { + /* + ** Send 'read register' command to MLX90393. + * @param *receiveBuffer Pointer to receiveBuffer, will contain response of IC after command is sent. + * @param address The register to be read out. + * @param mode Communication mode (0=I2C, 1=SPI). + * @note The receiveBuffer will contain the status byte, followed by 2 bytes for the data at the specific register. + */ + //void RR(char *receiveBuffer, int address, int mode); + for (int i = 0; i<63; i++) { + sensor.RR(read_buffer,i,1); + content_buffer[i] = (read_buffer[0]*65536)+(read_buffer[1]*256) + read_buffer[2]; + //printf("%i",content_buffer[i]); + } + for (int i = 0; i<63; i++) { + printf("%i\n",content_buffer[i]); + } break; } case 2: { break; } case 3: { - break; } case 4: {