> I would like for pleo to write to a text file that exists on the sd card something like "back sensor has been touched".
Look at the File functions of the PDK (in File.inc) and the file_example example.
device_change(device_sd);
// put it on the SD card
new File: file_handle = file_open("whatever.txt", io_write);
// opens file for writing, will replace old contents
// you may want "io_append" if you want to keep a longer log
if (!file_handle)
{
// oops - file was not created
// do something to handle the error, perhaps file locked
}
else
{
// write to file, and close
file_puts(file_handle, "back sensor has been touched");
file_close(file_handle);
}