最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

lcd

2023-07-05 14:24 作者:改個名字收獲幸運  | 我要投稿

#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,4,5,6,7);

int analogInPin=A0;


void setup() {

? // put your setup code here, to run once:

? lcd.begin(16,2);

? lcd.clear();

? lcd.setCursor(1,0);

? lcd.print ("welcome");

? lcd.setCursor(1,1);

? lcd.print ("I love arduino");

? delay(2000);

}


void loop() {

? // put your main code here, to run repeatedly:

? int sensorVol=analogRead(analogInPin);

? int voltage=map(sensorVol,0,1023,0,500);

? showVol(voltage);

? delay(100);

}

void showVol(int vol)

{

? int vBai,vShi,vGe;

? vBai=vol/100%10;

? vShi=vol/100%10;

? vGe=vol%10;

? lcd.clear();

? lcd.setCursor(3,0);

? lcd.print ("Voltage is");

? lcd.setCursor(6,1);

? lcd.print (vBai);

? lcd.print (".");

? lcd.print (vShi);

? lcd.print (vGe);

? delay(2000);


}


lcd的評論 (共 條)

分享到微博請遵守國家法律
东至县| 马关县| 勐海县| 盐城市| 武邑县| 修文县| 武城县| 宣化县| 民权县| 黔江区| 枣强县| 大化| 宝鸡市| 睢宁县| 团风县| 临漳县| 禹城市| 白沙| 理塘县| 中卫市| 莱芜市| 曲水县| 怀来县| 巴林左旗| 武隆县| 龙陵县| 无棣县| 益阳市| 抚顺县| 九江县| 安溪县| 政和县| 缙云县| 当涂县| 德清县| 丹东市| 揭东县| 南平市| 沙河市| 淄博市| 邵武市|