我正在运行 Windows Developer Program for IoT ( https://ms-iot.github.io/content/16x2LCD.htm ) 中的 16x2 LCD 示例。获取并在显示屏上显示 Galileo IP 地址而不是“你好!”的最佳方法是什么?信息?问候。
代码
标准数据文件
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
#include "arduino.h"
#include "LiquidCrystal.h" // we need this library for the LCD commands
主文件
#include "stdafx.h"
int RS = 4;
int ENABLE = 5;
int D0 = 6;
int D1 = 7;
int D2 = 8;
int D3 = 9;
LiquidCrystal lcd = LiquidCrystal(RS, ENABLE, D0, D1, D2, D3); // define our LCD and which pins to use
int _tmain(int argc, _TCHAR* argv [])
{
return RunArduinoSketch();
}
void setup()
{
Log(L"LCD Sample\n");
lcd.begin(16, 2); // need to specify how many columns and rows are in the LCD unit (it calls clear at the end of begin)
lcd.setCursor(0, 0);
lcd.print("Hello!");
lcd.setCursor(0, 1);
lcd.print(3.14159, 4); // prints a double, the 2nd number is the digits to print after the .
}
void loop()
{
}