Author: Felix Tang

  • Create a simple remote control system using dual Raspberry Pi 4B

    This project involves activating a remote device using three buttons located in the office, leveraging the existing LAN infrastructure. I have developed a simple circuit to test the functionality of my code. Three buttons, designated as Button 1, Button 2, and Button 3, are connected to the GPIO pins of a Raspberry Pi 4B. This… Read more

  • Get Your Raspberry Pi to Start Automatically (with Service)

    ,

    I am creating a web server application on a Raspberry Pi using Flask. The server application should automatically start when the Pi powers on. The most common approach is to implement a system service that runs the Python application within a virtual environment. Here’s how to do it. Part 1: Create shell script 1. Open… Read more

  • Create unique download links in Raspberry Pi using Flask

    I try to implement an automatic link generation and file download process using Flask instead of Apache. Flask is a lightweight web framework for Python that allows you to set up a web server and handle file downloads efficiently. For all package download and installation, I will do that under virtual environment to manage dependencies… Read more

  • Create unique download links in Raspberry Pi using Apache

    For all package download and installation, I will do that under virtual environment to manage dependencies without affecting the system Python installation. The detail of creating a virtual environment can be found in my previous blog https://cs-student.com/virtual-environment-in-raspberry-pi/ Step 1: Download package for Raspberry Pi Open a terminal and run the following commands to ensure your system… Read more

  • Virtual Environment in Raspberry Pi

    When I try to install one package such as flask in my Raspberry Pi by running following command in terminal : Error is shown as below: The error message encountering indicates that the environment is managed in such a way that it restricts the installation of packages directly using pip in the system-wide Python environment.… Read more

  • IP routing in Raspberry Pi

    One of the primary functions of IP routing in a network device, such as a computer, is to identify the optimal path for data packets to navigate across networks, ensuring they arrive at their intended destination. I am developing a backend and frontend application using a Raspberry Pi 4B. The Pi board connects to several… Read more

  • Create web interface for NTP server – dashboard.js & dashboard.html (Part 5)

    Read more

  • Create web interface for NTP server – practicing MySQL (Part 4)

    This is part of my job in Web Programming project. The database is not related to this NTP server project. It is only used for illustrating how to create database, create tables and manipulate data. Enter Mysql console mode:mysql mysql> create database onlineshop;mysql> show databases;+——————–+| Database |+——————–+| information_schema || mysql || onlineshop || performance_schema ||… Read more

  • Create web interface for NTP server – index.js & index.html (Part 3)

    In a typical Express application, the index.js file under the route ‘/’ serves as the primary router for handling requests directed at the root URL (/). Usage and Functions of index.js In my index.js, I will add the some route handlers. (A) Module Imports: (B) When a HTTP GET request is made to path /login, /config, /account, /dashboard, the matched route… Read more

  • Create web interface for NTP server – apps.js (Part 2)

    Let’s understand the file structures first. Files and directories are created when node.js is installed. Each of these directories serves a distinct purpose in organizing the various components of a web application, facilitating maintainability and clarity in your project’s structure. Here’s a breakdown of the types of files typically found in the specified directories of… Read more