Accessing the SD card
Posted: Tue Mar 11, 2014 9:38 pm
I am intending to use my board ( which i do not have yet ) as the front end to a simple oscilloscope.
What I am hoping I will be able to do is write code on the board which controls one or more of the ADC's and gathers the readings and stores them in a file on the SD card.
I have written code which runs on my laptop and, at present, reads data from a text file I have generated using python's random.
I can get it to display a dynamic plot of the data which looks just like the display on an oscilloscope.
I can select how many points to display and how long it waits between screen updates. Also which of the points it starts from.
I can also display a static plot and this can display as many points as I choose and which point to start from.
I believe I can simply write code to take the data from the file the board generates and initially I will be happy to use the board to grab a certain amount of data then use the laptop to examine it 'offline'.
What I am hoping to do is develop some protocol, probably using files written to the SD card, to tell the board how long to sample for and then carry out the task then somehow signal that it has finished.
For anyone interested here https://app.box.com/s/4171nkmydw5glfostei6 is a screenshot of what I have so far.
This is the code which produces it: https://app.box.com/s/lx8htg3t48kzmctk2lsb
As I am not a programmer any suggestions for improvement are most welcome.
All of this running on Ubuntu 13.10 and python 2.7.5+
Now there are a few unknowns at present as far as I an concerned.
1/ how fast the data can be gathered.
2/ how long it will take to write the data to the SD card.
3/ If reading the data from the laptop causes or needs any interaction from the board.
and more but if anyone can give me some pointers I would appreciate it,
thanks
What I am hoping I will be able to do is write code on the board which controls one or more of the ADC's and gathers the readings and stores them in a file on the SD card.
I have written code which runs on my laptop and, at present, reads data from a text file I have generated using python's random.
I can get it to display a dynamic plot of the data which looks just like the display on an oscilloscope.
I can select how many points to display and how long it waits between screen updates. Also which of the points it starts from.
I can also display a static plot and this can display as many points as I choose and which point to start from.
I believe I can simply write code to take the data from the file the board generates and initially I will be happy to use the board to grab a certain amount of data then use the laptop to examine it 'offline'.
What I am hoping to do is develop some protocol, probably using files written to the SD card, to tell the board how long to sample for and then carry out the task then somehow signal that it has finished.
For anyone interested here https://app.box.com/s/4171nkmydw5glfostei6 is a screenshot of what I have so far.
This is the code which produces it: https://app.box.com/s/lx8htg3t48kzmctk2lsb
As I am not a programmer any suggestions for improvement are most welcome.
All of this running on Ubuntu 13.10 and python 2.7.5+
Now there are a few unknowns at present as far as I an concerned.
1/ how fast the data can be gathered.
2/ how long it will take to write the data to the SD card.
3/ If reading the data from the laptop causes or needs any interaction from the board.
and more but if anyone can give me some pointers I would appreciate it,
thanks