Skip to content

Instantly share code, notes, and snippets.

View ThuyPham's full-sized avatar

ThuyPhamXuan ThuyPham

View GitHub Profile
@ThuyPham
ThuyPham / sim808_simple_test.py
Created April 27, 2018 03:37
Chương trình python đơn giản thực hiện cuộc gọi, tin nhắn tới người dùng.
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#Author : Pham Dinh Van
# RPI Sim808 || Raspberry Pi
# C_PW || GPIO 27
# PWK || GPIO 17
# TxD || RxD (GPIO 15)
# RxD || TxD (GPIO 14)
@ThuyPham
ThuyPham / sim808_simple_test.c
Last active April 27, 2018 03:38
Chương trình file .c đơn giản thực hiện cuộc gọi, tin nhắn tới người dùng.
/* Chuong trinh demo test RPI Sim808 Shield cho Raspberry Pi
* Chuc nang co ban :
* + Test Call and Messenger
*
* Author : Pham Dinh Van
*/
/* Ket noi giua Raspberry Pi and RPI Sim808 Shield
* RPI Sim808 || Raspberry Pi
* C_PW || GPIO 27
flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0×11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0×36,0x28,-1,0×11,-1,0×29,-3
fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QIcon # import function cho phép tải icon cho giao diện
from MlabDemo import MlabDemo # import đối tượng MlabDemo đã tạo ra trong module MlabDemo
class MainScreen(QWidget):
def __init__(self):
super(MainScreen, self).__init__()
self.ui = MlabDemo() # tạo một GUI với đối tượng là giao diện MlabDemo đã thiết kế
self.ui.setupUi(self)
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MlabDemo.ui'
#
# Created: Sat Jul 23 20:18:46 2016
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets