9 years, 11 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.

  1. 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);

}

Be the first to answer this question.