Adafruit IO Arduino Library
AdafruitIO_Dashboard.h
Go to the documentation of this file.
1 
15 #ifndef ADAFRUITIO_DASHBOARD_H
16 #define ADAFRUITIO_DASHBOARD_H
17 
18 #include "AdafruitIO_Definitions.h"
19 #include "Arduino.h"
20 #include "blocks/ChartBlock.h"
21 #include "blocks/ColorBlock.h"
22 #include "blocks/GaugeBlock.h"
23 #include "blocks/ImageBlock.h"
24 #include "blocks/MapBlock.h"
25 #include "blocks/MomentaryBlock.h"
26 #include "blocks/SliderBlock.h"
27 #include "blocks/StreamBlock.h"
28 #include "blocks/TextBlock.h"
29 #include "blocks/ToggleBlock.h"
30 
31 // forward declaration
32 class AdafruitIO;
33 class AdafruitIO_Feed;
34 
35 /**************************************************************************/
40 /**************************************************************************/
42 
43 public:
44  AdafruitIO_Dashboard(AdafruitIO *io, const char *name);
46 
47  const char *name;
48  const char *user();
50  /**************************************************************************/
55  /**************************************************************************/
56  AdafruitIO *io();
57 
58  bool exists();
59  bool create();
60 
61  ToggleBlock *addToggleBlock(AdafruitIO_Feed *feed);
62  MomentaryBlock *addMomentaryBlock(AdafruitIO_Feed *feed);
63  SliderBlock *addSliderBlock(AdafruitIO_Feed *feed);
64  GaugeBlock *addGaugeBlock(AdafruitIO_Feed *feed);
65  TextBlock *addTextBlock(AdafruitIO_Feed *feed);
66  ChartBlock *addChartBlock(AdafruitIO_Feed *feed);
67  ColorBlock *addColorBlock(AdafruitIO_Feed *feed);
68  MapBlock *addMapBlock(AdafruitIO_Feed *feed);
69  StreamBlock *addStreamBlock(AdafruitIO_Feed *feed);
70  ImageBlock *addImageBlock(AdafruitIO_Feed *feed);
71 
72 private:
73  AdafruitIO *_io;
74 };
75 
76 #endif // ADAFRUITIO_DASHBOARD_H
const char * name
Definition: AdafruitIO_Dashboard.h:47
StreamBlock * addStreamBlock(AdafruitIO_Feed *feed)
Creates a new stream block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:219
Class for interacting with Adafruit IO.
Definition: AdafruitIO.h:45
bool create()
Creates a new dashboard. https://io.adafruit.com/api/docs/#create-a-dashboard.
Definition: AdafruitIO_Dashboard.cpp:66
ChartBlock * addChartBlock(AdafruitIO_Feed *feed)
Creates a new chart block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:180
const char * user()
Returns the dashboard owner.
Definition: AdafruitIO_Dashboard.cpp:102
bool exists()
Checks if Adafruit IO Dashboard exists. https://io.adafruit.com/api/docs/#return-dashboard.
Definition: AdafruitIO_Dashboard.cpp:42
MomentaryBlock * addMomentaryBlock(AdafruitIO_Feed *feed)
Creates a new momentary block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:128
GaugeBlock * addGaugeBlock(AdafruitIO_Feed *feed)
Creates a new gauge block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:154
Class for interacting with Adafruit IO Dashboards. https://io.adafruit.com/api/docs/#dashboards.
Definition: AdafruitIO_Dashboard.h:41
Class that provides methods for interfacing with Adafruit IO feed topics. https://io.adafruit.com/api/docs/mqtt.html#mqtt-topics.
Definition: AdafruitIO_Feed.h:34
TextBlock * addTextBlock(AdafruitIO_Feed *feed)
Creates a new momentary block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:167
ColorBlock * addColorBlock(AdafruitIO_Feed *feed)
Creates a new color block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:193
ImageBlock * addImageBlock(AdafruitIO_Feed *feed)
Creates a new image block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:232
friend class AdafruitIO_Dashboard
AdafruitIO_Dashboard addition.
Definition: AdafruitIO.h:62
SliderBlock * addSliderBlock(AdafruitIO_Feed *feed)
Creates a new slider block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:141
AdafruitIO * io()
Creates an instance of AdafruitIO.
Definition: AdafruitIO_Dashboard.cpp:104
MapBlock * addMapBlock(AdafruitIO_Feed *feed)
Creates a new map block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:206
ToggleBlock * addToggleBlock(AdafruitIO_Feed *feed)
Creates a new toggle block element on a dashboard connected to provided feed.
Definition: AdafruitIO_Dashboard.cpp:115