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.
Revision 7:7a91079a5ddd, committed 2014-07-28
- Comitter:
- EiJay
- Date:
- Mon Jul 28 07:57:22 2014 +0000
- Parent:
- 6:c09f0df4123c
- Child:
- 8:7f7c9353bc05
- Commit message:
- issues resolved - labview application;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jul 25 13:48:05 2014 +0000
+++ b/main.cpp Mon Jul 28 07:57:22 2014 +0000
@@ -11,9 +11,9 @@
Serial pc (USBTX, USBRX);
pc.baud(9600);
char hostCommand;
- char hostData1;
- char hostData2;
- char hostData3;
+ int hostData1;
+ int hostData2;
+ int hostData3;
//Chip communication
SPI spi(p5, p6, p7);
spi.format(MLX90393::spi_bits,MLX90393::spi_mode);
@@ -24,12 +24,13 @@
//variables
char read_buffer[10];
//if you remove this line the program will fail
+ //also make sure that you always send the status back to the host
hostCommand = 0;
while(1) {
pc.scanf(" %i, %i, %i, %i", &hostCommand, &hostData1, &hostData2, &hostData3);
switch(hostCommand) {
case 0: {
-
+ //wait_ms(1);
break;
}
case 1: {
@@ -39,6 +40,7 @@
break;
}
case 3: {
+
break;
}
case 4: {
@@ -46,8 +48,9 @@
}
case 5: {
//exit
- //printf("**case5** \n\r");
+ //printf("**gelukt** \n\r");
sensor.EX(read_buffer,1);
+ printf("*\n\r");
break;
}
case 6: {