2025/01/01

How to use / navigate this blog

This is a quick summary of how to use / navigate this blog.

Announcements:

Sep. 24, 2018: The broken HTML Sitemap has been fixed. Hope it will help you find what you need faster...

Auto Translation by Google Translate

Use the Select Language widget to translate this blog into the language of you choosing (the translation quality may not be good, but I think it's enough to give you some general idea about the post).













2019/12/03

Linux Programming In C - A Simple Hello World

This is a quick summary of how to write and run a C program in Linux.

A Simple Hello World

1. Issue the command "sudo nano hello-world.c" to launch the nano editor;

2. Enter the code below in nano. Press Ctrl-X then press Y to save.

#include <stdio.h>

int main()
{
   printf("Hello, World! \n");
   return 0;
}

3. Issue the command "gcc hello-world.c -o myfirstcprogram" to compile;

4. Issue the command "./myfirstcprogram" to execute it.

Reference:

HOW TO WRITE AND RUN A C PROGRAM ON THE RASPBERRY PI
http://www.circuitbasics.com/how-to-write-and-run-a-c-program-on-the-raspberry-pi/

2019/11/19

EaglePCB - How to configure the design rules used by DRC according to the capabilities of the board manufacturer

This is a quick summary of how to change the design rules used by EaglePCB to perform design rules check (DRC).

First of all, let's see the DRC results using design rules from adafruit and sparkfun respectively.

DRC Results

Using "adafruit.dru"


Using "sparkfun.dru"


2019/11/18

EaglePCB - How to export parts used in a schematic to a library

This is a quick summary of how to export parts used in a schematic to a library using EaglePCB Version 6.6.0.

Step-1, Launch EaglePCB and load the schematic that you want to extract the components from;

Step-2, Click on the "Run ULP" icon (as shown below);


2019/10/08

Cloud-based messaging system with Telegram as the client-side App.

The purpose of this system is to provide an easy to use interface for viewing sensor status and configuring messaging settings for individual sensor deployed in the field. With this system in place, the deployed sensors only need to transmit essential data to the backend system and they could leave tasks such as who to receive what info. via which channel to the backend system; thus, making it possible to achieve longer battery life (by reducing the transmitting time).

Messaging Test


2019/10/06

A bare minimum, working HTML + jQuery framework that will be executed automatically upon the completion of page load.

This is a bare minimum, working HTML + jQuery framework that will be executed automatically upon the completion of page load.

index.html

<!DOCTYPE html>

<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
        <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> -->
        <!-- script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> -->
    </head>
    
    <body>
    </body>
</html>

<script>

    $(document).ready(function(){
        
        console.log('Hello World');
        alert('Hello Kitty');
      
    });
    
</script>

The Result

2019/09/30

How to retrieve data from MySQL database using PHP and display it using jQuery and Ajax

This is a quick summary of how to retrieve data from MySQL database using PHP and display it using jQuery and Ajax.

Step 1 - Prepare MySQL database and data table.

The SQL query below creates a database and data table and fills the table with sample data.