1

I want to sample in the raspberry pi, since I am reading the analog values, the detail is that I need a time function which allows me to have the time in a vector of what I am sampling.

there are a function to do this

  • 1
    I'm sorry, but as written it is impossible to tell what you are asking. It would help if you clarify whether you are already reading the data on the Pi, and if so, what the purpose of the "clock" would be. Do you mean you want the pi to read a sample at timed intervals? – goldilocks Jul 4 '19 at 14:18
  • yes, i want to save the value that i read in a vector y and the time when i sampled this value in vector t. After that i want to plot this relation – Jesus Miguel Herrera Jul 4 '19 at 14:23
  • 1
    Sounds like a general programming question that is dependent on what programming language you are using. In any case, such questions belong on our larger parent site, Stack Overflow. – goldilocks Jul 4 '19 at 14:28
  • @Jesus Miguel Herrera, your question using maths terms "time function" and "vector" is a bit newbie scary. Let me try to translate your question in everyday newbie language as follows: "I wish to use Rpi to measure the output of say, a temperature sensor, measuring room temperature every hour of the day. I wish to store and print the measurements as below: "12:00 - 25C, 13:00 - 26C, ..." I know the senor outputs analog values, and I know Rpi, not like Arduino, doesn't have ADC pins. So I need an ADC to help Rpi. Everybody seems like MCP3008. Is it good for newbies? – tlfong01 Jul 5 '19 at 3:21
  • @tlfong01 hi, i am using an arduino like serial port to read analog values, my problem is that i want to plot a relation time/volt, but i don't know how create the time vector while i read the analog value – Jesus Miguel Herrera Jul 5 '19 at 12:48

Browse other questions tagged or ask your own question.