Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
WidgetLCD.h
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/BlynkApi.h> 00014 00015 class WidgetLCD 00016 { 00017 public: 00018 WidgetLCD(uint8_t pin) : mPin(pin) {} 00019 void setVPin(int vPin) { mPin = 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[64] = ""; 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 private: 00037 uint8_t mPin; 00038 }; 00039 00040 #endif 00041
Generated on Tue Jul 12 2022 13:01:30 by
1.7.2