Category: Code

  • 🚀 PM2 Persistence Guide

    Here is a concise “Cheat Sheet” you can save to a notes file. These three steps are all you need to make sure your apps come back to life after a server reboot. (Post-Reboot Autorestart) Follow these steps after your app is already running in pm2 list. 1. Generate the Link Tell PM2 to figure…

  • BMP180 on RPi3

    Step 1: Enable I2C Open the Raspberry Pi configuration tool: sudo raspi-config Navigate to Interface Options > I2C and enable it. Reboot the Raspberry Pi: sudo reboot Step 2: Install Required Libraries Update your Raspberry Pi: sudo apt update && sudo apt upgrade -y Install the I2C tools and the necessary Python libraries: sudo apt…

  • RPI Imager advanced options

    CRTL+SHIFT+X

  • Raspberry Pi Zero DHT11

    Connect DHT11 module to pin 1,6,7 To set up a DHT11 sensor on a Raspberry Pi according to the article, you’ll need to use the following commands: (use DHT11 module and pin 1,6,7) 1. Update and Upgrade: sudo apt-get update sudo apt-get upgrade 2. Install Python Packages: sudo apt-get install python3-pip python3-dev 3. Install DHT11…

  • Wemos D1 R2 (ESP8266)

    I am try to build a sensor with low power consumption, low enough for be battery operated. This sensor will acquire temperature and humidity readings and transmit them to my Raspberry Pi controller via HTTP requests. The Raspberry Pi will utilize a webpy service running on port 8080 to collect data from various sensors deployed…

  • Dynamic data with Chart.js

      The joy of using charts on you web site! I use chart.js and I have to say after getting MySql to extract the right data I wanted to change data dynamically without a post back to the page. I have to say that I did find some examples online on how to do that with chart.js…

  • Temperature report site revamp!

    Finally I did it!  Still struggling with PHP.  I was thinking of using django but I thought the learning curve was too much to tackle for a side project.  Absolutely loving Bootstrap and Chart.js both so easy to use and very good looking.  Have a look at the final result here. Soon I might post…

  • Webmin on Raspberry Pi

    This is the only way i can install webmin on Pi: mkdir webmin cd webmin wget http://prdownloads.sourceforge.net/webadmin/webmin-1.580.tar.gz gunzip webmin-1.580.tar.gz tar xf webmin-1.580.tar cd webmin-1.580 sudo ./setup.sh /usr/local/webmin

  • WP backup strategy

    This is my WP backup strategy: The strategy involves backing up both the MySQL database and the WordPress file system. I have successfully migrated my site to different machines and restored from various failures, and this approach has proven reliable. To back up the MySQL database, I installed automysqlbackup. This user-friendly tool simplifies the setup…

  • IPaddress change alert script

    My old ISP use to change my external IP address all the time and to keep my DNS name on track I wrote this script: #!/usr/bin/python import smtplib import urllib2 import time import sys def send_email(): try: server = smtplib.SMTP(‘smtp’, 587)#smtp address and port number server.starttls() #Next, log in to the server server.login(“smtp username”, “password”)#username…