1 Star 0 Fork 0

DFRobot/DFRobot_RGB1602_RaspberryPi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

RGB1602 of RaspberryPi with C++ and Python3

Enable I2C:

Input: sudo raspi-config in terminal
Select: Interfacing Options
Select: I2C; enable I2C

C++:

install wiringPi(Please skip this step if you have already installed the library.)

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

Use C++ example

make AutomateRoll   # Compile and run the sample AutomateRoll.cpp
make Button   # Compile and run the sample Button.cpp
make clean   # Clear files generated by compilation

API

Change Color of Backlight

One of Grove - LCD RGB Backlight's most important feature is changing the backlight color. It's very simple; just use the folowing function:

void setRGB(int r, int g, int b);

Clear display

You can clear the display by this function:

void clear();

Turn on and turn off display

void noDisplay();     // turn off display
void display();       // turn on display

Blink

void stopBlink();
void blink();

Cursor

void noCursor();
void cursor();

Blink LED Backlight

void blinkLED();
void noBlinkLED();

Library of python3

install smbus

pip3 install smbus

Use python example

python3 AutomateRoll.py
python3 Button.py

Change Color of Backlight

One of Grove - LCD RGB Backlight's most important feature is changing the backlight color. It's very simple; just use the folowing function:

setRGB(r,g,b)

Clear display

You can clear the display by this function:

clear()

Turn on and turn off display

noDisplay()           // turn off display
display()             // turn on display

Blink

stopBlink()
blink()

Cursor

noCursor()
cursor()

Blink LED Backlight

blinkLED()
noBlinkLED()
  • @n [Get the module here]
  • @n This example Set the volume size and play music snippet.
  • @n [Connection and Diagram]
  • Copyright DFRobot, 2016
  • Copyright GNU Lesser General Public License

History

  • data 2018-1-9
  • version V1.0

Credits

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dfrobot/DFRobot_RGB1602_RaspberryPi.git
git@gitee.com:dfrobot/DFRobot_RGB1602_RaspberryPi.git
dfrobot
DFRobot_RGB1602_RaspberryPi
DFRobot_RGB1602_RaspberryPi
master

搜索帮助