Arduino 下 Nokia 5110 LCD + DS18B20 多点测温

温度库:http://milesburton.com/Dallas_Temperature_Control_Library
5110库:https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library

资料上显示 DS18B20 可以使用 3-5v 电源供电,可以做到9-12位精度。不过12位精度比9位精度测温慢多了。而1820只能5V供电,9位精度。

注意,需要使用arduino-1.52以上版本,arduino-1.05的会出现以下错误:

\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'DC_LCD' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'RST_LCD' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp: In member function 'void RobotControl::begin()':
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXA' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXB' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXC' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXD' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:19: error: 'MUX_IN' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:22: error: 'BUZZ' was not declared in this scope
\arduino-1.0.5-windows\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:25: error: 'Serial1' was not declared in this scope

发表评论

电子邮件地址不会被公开。