Search found 8 matches

by Meide
Mon Jan 16, 2017 12:25 pm
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Hi, I made some speed test with this code and I want now to try another alternative.. To see which one is faster and what is the difference of speed between both. I want to write directly on the file and not stock the data on a buffer. So I tried this code which is an adaptation of our previous code...
by Meide
Thu Jan 12, 2017 10:11 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Ohhhh ! I found why I had these irregularities ! It was because the pyboard was starting and at the same time trying to apply the main.py of the sd card. So I put a sleep of 2 seconds at the beginning of the code and it finally works perfectly ! http://zupimages.net/viewer.php?id=17/02/ftpr.jpg Than...
by Meide
Thu Jan 12, 2017 9:59 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Do you mean that you don't have the same irregularities as me if you print the measure points in your graph ? I've just copied and passed your code in the main files of my sd card, I've connected X5 and Y12 and then I've connected the pyboard to my computer. Did I do something wrong ? (For this grah...
by Meide
Tue Jan 10, 2017 10:33 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Ok I understand better how it works now. So I dit the same as you and I obtained this results (for the chanel 1,signal generated by the pyboard): http://zupimages.net/viewer.php?id=17/02/4tdb.jpg The result is pretty good but how do you explain that we collected more data at the beginning ? This doe...
by Meide
Mon Jan 09, 2017 10:09 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Hi, Sorry for reply only now but I was on hollidays. I am back at work now and I've tried your code. I've tried it with a signal of 200 Hz and 1V amplitude with the same connections as you. Here are my results for the channel 1 : http://zupimages.net/viewer.php?id=17/02/47xg.jpg http://zupimages.net...
by Meide
Fri Dec 16, 2016 11:52 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Hi, First thank you for all your answers, that help me a lot. So, I tried the code that you post before. I did several attemps to be sure of the result. Here are the different results that I had: Chan1 vs Time and Chan 2 vs Time (2 attempts) : http://zupimages.net/viewer.php?id=16/50/h0xq.jpg http:/...
by Meide
Thu Dec 15, 2016 3:14 pm
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Re: Read multiple ADC channel simultaneously

Hi, Thank you for your answer. Sorry for taking so much time to answer but I come with new things. Here is the code that I finnaly used: import array import os import pyb import utime buf1=array.array('H',bytearray(10000)) buf2=array.array('H',bytearray(10000)) temps=array.array('L',bytearray(20000)...
by Meide
Thu Dec 08, 2016 10:12 am
Forum: MicroPython pyboard
Topic: Read multiple ADC channel simultaneously
Replies: 18
Views: 24549

Read multiple ADC channel simultaneously

Hi, I am currently working in a project where a need to collect data. I managed to collect data from one of the ADC port that the pyboard has thanks to this code: import array import os import pyb import utime adc1=pyb.ADC(pyb.Pin.board.Y12) buf1=array.array('H',bytearray(30000)) tim=pyb.Timer(6, fr...