Convert library examples
This commit is contained in:
@@ -37,10 +37,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -71,4 +72,3 @@ void loop() {
|
|||||||
// clear screen for the next loop:
|
// clear screen for the next loop:
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,10 +37,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -38,10 +38,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -58,4 +59,3 @@ void loop() {
|
|||||||
lcd.cursor();
|
lcd.cursor();
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,10 +39,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
// make some custom characters:
|
// make some custom characters:
|
||||||
byte heart[8] = {
|
byte heart[8] = {
|
||||||
@@ -38,10 +38,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -58,4 +59,3 @@ void loop() {
|
|||||||
lcd.display();
|
lcd.display();
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,10 +38,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -57,4 +58,3 @@ void loop() {
|
|||||||
// print the number of seconds since reset:
|
// print the number of seconds since reset:
|
||||||
lcd.print(millis() / 1000);
|
lcd.print(millis() / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,10 +38,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -81,6 +82,4 @@ void loop() {
|
|||||||
|
|
||||||
// delay at the end of the full loop:
|
// delay at the end of the full loop:
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,10 +36,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// these constants won't change. But you can change the size of
|
// these constants won't change. But you can change the size of
|
||||||
@@ -45,7 +46,7 @@ const int numRows = 2;
|
|||||||
const int numCols = 16;
|
const int numCols = 16;
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// set up the LCD's number of columns and rows:
|
// set up the LCD's number of columns and rows:
|
||||||
@@ -68,5 +69,3 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -37,10 +37,11 @@ http://www.arduino.cc/en/Tutorial/LiquidCrystalTextDirection
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include the library code:
|
// include the library code:
|
||||||
|
#include <Arduino.h>
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
// initialize the library with the numbers of the interface pins
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
int thisChar = 'a';
|
int thisChar = 'a';
|
||||||
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "Arduino.h"
|
#include <Arduino.h>
|
||||||
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "pb_decode.h"
|
#include "pb_decode.h"
|
||||||
@@ -6,8 +7,6 @@ extern "C" {
|
|||||||
#include "lcdkeypad.pb.h"
|
#include "lcdkeypad.pb.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <LiquidCrystal.h>
|
|
||||||
|
|
||||||
// Select the pins used on the LCD panel
|
// Select the pins used on the LCD panel
|
||||||
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
|
||||||
|
|
||||||
Reference in New Issue
Block a user