Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
Trouble printing data with Arch GPRS V2
Trying to simply print "hello world" with the Arch GPRS V2 through serial port or LocalFileSystem.
- include "mbed.h" #include "USBSerial.h"
USBSerial serial;
Serial pc(USBTX, USBRX); LocalFileSystem local("local"); DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4);
int main() { FILE *fp = fopen("/local/out.txt","w");
myled1 = 1; myled2 = 1; myled3 = 0; myled4 = 0;
wait(1); fprintf(fp,"Hello World\n"); serial.printf("Hello\n"); myled1 = 0; myled2 = 0; myled3 = 1; myled4 = 1; wait(1); fclose(fp);
}