Harry Keane
/
SIM800L_REV1
AT cfommand
Diff: main.cpp
- Revision:
- 0:428ce6fd8969
diff -r 000000000000 -r 428ce6fd8969 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Feb 20 12:50:49 2020 +0000 @@ -0,0 +1,37 @@ +#include "mbed.h" + + +Serial PC(USBTX, USBRX); //This is solelly for PC comms +Serial GSM(PD_5, PD_6); //This is solelly for PC comms + + + +int main(){ + + PC.baud(115200); + GSM.baud(9600); + + wait_ms(500); + + PC.printf("Test"); + + + + + GSM.printf("AT"); + + wait_ms(500); + + printf("start read\n\r"); + + while(1) { + + if(GSM.readable()>0) { + printf("start\r\n"); + PC.printf("%c",GSM.getc()); + printf("\r\nStop\r\n"); + } + + + } +}