This file contains 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 <ESP8266WiFi.h> | |
#include <MQTT.h> | |
#define pin_led 2 | |
#define pin_button 14 | |
#define wifi_ssid "ChewingGum" | |
#define wifi_password "Chewing.Gum" | |
#define mqtt_server "52.230.69.177" |
This file contains 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 <Wire.h> | |
#include <Adafruit_ADS1015.h> | |
Adafruit_ADS1115 ads(0x48); | |
#define pin_relay 13 | |
#define pin_sensor 0 | |
float power = 0; | |
This file contains 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
/* | |
Nurian Satya Wardana | |
Kelompok 91 | |
*/ | |
#include <LiquidCrystal.h> | |
#include <Keypad.h> | |
const int sensorPin = A0; | |
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; |
This file contains 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> | |
#define SIZE 11 | |
long int tabungan[] = {0,100,60,50,150,10,300,25,70,35,250}; | |
void cetakHeader(); | |
void enter(); | |
void cetakArray(); | |
void menuSaldoKumulatif(); | |
void menuPoinTahunan(); |
This file contains 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
30 menit Scele: | |
- 10 soal | |
- Looping (unwinding suatu loop) | |
- Modular | |
- Passing parameter (by value dan by reference) | |
- Sorting (asc dan desc) | |
- Statistik (mean, median, modus) | |
60 menit pemrograman |
This file contains 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
// Nurian S Wardana | |
// Median, mean, dan modus pada array | |
#include <stdio.h> | |
// Deklarasi variabel yang nanti digunakan | |
int array[] = {127,99,54,11,7,4,1}; | |
int arrayLength = sizeof(array) / sizeof(int); | |
// Deklarasi fungsi-fungsi yang nanti dipakai |
This file contains 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
// Nurian S Wardana | |
// Bubble sort array | |
#include <stdio.h> | |
void urutkanArray(int array[], int arrayLength) { | |
int lastIndex = arrayLength - 1; | |
int i, j, k, dummy; | |
for (i = 0; i < arrayLength; i++) { |
This file contains 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
// Nurian S Wardana | |
// Modify array | |
#include <stdio.h> | |
void gantiIsiArray(int array[], int arrayLength) { | |
int n; | |
for(n = 0; n < arrayLength; n++) { | |
array[n] = array[n] * 2; | |
} |
This file contains 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
// Nurian S Wardana | |
// Modify array + hapus duplikasi | |
#include <stdio.h> | |
void gantiIsiArray(int array[], int arrayLength) { | |
printf("Array menjadi: "); | |
int n; | |
for(n = 0; n < arrayLength; n++) { |
This file contains 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
// Nurian S Wardana | |
// Menghilangkan duplikasi pada array | |
#include <stdio.h> | |
int main() { | |
int ints[] = {10,10,10,11,12,12,15,17,17,20}; // array | |
int arrayLength = sizeof(ints) / sizeof(int); // mencari ukuran array | |
int n; |
NewerOlder