== You will learn ==
== You will learn ==
−*Simple implementations of each type of timer
+*Simple implementations of each type of timer.
−*Tasks each timer can be used for
+*Tasks each timer can be used for.
*Some functions in the timer libraries.
*Some functions in the timer libraries.
Again, we will have to change folders. We will create a new file for this tutorial, but let's create it in the same directory we've been working with, so type
Again, we will have to change folders. We will create a new file for this tutorial, but let's create it in the same directory we've been working with, so type
−<code><nowiki> cd contiki-2.7/examples/rime </nowiki></code>
+ cd contiki-2.7/examples/rime
into the terminal. For this tutorial, we will be modifying the example-broadcast.c file we have previously used, so type
into the terminal. For this tutorial, we will be modifying the example-broadcast.c file we have previously used, so type
−<code><nowiki> cp example-broadcast.c example-timer.c </nowiki></code>
+ cp example-broadcast.c example-timer.c
into your terminal. You should now see a new file, "example-timer.c" in your directory. Open it up with an editor of your choice (we will use gedit for this tutorial):
into your terminal. You should now see a new file, "example-timer.c" in your directory. Open it up with an editor of your choice (we will use gedit for this tutorial):
−<code><nowiki> edit example-timer.c </nowiki></code>
+ gedit example-timer.c
=== Step 2 ===
=== Step 2 ===
There is currently a working example of an etimer in this code, so before we proceed, let's understand this. At the beginning of the process, it is declared with
There is currently a working example of an etimer in this code, so before we proceed, let's understand this. At the beginning of the process, it is declared with
Exception encountered, of type "Error"