Hi, I follow this to transfer file to raspberry pi hardware. it works well while i sending image. but if i send text file it gives an error. how can i solve this?
mypi = raspi;
putFile(mypi,'output.txt','/home/pi/output.txt');
Error executing command: pscp: output.txt: Cannot open file

Antworten (2)

Murat Belge
Murat Belge am 27 Okt. 2015

0 Stimmen

This works fine for me. Can you execute the following commands an post the results:
>> a = dir('output.txt');
>> disp(a)
>> system(mypi,'ls -al')
>> system(mypi,'df -h')
Biruntha Gnaneswaran
Biruntha Gnaneswaran am 29 Okt. 2015

0 Stimmen

fid=fopen('output.txt','w');
fprintf(fid,'%s','hi');
fclose(fid);
mypi = raspi;
putFile(mypi,'output.txt','/home/pi/output.txt');
Before I used fclose after pufile command. now this code is working

Kategorien

Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by