GS_Code
Dependencies: HEPTA_SENSOR mbed BME280_SPI HEPTA_EPS HEPTA_COM
Revision 0:409f2d1650b6, committed 2022-08-27
- Comitter:
- anfegusa
- Date:
- Sat Aug 27 01:08:16 2022 +0000
- Commit message:
- GS Code;
Changed in this revision
diff -r 000000000000 -r 409f2d1650b6 BME280_SPI.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BME280_SPI.lib Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/MACRUM/code/BME280_SPI/#f0faf51d3d4a
diff -r 000000000000 -r 409f2d1650b6 GS_f_main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GS_f_main.cpp Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,45 @@ +#include "mbed.h" +#include "HEPTA_COM.h" +#include "HEPTA_EPS.h" +#include "HEPTA_SENSOR.h" +#include "BME280_SPI.h" + +Serial pc(USBTX,USBRX); +HEPTA_COM com(p9,p10); +HEPTA_EPS eps(p16,p26); +HEPTA_SENSOR sensor(p17, + p28,p27,0x19,0x69,0x13, + p13, p14,p25,p24); +Serial device(p9,p10); +Serial gpsa(p28,p27); +BME280_SPI sensor1(p5, p6, p7, p8); // mosi, miso, sclk, cs + +char dato; +int main() { + pc.baud(9600); + com.baud(9600); + sensor.gps_setting(); + char buffer[120]={0}; + while(1) { + //if(pc.readable()) { + + //device.putc(pc.getc()); + + //} + if(device.readable()) { + device.gets(buffer,120); + //pc.putc(device.getc(buffer,30)); + //pc.printf("I got '%s'\n", buffer); + + } + int quality=0,stnum=0,gps_check=0; + char ns='A',ew='B',aunit='m'; + float time=0.0,latitude=0.0,longitude=0.0,hacu=0.0,altitude=0.0; + + sensor.gga_sensing(&time, &latitude, &ns, &longitude, &ew, &quality, &stnum, &hacu, &altitude, &aunit, &gps_check); + pc.printf("This is GS,%f,%f,%f,%f,%04.2f,%2.2f,%2.2f,%s %\r\n",time,latitude,longitude,altitude,sensor1.getPressure(),sensor1.getTemperature(),sensor1.getHumidity(),buffer); + gpsa.printf("This is GS,%f,%f,%f,%f,%04.2f,%2.2f,%2.2f,%s %\r\n",time,latitude,longitude,altitude,sensor1.getPressure(),sensor1.getTemperature(),sensor1.getHumidity(),buffer); + //com.printf("GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c %\r\n",time,latitude,ns,longitude,ew,quality,stnum,hacu,altitude,aunit); + + } + }
diff -r 000000000000 -r 409f2d1650b6 HEPTA_COM.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HEPTA_COM.lib Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/HeptaSatTraining2019/code/HEPTA_COM/#1838cbd7d223
diff -r 000000000000 -r 409f2d1650b6 HEPTA_EPS.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HEPTA_EPS.lib Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/HeptaSatTraining2019/code/HEPTA_EPS/#4f08f55763c7
diff -r 000000000000 -r 409f2d1650b6 HEPTA_SENSOR.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HEPTA_SENSOR.lib Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/HEPTA-Sat-Training-2022/code/HEPTA_SENSOR/#8402214a0b6b
diff -r 000000000000 -r 409f2d1650b6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Aug 27 01:08:16 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file