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 <SPI.h> | |
#include <mcp_can.h> | |
#define SPI_CS_PIN 9 | |
#define LED 8 | |
MCP_CAN CAN(SPI_CS_PIN); | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(LED,OUTPUT); | |
while (CAN_OK != CAN.begin(CAN_500KBPS)) //can bus : baudrate = 500k |
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 <SPI.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_PCD8544.h> | |
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3); | |
void setup() | |
{ | |
Serial.begin(9600); | |
display.begin(); | |
display.setContrast(50); | |
display.clearDisplay(); |
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 <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x3F,16,2); | |
#define sensor_pin A0 | |
#define sensor_pin 8 | |
int buzzer=9; | |
#define preheat_time 5000 | |
void setup() { |
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 <LiquidCrystal_I2C.h> // LCD ekran için Kod Kütüphanesi | |
#include <NewPing.h> // HC-SR04 için Kod Kütüphanesi | |
LiquidCrystal_I2C lcd(0x3F,16,2); | |
#define TRIGGER_PIN 13 // Ultrasonik Sensör’ün Trig pininin bağlı olduğu Arduino pini. | |
#define ECHO_PIN 12 // Ultrasonik Sensör’ün Echo pininin bağlı olduğu Arduino pini. | |
#define MAX_DISTANCE 400 // Ölçmek istediğimiz maksimum mesafe. | |
//(Maksimum 400-500cm civarı ölçülebilir. Ölçüm alanı dışında ise “0” değeri döndürür.) |
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
int kirmizi = 10;//ledlerin bağlandığı pinler | |
int sari = 9; | |
int yesil = 8; | |
int button = 12; // butonun bağlandığı pin 12 | |
void setup() { | |
pinMode(kirmizi, OUTPUT);//pinlere çıkış sinyalinin verilmesi | |
pinMode(sari, OUTPUT); | |
pinMode(yesil, OUTPUT); | |
pinMode(button, INPUT);//butona giriş sinyali verilmesi |
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
const int trigger_pin = 13;//trig pini bağlantısı | |
const int echo_pin = 12;//echo pini bağlantısı | |
const int buzzer = 2;//buzzer bağlantısı | |
const int mled = 3;//ledlerin bağlantısı | |
const int yled = 4; | |
const int sled = 5; | |
const int kled = 6; | |
int mesafe ;//mesafe ve süre adında iki değişkenin tanımlanması | |
int sure ; | |
void setup() { |
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
// bağlanan pinlerin tanımlanması | |
const int ldrPin = A0; // LDR pini Analog0 pinine bağlanır. | |
const int ledPin1 = 12; | |
const int ledPin2 = 11; | |
const int ledPin3 = 10; | |
const int ledPin4 = 9; | |
// Algılanan ışığın eşik değerleri tanımlandı | |
int ldrValue = 0; // LDR sensörünün başlangıç değeri 0 | |
int ldrlevel1=600; //Algılanan ışık seviyelerinin kademelendirilmesi |
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 <LiquidCrystal_I2C.h> //I2C modülün kütüphanesi | |
#include <Wire.h> | |
#include "RTClib.h"//RTC modül kütüphanesinin tanımlanması | |
LiquidCrystal_I2C lcd(0x27,16,2); //lcd ekran özellikleri | |
RTC_DS1307 RTC; | |
void setup() { | |
Wire.begin(); | |
RTC.begin(); | |
lcd.begin(); | |
if (! RTC.isrunning()) //RTC çalışmıyorsa |
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 "pitches.h" | |
int F = 10; | |
ing G = 11; | |
int A = 12; | |
int B = 13; | |
int f[] = {NOTE_F5}; | |
int g[] = {NOTE_G5}; | |
int a[] = {NOTE_A5}; | |
int b[] = {NOTE_B5}; |
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 "LedControl.h" | |
int DIN = 5;//dot matrix bağlantısı | |
int CS = 4; | |
int CLK = 3; | |
#include <Wire.h>//ısı nem cihazı bağlantısı | |
#include <DHT.h> | |
#define DHTPIN 8 | |
#define DHTTYPE DHT11 |