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, 11 months ago.
Can I open a program on my Computer using mbed LPC11U24?
Hello community! Can someone please help me? I thought, why not letting my mbed LPC11U24 open a program on my Computer... Is it possible?? if yes, how? I thought of a standart Void Function
Function
#include "mbed.h"
DigitalOut myled(LED1);
DigitalOut myled2(LED2);
InterruptIn btn_1(P1_16);
void start() {
//here Comes the command
}
int main() {
myled = 1;
btn_1.rise(&start);
while(1) {
myled2 =! myled2;
}
}
Edit
Can I do it this way? But there is an error...
Error: Undefined symbol system (referred from main.cpp.LPC11U24.o).
Starting File
#include "mbed.h"
#include <stdlib.h>
DigitalOut myled(LED1);
DigitalOut myled2(LED2);
InterruptIn btn_1(P1_16);
using namespace std;
void start() {
system("F:\\Text.txt");
myled =! myled;
}
int main() {
myled = 1;
btn_1.rise(&start);
while(1) {
myled2 =! myled2;
}
}
1 Answer
10 years, 11 months ago.
Hi,
You got an error, because you don't have a definition of the system() function.
If you want to open a file in mbed local storage, you can use LocalFileSystem rather than system() function. Please refer following link for more detail.
http://developer.mbed.org/handbook/LocalFileSystem
Please note that the LocalFileSystem works only mbed LPC1768 and LPC11U24.