mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-20 01:30:07 +00:00
The button sensor must be initialized before it is used
This commit is contained in:
parent
815468b442
commit
5be78ce843
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: example-collect.c,v 1.9 2009/10/18 17:52:08 adamdunkels Exp $
|
* $Id: example-collect.c,v 1.10 2010/02/03 21:11:33 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,11 +71,12 @@ PROCESS_THREAD(example_collect_process, ev, data)
|
|||||||
{
|
{
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
|
|
||||||
|
SENSORS_ACTIVATE(button_sensor);
|
||||||
|
|
||||||
collect_open(&tc, 130, &callbacks);
|
collect_open(&tc, 130, &callbacks);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
static struct etimer et;
|
static struct etimer et;
|
||||||
uint16_t tmp;
|
|
||||||
|
|
||||||
/* Send a packet every 16 seconds; first wait 8 seconds, than a
|
/* Send a packet every 16 seconds; first wait 8 seconds, than a
|
||||||
random time between 0 and 8 seconds. */
|
random time between 0 and 8 seconds. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user