Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

297 total results found

Difference between Procedure, Function and Impure Function

Digital Sistem Design (PSD/DSG) Module 7 - Procedure, Function, and Imp...

Criteria Procedure Function Impure Function Purpose Perform tasks without returning a value. Return a value from a calculation. Produce an unpredictable value or one that depends on external factors. Arguments Can have input and/or output arguments. C...

1. Introduction to Linked Lists

Alprog - Elektro KKI Module 6 : Linked List

1.1 What is a Linked List? A linked list is a linear data structure where elements are not stored in contiguous memory locations. Instead, each element (called a node) contains: Data: The actual value stored Pointer(s): Reference to the next (and possibly pre...

2. Node Structure

Alprog - Elektro KKI Module 6 : Linked List

2.1 Defining a Node In C, a node is typically defined using a structure: // Definition of a node struct Node { int data; // Data part struct Node *next; // Pointer to next node }; Memory Layout: Single Node in Memory: ┌──────────┬──────────...

3. Singly Linked List Operations

Alprog - Elektro KKI Module 6 : Linked List

3.1 Creating an Empty List #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; // Initialize head pointer struct Node *head = NULL; 3.2 Insertion Operations 3.2.1 Insert at Beginning void insertAtBeginning(struct Nod...

4. Complete Singly Linked List Example

Alprog - Elektro KKI Module 6 : Linked List

#include <stdio.h> #include <stdlib.h> // Node structure struct Node { int data; struct Node *next; }; // Function prototypes void insertAtBeginning(struct Node **head, int value); void insertAtEnd(struct Node **head, int value); void insertAtPositio...

5. Doubly Linked List

Alprog - Elektro KKI Module 6 : Linked List

5.1 Node Structure struct DNode { int data; struct DNode *prev; // Pointer to previous node struct DNode *next; // Pointer to next node }; Visual Representation: NULL ← [prev|10|next] ⇄ [prev|20|next] ⇄ [prev|30|next] → NULL ↑ HEA...

6. Circular Linked List

Alprog - Elektro KKI Module 6 : Linked List

6.1 Structure In a circular linked list, the last node points back to the first node (or head). struct Node { int data; struct Node *next; }; Visual Representation: ┌───────────────────────────┐ ↓ │ HEAD → [10|●] ...

7. Advanced Linked List Operations

Alprog - Elektro KKI Module 6 : Linked List

7.1 Reverse a Singly Linked List Method 1: Iterative void reverseList(struct Node **head) { struct Node *prev = NULL; struct Node *current = *head; struct Node *next = NULL; while (current != NULL) { // Store next next = cu...

8. Practical Applications

Alprog - Elektro KKI Module 6 : Linked List

8.1 Polynomial Addition #include <stdio.h> #include <stdlib.h> // Node for polynomial term struct PolyNode { int coeff; // Coefficient int exp; // Exponent struct PolyNode *next; }; // Insert term in descending order of exponent void insertTe...

9. Common Errors and Debugging

Alprog - Elektro KKI Module 6 : Linked List

9.1 Memory Leaks Problem: void createList() { struct Node *head = (struct Node*)malloc(sizeof(struct Node)); head->data = 10; head->next = NULL; // MEMORY LEAK! head is lost when function returns } Solution: struct Node* createList() { str...

Tujuan Pembelajaran

Internet of Things Module 8 - Power Management

Setelah menyelesaikan modul ini, praktikan diharapkan mampu: Memahami tingkat konsumsi daya pada ESP32 berdasarkan proses yang dijalankan di dalamnya. Mengetahui metode-metode yang ada untuk mengurangi jumlah konsumsi daya ESP32. Mengetahui berbagai konfigura...

Konsumsi Daya pada ESP-32

Internet of Things Module 8 - Power Management

Sebagai mikrokontroler, ESP-32 memerlukan pasokan daya yang stabil agar dapat beroperasi dengan optimal. Daya tersebut digunakan oleh core prosesor untuk menjalankan berbagai, serta oleh komponen pendukung seperti I²C, Wi-Fi, dan Bluetooth untuk melakukan komu...

Metode Mengurangi Konsumsi Daya ESP-32 : Mengurangi Clock Speed CPU

Internet of Things Module 8 - Power Management

Terdapat beberapa faktor yang mempengaruhi tingkat konsumsi daya ESP-32, diantaranya sebagai berikut: Mengurangi Clock Speed CPU Menurunkan clockspeed (kecepatan clock) pada ESP32 dapat secara langsung menurunkan konsumsi daya karena frekuensi clock berpengaru...

Metode Mengurangi Konsumsi Daya ESP-32 : Mengganti Operating Mode

Internet of Things Module 8 - Power Management

Seperti pada tabel sebelumnya, terdapat bebeerapa operating mode yang didukung oleh ESP-32, diantaranya sebagai berikut: Deep Sleep Mode Deep Sleep merupakan mode daya sangat rendah di mana hampir seluruh sistem pada ESP32 dimatikan, sehingga menghasilkan kons...

Referensi Lebih Lanjut

Internet of Things Module 8 - Power Management

Penggunaan mode-mode sleep dalam kode belum dibahas secara terlalu detail dalam modul ini, silahkan refer ke Light Sleep untuk mempelajari penggunaan light sleep dan Deep Sleep untuk mempelajari penggunaan Deep Sleep pada kode. Referensi Lainnya: “Power Manag...

1. Introduction to Searching

Alprog - Elektro KKI Module 7: Searching & Sorting

1.1 What is Searching? Searching is the process of finding a particular element or checking if an element exists in a data structure (array, linked list, tree, etc.). Real-World Analogies: Finding a book in a library Searching for a contact in your phone Look...

2. Linear Search

Alprog - Elektro KKI Module 7: Searching & Sorting

2.1 Concept Linear Search (also called Sequential Search) checks every element in the array sequentially until the target is found or the end is reached. How it works: Start from the first element Compare each element with the target If match found, return th...

3. Binary Search

Alprog - Elektro KKI Module 7: Searching & Sorting

3.1 Concept Binary Search is a fast search algorithm that works on sorted arrays by repeatedly dividing the search interval in half. Prerequisites: Array must be sorted Random access to elements (arrays work well) How it works: Compare target with middle el...

4. Introduction to Sorting

Alprog - Elektro KKI Module 7: Searching & Sorting

4.1 What is Sorting? Sorting is the process of arranging elements in a specific order (ascending or descending). Why Sort? Faster Searching: Enables binary search Data Organization: Makes data easier to understand Algorithm Requirements: Many algorithms requi...

5. Simple Sorting Algorithms

Alprog - Elektro KKI Module 7: Searching & Sorting

5.1 Bubble Sort Concept Bubble Sort repeatedly steps through the list, compares adjacent elements, and swaps them if they're in the wrong order. How it works: Compare adjacent elements Swap if in wrong order Repeat for all elements After each pass, largest el...