Can anyone think of a simple way to read a text file from the local filesystem and use that to assign pin numbers and the like for I/O? An example might be that I have a file where the first line reads "PIR_MODULE: P23", the mbed opens that file...reads that line and decides that the 'DigitalIn PIR(Pxx);' should be 'DigitalIn PIR(P23);'...
I'm sure I could have been a little more concise with the example, but I think it gets the point across... I'm guessing there's got to be some work required... but this would be very useful for a couple projects I'm trying to make as user friendly as possible.. I'd really like the user to be able to connect a peripheral and then tell the mbed where it's at using a text file...
Any help is greatly appreciated!
Can anyone think of a simple way to read a text file from the local filesystem and use that to assign pin numbers and the like for I/O? An example might be that I have a file where the first line reads "PIR_MODULE: P23", the mbed opens that file...reads that line and decides that the 'DigitalIn PIR(Pxx);' should be 'DigitalIn PIR(P23);'...
I'm sure I could have been a little more concise with the example, but I think it gets the point across... I'm guessing there's got to be some work required... but this would be very useful for a couple projects I'm trying to make as user friendly as possible.. I'd really like the user to be able to connect a peripheral and then tell the mbed where it's at using a text file...
Any help is greatly appreciated!