Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EEdis
Novice
1,314 Views

Edison Timer

I need to use timer but I can't find any information about timer in Edison. Is there any? I want to read some value from pin in some frequency. Maybe is another way to do that? Thanks in advance!

3 Replies
Carlos_M_Intel
Employee
37 Views

Hi Joe11,

How are you going to develop your project? Are you going to use the Arduino IDE or are you going to use C/C++/JavaScript/Python..?

You can create timers in your code to accomplish this; there are some libraries that may help you with this.

Let us know more about the requirements you need in order to give you a better approach.

Regards,

Charlie

EEdis
Novice
37 Views

Thanks for reply! I'm sorry. I forgot to write about it. I'm writing C project and I have two paremeter S0 and S1 to modify frequency.

S0

S1

OUTPUT FREQUENCY SCALING (fo)

L

L Power down L L Red

L

H

2 %

10-12 kHz

H

L

20 %

100-120 kHz

H

H100 %

 

500-600 kHz

I want to read some variable OUT and in Arduino example code is timer like this one:

void timer0_init(void)

{

TCCR2A=0x00;

TCCR2B=0x07; //the clock frequency source 1024 points

TCNT2= 100; //10 ms overflow again

<code class="plain cpp" style="font-family: Consolas, 'Bitst...

Carlos_M_Intel
Employee
37 Views

Hi Joe,

The code you are using is for Arduino and it registers so there could be some poblems while using this code with the Edison.

There are some threads that you may find helpful related to timers:

In here: https://madalanarayana.wordpress.com/2014/01/25/create-your-own-timer-routine-in-linux/ Create your own timer routine in Linux | My Linux and Telecom Experiences you will find a timer example for C.

Regards,

Charlie

Reply