Little Robot Friends
Arduino Library Reference  version 1.1
LRFEventHandlers.h
Go to the documentation of this file.
1 //
2 // LRFEventHandlers.h
3 // LittleRobotFriends
4 //
5 // Created by Mark Argo on 2014-03-14.
6 // Copyright (c) 2014 Aesthetec Studio Inc. All rights reserved.
7 //
8 
9 /*
10  THIS SOFTWARE IS PROVIDED “AS IS”, WITHOUT ANY REPRESENTATIONS, CONDITIONS,
11  AND/OR WARRANTIES OF ANY KIND. WITHOUT LIMITATION, AESTHETEC STUDIO AND ITS
12  AFFILIATES, LICENSORS, SUPPLIERS, CONTRIBUTORS, SUBCONTRACTORS, DISTRIBUTORS
13  AND ALL CONTRIBUTORS DISCLAIM ANY EXPRESS OR IMPLIED REPRESENTATIONS,
14  CONDITIONS, OR WARRANTIES OF MERCHANTABILITY, MERCHANTABLE QUALITY, SATISFACTORY
15  QUALITY, NON-INFRINGEMENT, TITLE, DURABILITY, OR FITNESS FOR A PARTICULAR
16  PURPOSE, WHETHER ARISING BY STATUTE, COURSE OF DEALING, USAGE OF TRADE, OR
17  OTHERWISE. EXCEPT AS OTHERWISE PROVIDED IN THIS AGREEMENT, YOU SHALL BEAR
18  THE ENTIRE RISK FOR ANY USE OR ANY OTHER EXPLOITATION MADE BY YOU OF ANY
19  RIGHTS IN THE COVERED SOFTWARE.
20 
21  Additional copyright information found at http://littlerobotfriends.com/legal/
22 */
23 
31 #ifndef __LRFEventHandlers_h
32 #define __LRFEventHandlers_h
33 
34 #include <Arduino.h>
35 
36 #define LRF_EVENT_HANDLERS_DEBUG 0
37 
38 #define LRF_EVENTS_INTERACTION_START_IDX 0
39 #define LRF_EVENTS_INTERACTION_END_IDX 9
40 #define LRF_EVENTS_SYSTEM_START_IDX 10
41 #define LRF_EVENTS_SYSTEM_END_IDX 15
42 
46 
48 typedef enum
49 {
61 
70 
73 } LRFEvent;
74 
79 
89 typedef void (*LRFEventHandler)(void);
90 
91 extern LRFEventHandler lrfEventHandlers[];
92 
93 #endif
Long touch.
Prolonged darkness.
About to go to sleep.
Battery is getting low.
LRFEvent
Constants for different interaction and system events.
Mic gets triggered.
Any level to bright.
Just woke up.
Unrecognized event.
Any level to dark.
void(* LRFEventHandler)(void)
Function pointer with no parameters and no return value.
Just powered on (batteries in)
Multiple touch.
Dark to any level.
No interaction in a while.
Irda received a message.
Single touch.