Import csv in Zerynth?

Is there a ways I can import csv in Zerynth or any other packages?

If there isn’t, is it possible to flash the Zerynth code into python ?

Unfortunately, CSV is not yet supported in Zerynth.

Could you elaborate more? Do you mean using Zerynth python code outside Zerynth studio?

Yea.
The reason I am asking is that I want to be able to get data from a continuous signal on oscilloscope and keep feeding them to a file or an array.
I was going to use the circular buffer method but it couldnt read it.
Any suggestion to keep data from oscilloscope without using csv?
@karimhamdy1

You can save the data stream in a txt file.
Then in Zerynth you can open it as a resource and read it line by line,
parse the data in the line and do whatever you like with it.

Tell me if you meant something else, Maybe we can figure it out.

1 Like

That sounds like it could work.

What do you mean by parsing the data in line? Will that be in some sort of a file that can be manipulated later?

I also wanted to ask if I can save the data into arrays? Because I need the data for signal processing later.

Thank you so much for the help by the way

1 Like

I meant that the resource library uses readline() method that returns each line, Then you can do whatever you like with each line in the file.

Do you plan to have the microcontroller gather the data from the oscilloscope and save them in a file? or there is another script doing that and the microcontroller will just read that file and do some operations on the data on the file?

@karimhamdy1, Ya I was planning to have the microcontroller read the data (using ADC), and append them to arrays or a file. But I need to do some signal processing on the data later. For instance, I want to amplify the signals (or multiplying all the data by 2), then output that result back as a signal (using DAC).

Ok, I think you can take ADC measurements periodically, append them in an array, Then at the end use the File system on SD card to save them in a txt file on an SD card or you can save them in internal flash (depends on the amount of data)
take care to for the amount of ram needed for your array before appending it in the txt file.

This way you can read the data back if you want, do the operations on them and output them using DAC.

Are you developing a commercial project or a DIY project? :smile:

sorry @karimhamdy1, haven’t replied due to the whole epidemic thing going, haha. Ya this is for our senior project. :slight_smile:

@Manda28121
Awesome, let me know If you need help :slight_smile:
Also would be awesome if you shared a copy of your thesis when you’re finished

Hello @karimhamdy1, it’s me again ,
I have a question regarding the same project. Recently the microcontroller and the Zerynth program froze many times. It didn’t do that last time. I even re install the program and it still froze. Do you have any suggestions to how to fix it? Is it the virtualization issue? Because I always virtualize the mcu before using it

nevermind @karimhamdy1. I found the issue, forgot the sleep timer lol.

1 Like