to9 / PiSmartCenter

Home smart center based Raspberry Pi.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PiSmartCenter

Travis

Description

This PiSmartCenter project is written in Qt/QML. It is have real time info display. Can run on the raspberry pi.

View

  • Run on Windows:
  • Run on Raspberry Pi

image

Setting font library for raspberry

Raspberry Pi installed wqy fonts

  • apt-get install ttf-wqy-zenhei

    字库安装成功后,查找文泉驿字库"wqy-zenhei.ttc" 复制到Qt交叉编译库目录下/usr/local/qt-5.9.2-raspberry/lib/fonts. 如果没有fonts目录,则新建一个fonts目录. 程序运行后会自动查找该目录下对应字库。

mkdir fonts
cp /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc wqy-zenhei.ttc

Setting start-up for raspberry

1: Set Raspberry Pi boot to automatically enter the command line

  • raspi-config

    select "3 Boot Options Configure options for start-up"

    select "B1 Desktop / CLI Choose whether to boot int a desktop environment or the command line"

    setting "B1 Console Text console, requiring user to login"

2: Automatically log in by the command line (root username)

  • vim /etc/systemd/system/getty.target.wants/getty@tty1.service

    line: ExecStart=-/sbin/agetty --noclear %I $TERM

    change: ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM

    "root" is the username of the automatic login.

3: Boot script

  • vim /etc/profile.d/PiSmartCenter.sh
$ cd /uar/local/rasp-qt
$ ./PiSmartCenter 

4: reboot

Reboot system.The system automatically executes all the scripts in the "/etc/profile.d/" directory.

PiSmartCenter program auto start.

License

Crates.io

Copyright (c) 2017-present, G.D.

About

Home smart center based Raspberry Pi.

License:MIT License


Languages

Language:C++ 51.0%Language:QML 48.3%Language:QMake 0.7%