test
Dependencies: Hepta2_9axis HeptaBattery Hepta_Serial HeptaTemp HeptaXbee SDHCFileSystem mbed
Fork of HEPTA2_ALL by
Revision 5:aedf4491aa0f, committed 2017-08-05
- Comitter:
- hepta2ume
- Date:
- Sat Aug 05 13:37:01 2017 +0000
- Parent:
- 4:6565d9843337
- Commit message:
- test
Changed in this revision
--- a/Hepta2_9axis.lib Wed Jul 26 06:24:09 2017 +0000 +++ b/Hepta2_9axis.lib Sat Aug 05 13:37:01 2017 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/hepta2ume/code/Hepta2_9axis/#5aaec0996753 +http://developer.mbed.org/users/hepta2ume/code/Hepta2_9axis/#5b35162b3b6a
--- a/HeptaSerial.lib Wed Jul 26 06:24:09 2017 +0000 +++ b/HeptaSerial.lib Sat Aug 05 13:37:01 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/hepta2ume/code/Hepta_Serial/#50a03fcd9cc0 +https://developer.mbed.org/users/hepta2ume/code/Hepta_Serial/#c11f48bbb567
--- a/HeptaXbee.lib Wed Jul 26 06:24:09 2017 +0000 +++ b/HeptaXbee.lib Sat Aug 05 13:37:01 2017 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/hepta2ume/code/HeptaXbee/#c31e4a5db17c +http://developer.mbed.org/users/hepta2ume/code/HeptaXbee/#031c35ada7e6
--- a/main.cpp Wed Jul 26 06:24:09 2017 +0000 +++ b/main.cpp Sat Aug 05 13:37:01 2017 +0000 @@ -1,17 +1,3 @@ -/* -************************************************************* -H29/07_20/T.Umezawa -1:SD.....OK! -2:MPU9250(Accel) = OK -3:MPU9250(Gyro) = OK -4:MPU9250(Mag_compass) = 微妙 -5:GPS sensing Mode = -6:CAM Mode = OK!(微妙だった) -7:Temperature sensing = OK! -8:Xbee mode = OK! -************************************************************* -*/ - #include "mbed.h" #include "SDHCFileSystem.h" #include "HeptaXbee.h" @@ -65,7 +51,7 @@ pc.printf("o:All Transmitting Mode\r\n"); pc.printf("*********************************\r\n"); - mode = pc.getc(); + mode = xbee.getc(); pc.printf("\r\n"); pc.printf("Your select Mode = %c\r\n",mode); wait(0.5); @@ -225,7 +211,7 @@ printf("CameraC1098\r\n"); printf("==========\r\n"); //camera.Sync(); - camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); + //camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); camera.test_jpeg_snapshot_picture(1); break; @@ -245,7 +231,7 @@ printf("CameraC1098\r\n"); printf("==========\r\n"); //camera.Sync(); - camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); + //camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); camera.test_jpeg_snapshot_data(1); break; @@ -261,7 +247,7 @@ printf("CameraC1098\r\n"); printf("==========\r\n"); //camera.Sync(); - camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); + //camera.initialize(HeptaSerial::Baud115200, HeptaSerial::JpegResolution320x240); camera.test_jpeg_snapshot_picture(1); FILE *fp = fopen("/fs/test.txt", "r"); @@ -362,18 +348,18 @@ printf("==================\r\n"); printf("All Transmitting Mode\r\n"); printf("==================\r\n"); - char gx[4],gy[4],gz[4],ax[4],ay[4],az[4],mx[4],my[4],mz[4],lad[8],log[8],bt[4],temp[4]; - char ddata[60]; - int dsize[6]; + char gx[4],gy[4],gz[4],ax[4],ay[4],az[4],mx[4],my[4],mz[4],lad[8],log[8],height[4],bt[4],temp[4]; + char ddata[64]; + int dsize[7]; while(1) { MPU9250.sen_gyro_u16(gx,gy,gz,&dsize[0]); MPU9250.sen_acc_u16(ax,ay,az,&dsize[1]); MPU9250.sen_mag_u16(mx,my,mz,&dsize[2]); - camera.lat_log_sensing_u16(lad,log,&dsize[3]); - bat.vol_u16(bt,&dsize[4]); - heptatemp.temp_sense_u16(temp,&dsize[5]); - xbee.xbee_transmit(ddata,60,gx,gy,gz,ax,ay,az,mx,my,mz,lad,log,bt,temp,dsize[0],dsize[0],dsize[0],dsize[1],dsize[1],dsize[1],dsize[2],dsize[2],dsize[2],dsize[3],dsize[3],dsize[4],dsize[5],13); + camera.lat_log_sensing_u16(lad,log,height,&dsize[3],&dsize[4]); + bat.vol_u16(bt,&dsize[5]); + heptatemp.temp_sense_u16(temp,&dsize[6]); + xbee.xbee_transmit(ddata,64,gx,gy,gz,ax,ay,az,mx,my,mz,lad,log,height,bt,temp,dsize[0],dsize[0],dsize[0],dsize[1],dsize[1],dsize[1],dsize[2],dsize[2],dsize[2],dsize[3],dsize[3],dsize[4],dsize[5],dsize[6],14); } break; }//case'9'