This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| raw_lora_ultrasonic_ldr_debug.ino | |
| - Raw LoRa (LoRa.h) | |
| - Frequency : 915E6 | |
| - Ultrasonic : TRIG -> D4, ECHO -> D5 | |
| - LDR : A0 (voltage divider with 10k resistor) | |
| - Payload : "DIST=xxx,LDR=yyy" | |
| - Interval : 10 seconds (non-blocking) | |
| - Logging : detailed engineering debug + runtime stats (every 60s) | |
| - ACK window : listen for downlink up to ackWindowMs after TX (to estimate packet loss) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <dirent.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char **argv) { | |
| if (argc == 1) { | |
| printf("Usage: %s [directory]\n", *argv); | |
| exit(0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main() { | |
| FILE *fh; | |
| int ch; | |
| fh = fopen("Praktikum_IX.txt", "r"); | |
| if (fh == NULL) { | |
| puts("Can't open that file!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // mendefinisikan nilai variabel array maksimum sejumlah 20 | |
| #define max 20 | |
| int main() | |
| { | |
| // set setiap variabel yang dibutuhkan | |
| int frag[max], ukuranBlok[max], ukuranProses[max], i, j, jmlBlok, jmlProses, temp; | |
| static int alokasiBlok[max], flags[max]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // mendefinisikan nilai variabel array maksimum sejumlah 20 | |
| #define max 20 | |
| void main() { | |
| // set setiap variabel yang dibutuhkan | |
| int frag[max], ukuranBlok[max], ukuranProses[max], i, j, jmlBlok, jmlProses, temp, lowest = 10000; | |
| static int alokasiBlok[max], flags[max]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // mendefinisikan nilai variabel array maksimum sejumlah 20 | |
| #define max 20 | |
| void main() { | |
| // set setiap variabel yang dibutuhkan | |
| int frag[max], ukuranBlok[max], ukuranProses[max], i, j, jmlBlok, jmlProses, temp, highest = 0; | |
| static int alokasiBlok[max], flags[max]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| void print(int x[][10],int n,int m){ | |
| int i,j; | |
| for(i=0;i<n;i++){ | |
| printf("\n"); | |
| for(j=0;j<m;j++){ | |
| printf("%d\t",x[i][j]); | |
| } |