{ Berbagi, Menulis, Dan Mengajar } Ilmu… » Archive
Fungsi Reboot dan Shutdown pada Python
def reboot(self): import subprocess subprocess.call([“sudo”,”reboot”,”-p”]) def shutdown(self): import subprocess subprocess.call([“sudo”,”halt”,”-p”]) … Read entire article »
Filed under: 7. Operating System
Cara Menghilangkan Cursor Mouse di Raspberry
1. Install Unclutter Log in to your Raspberry Pi via SSH – or open terminal directly on the Pi. Then install Unclutter, like this: sudo apt-get install unclutter 2. Edit LXDE Autostart Script Next we need to edit the LXDE Autostart script – for us this means running: nano ~/.config/lxsession/LXDE-pi/autostart 3. Turn the Cursor Off Finally you need to add this line to the autostart script: @unclutter -idle 0 Press ctrl+X and then hit Y to save your changes. 4. Reboot Finally, reboot your Pi using: sudo reboot … Read entire article »
Filed under: Raspberry
Check SSID Wifi di Consol
INI CARA CHECK SSID root@raspberrypi:/home/pi/Desktop# iwlist wlan0 scan | grep SSID ESSID:”Iki wifine tonggo” ESSID:”WLAN_IKC” ESSID:”” ESSID:”ZTE_2.4G_hCjNNh” … Read entire article »
Filed under: 7. Operating System
Python Memaksimumkan View Aplikasi
class Ui_mainWindow(object): def setupUi(self, mainWindow): mainWindow.setObjectName("mainWindow") mainWindow.resize(771, 546) mainWindow.showFullScreen() … Read entire article »
Filed under: 7. Operating System
Wiring Pi .. Read Sensor Raspberry
import wiringpi as wpi from time import sleep PIR_SENSOR = 1 LED_MODULE = 21 wpi.wiringPiSetup() wpi.pinMode(PIR_SENSOR, wpi.INPUT) wpi.pinMode(LED_MODULE, wpi.OUTPUT) try: while True: if wpi.digitalRead(PIR_SENSOR) == wpi.HIGH: print(“Moving Object Detected”) sleep(0.5) wpi.digitalWrite(LED_MODULE, wpi.HIGH) else: print(“No Object Detected”) sleep(0.5) wpi.digitalWrite(LED_MODULE, wpi.LOW) except KeyboardInterrupt: wpi.pinMode(LED_MODULE, wpi.OUTPUT) wpi.digitalWrite(LED_MODULE, wpi.LOW) print(“exit”) … Read entire article »
Filed under: Raspberry
Cara Setting Database MariaDB Pengganti MYSQL
1. mysql -u root -p 2. CREATE USER 'farras'@'localhost' IDENTIFIED BY 'RA56i7'; 3. GRANT ALL PRIVILEGES ON db_nya.* TO 'farras'@'localhost'; ------ QUERY UNTUK MEMBUAT USER SETINGKAT ROOT GRANT ALL PRIVILEGES ON *.* TO 'farras'@'localhost' WITH GRANT OPTION; … Read entire article »
Filed under: 7. Operating System
Simple QT+MYSQL GUI
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MysqlGUI.ui' # # Created by: PyQt5 UI code generator 5.12.2 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets import pymysql class Ui_mainWindow(object): def messagebox(self,title,message): mess=QtWidgets.QMessageBox() mess.setWindowTitle(title) mess.setText(message) mess.setStandardButtons(QtWidgets.QMessageBox.Ok) mess.exec() def signup(self): nama=self.lineEdit.text() alamat=self.lineEdit_2.text() nohp=self.lineEdit_3.text() jkel=self.lineEdit_4.text() … Read entire article »
Filed under: 7. Operating System
Compile UI Python dari QT DESIGN ke Python Script
SEBAIKNYA GUNAKAN No. 1 1. python -m PyQt5.uic.pyuic -x MysqlGUI15.ui -o MysqlGUI15.py 2. pyuic5.exe -x untitled.ui -o text.py … Read entire article »
Filed under: 7. Operating System
Folder Setting Sublime text 3
C:\Users\DELL\AppData\Roaming\Sublime Text 3\Packages … Read entire article »
Filed under: 7. Operating System
check wilan
iw wlan0 scan > data.txt; cat data.txt | grep SSID … Read entire article »
Filed under: 7. Operating System