-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #479 from tyler-potyondy/ewsn-tutorial
Thread Tutorial Updates
- Loading branch information
Showing
29 changed files
with
787 additions
and
1,096 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
examples/tutorials/thread_network/01_sensor_temperature/main.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <stdio.h> | ||
|
||
#include <libtock-sync/sensors/temperature.h> | ||
#include <libtock-sync/services/alarm.h> | ||
#include <libtock/kernel/ipc.h> | ||
#include <libtock/tock.h> | ||
|
||
static int current_temperature = 0; | ||
|
||
int main(void) { | ||
// Measure temperature -- returned in the form 2200 => 22C | ||
libtocksync_temperature_read(¤t_temperature); | ||
|
||
// Convert temperature | ||
int whole_degree = current_temperature / 100; | ||
int decimal_degree = current_temperature % 100; | ||
|
||
printf("Hello World, the temperature is: %i.%i\r\n", whole_degree, decimal_degree); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 0 additions & 138 deletions
138
examples/tutorials/thread_network/03_controller_screen/main.c
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.