creating files on raspberry pi with simulink
Show older comments
Hi all,
I'm a new user to simulink and the raspberry pi, and have begun playing with the example library in simulink.
I've been trying to save to a text file on the pi using the h.openShell('ssh') command line interface.
I've been able to able to create directories and text files, however, after taking out the SD card and putting it into my desktop, I cant find these folders and files.
I'm sure this is due to my lack of knowledge as to what i'm actually doing (I apologise), could someone point me towards a method of saving data to a file and then being able to view this text file on a host computer or through simulink?
(in the long run I want to be able to run a matlab function on the pi, which will save variable data into a text file which I want to be able to read on the SD card from a PC)
Regards, Will
2 Comments
Bethmage Perera
on 25 Feb 2015
Hi Will, I need to do the same where I need to save some data from a sensor connected to the Raspberry Pi and save the data within the SD card. I've been trying to modify "raspberrypi_motion_sensor_camera" example snapshot block but no luck for. It'll be great if any of you can help.
Kalpa
Marc Compere
on 3 Dec 2015
I am interested in this as well.
We need to write a file to /tmp to capture data from the running Simulink algorithm for post-processing after the test.
How can we get data in Simulink written to /tmp/myTest.txt?
Accepted Answer
More Answers (2)
Will
on 24 Mar 2014
1 vote
Murat Belge
on 27 Mar 2014
1 vote
Look at the demo model "raspberrypi_motion_sensor_camera". In this model, there is a block called "raspberrypi_motion_sensor_camera/Triggered Subsystem/save a snapshot". This is actually a MATLAB function for saving data to a file. Replicate / re-purpose this block for your needs.
Categories
Find more on Raspberry Pi Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!