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
byte sda = 10; | |
byte rst = 9; | |
#include<KRrfid.h> | |
void setup() { | |
Serial.begin(9600); | |
rfidBegin(); | |
} | |
void loop() { |
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 <DHT.h> | |
DHT dht(2, DHT11); //Pin, Jenis DHT | |
void setup(){ | |
Serial.begin(9600); | |
dht.begin(); | |
} | |
void loop(){ | |
float kelembaban = dht.readHumidity(); |
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 "DHT.h" //Memasukan Library DHT ke Program | |
#define DHTPIN 2 //menggunakan pin 2 untuk pemasangan sensornya | |
#define DHTTYPE DHT11 //memilih tipe DHT11, bisa diubah menjadi DHT22, DHT21 | |
DHT dht(DHTPIN, DHTTYPE); //setting pin yang dipilih dan tipe DHT | |
int led = 13; | |
void setup() { | |
Serial.begin(9600); //komunikasi Serial dengan komputer | |
dht.begin(); //Komunikasi DHT dengan Arduino |
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 "Adafruit_Fingerprint.h" | |
#include "SoftwareSerial.h" | |
SoftwareSerial mySerial(2, 3); | |
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); | |
uint8_t id; | |
void setup() { | |
Serial.begin(9600); | |
finger.begin(57600); |
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 "Adafruit_Fingerprint.h" | |
#include "SoftwareSerial.h" | |
SoftwareSerial mySerial(2, 3); | |
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); | |
void setup() { | |
Serial.begin(9600); | |
finger.begin(57600); | |
if (finger.verifyPassword()) { |
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 "Adafruit_Fingerprint.h" | |
#include "SoftwareSerial.h" | |
SoftwareSerial mySerial(2, 3); | |
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); | |
void setup() { | |
Serial.begin(9600); | |
finger.begin(57600); | |
if (finger.verifyPassword()) { |
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
void setup() { | |
// semua kode yang disini akan dibaca sekali oleh Arduino | |
} | |
void loop() { | |
//semua kode yang ada disini akan dibaca | |
//berulang kali (terus menerus) oleh Arduino | |
} |
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 <OneWire.h> | |
#include <DallasTemperature.h> | |
OneWire pin_DS18B20(4); | |
DallasTemperature DS18B20(&pin_DS18B20); | |
void setup(void) { | |
Serial.begin(9600); | |
DS18B20.begin(); | |
} |
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<iostream> | |
#include<string> | |
#include <cstdlib> | |
using namespace std; | |
long kode, harga, diskon; | |
string nama; | |
string produk[5][4] = { | |
{"1", "Table", "1000000", "10"}, | |
{"2", "Paper", "50000", "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
#include "RTClib.h" | |
RTC_DS3231 rtc; | |
char dataHari[7][12] = {"Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"}; | |
String hari; | |
int tanggal, bulan, tahun, jam, menit, detik; | |
float suhu; | |
void setup () { | |
Serial.begin(9600); |
OlderNewer