Ok, so this is my code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n;
FILE * fp;
fp = fopen ("file.txt", "r");
while(1){
rewind(fp);
fscanf(fp, " %d", &n);
if(n==1)
printf("led1\n");
if(n==2)
printf("led2\n");
if(n==3)
printf("led3\n");
// system ("pause");
};
fclose(fp);
return(0);
}
What I want to do is this: if(n==1) turn ON LED1
if(n==2) turn ON LED2
if(n==3) turn ON LED3
I think that instead turn ON LED1 I have to write a command to tell Arduino: turn ON LED1. This is what I don't know.