User Tools

Site Tools


Read text from a file

NOTE: Curently trying to store more than 254 bytes in a device variable can lead to a segmentation fault. Therefore, if a file is bigger than 254 bytes, only the first 254 bytes of the file contents will be currently be stored. A modification is needed in devices.c to fix this.


NameRequiredMultiple ValuesDescription
FROMyesnoThe full file path
DEVICEyesnoA label device to store the text read


IF 1 == 1 THEN read FROM /home/pi/myfile.txt DEVICE mylabel => reads content from the file and stores it in mylabel

Note: if the file cannot be opened the cause of the failure will be stored in the color attribute of the label.

docu_read.txt · Last modified: 2018/08/08 12:37 by Niek