source: rtos_arduino/trunk/arduino_lib/libraries/LuckyShield/src/Lucky.h@ 175

Last change on this file since 175 was 175, checked in by ertl-honda, 8 years ago

ライブラリを Arduino IDE 1.7.9 にupdate

File size: 1.8 KB
Line 
1/*
2****************************************************************************
3* This file is part of Arduino Lucky Shield Library
4*
5* Copyright (c) 2016 Arduino srl. All right reserved.
6*
7* File : Lucky.h
8* Date : 2016/03/21
9* Revision : 0.0.1 $
10* Author: andrea[at]arduino[dot]org
11*
12****************************************************************************
13
14 This library is free software; you can redistribute it and/or
15 modify it under the terms of the GNU Lesser General Public
16 License as published by the Free Software Foundation; either
17 version 2.1 of the License, or (at your option) any later version.
18
19 This library is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 Lesser General Public License for more details.
23
24 You should have received a copy of the GNU Lesser General Public
25 License along with this library; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
28******************************************************************************/
29
30#ifndef Lucky_h
31#define Lucky_h
32
33#include "lib/CAT9555.h"
34#include "lib/MMA8491Q.h"
35#include "lib/MAG3110.h"
36#include "lib/BME280.h"
37#include "lib/Adafruit_GFX.h"
38#include "lib/Adafruit_SSD1306.h"
39#include <Arduino.h>
40#include "Wire.h"
41
42class Lucky
43{
44 public:
45
46 void begin(){
47 Wire.begin();
48 cat9555.begin();
49 ssd1306.begin();
50 mag3110.begin();
51 bme280.begin();
52 }
53 MMA8491Q& accelerometer(){
54 return mma8491q;
55 }
56 MAG3110& magnetometer(){
57 return mag3110;
58 }
59 BME280& environment(){
60 return bme280;
61 }
62 CAT9555& gpio(){
63 return cat9555;
64 }
65 Adafruit_SSD1306& oled(){
66 return ssd1306;
67 }
68};
69
70extern Lucky lucky;
71
72#endif
Note: See TracBrowser for help on using the repository browser.