blynk & neopixelring & w7500

Fork of WIZwiki-7500_Blynk by IOP

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WidgetLCD.h Source File

WidgetLCD.h

Go to the documentation of this file.
00001 /**
00002  * @file       WidgetLCD.h
00003  * @author     Volodymyr Shymanskyy
00004  * @license    This project is released under the MIT License (MIT)
00005  * @copyright  Copyright (c) 2015 Volodymyr Shymanskyy
00006  * @date       Mar 2015
00007  * @brief
00008  */
00009 
00010 #ifndef WidgetLCD_h
00011 #define WidgetLCD_h
00012 
00013 #include <Blynk/BlynkWidgetBase.h >
00014 
00015 class WidgetLCD
00016     : public BlynkWidgetBase
00017 {
00018 public:
00019     WidgetLCD(uint8_t vPin) : BlynkWidgetBase(vPin) {}
00020 
00021     void clear() {
00022         Blynk.virtualWrite(mPin, "clr");
00023     }
00024 
00025     template<typename T>
00026     void print(int x, int y, const T& str) {
00027         char mem[BLYNK_MAX_SENDBYTES];
00028         BlynkParam cmd(mem, 0, sizeof(mem));
00029         cmd.add("p");
00030         cmd.add(x);
00031         cmd.add(y);
00032         cmd.add(str);
00033         Blynk.virtualWrite(mPin, cmd);
00034     }
00035 
00036 };
00037 
00038 #endif