Skip to content

Commit 0ac44e0

Browse files
Add files via upload
1 parent e161518 commit 0ac44e0

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

Kod.ino

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* Writer: Yunus Emre Aydınlı
2+
Date: 23.02.2020
3+
4+
Nokia 5110 pins;
5+
1
6+
RST – Pin 11
7+
CE – Pin 12
8+
DC – Pin 10
9+
DIN – Pin 9
10+
VCC – Pin 8
11+
BL – Pin 5V
12+
GND – Pin GND
13+
8
14+
HC-SR04 pins;
15+
GND - Pin GND
16+
ECHO - Pin 6
17+
TRİG - Pin 7
18+
VCC - Pin 5V"
19+
*/
20+
21+
#include <LCD5110_Basic.h>
22+
#define trigPin 7
23+
#define echoPin 6
24+
25+
LCD5110 myGLCD(8,9,10,11,12);
26+
extern uint8_t SmallFont[];
27+
extern uint8_t BigNumbers[];
28+
29+
void setup()
30+
{
31+
myGLCD.InitLCD();
32+
pinMode(trigPin, OUTPUT);
33+
pinMode(echoPin, INPUT);
34+
}
35+
36+
void loop()
37+
{
38+
myGLCD.setFont(SmallFont);
39+
myGLCD.print("Mesafe:", CENTER, 0);
40+
int sure, mesafe=0;
41+
digitalWrite(trigPin, HIGH);
42+
delayMicroseconds(1000);
43+
digitalWrite(trigPin, LOW);
44+
sure = pulseIn(echoPin, HIGH);
45+
mesafe = sure/58;
46+
myGLCD.setFont(BigNumbers);
47+
myGLCD.printNumI(mesafe,CENTER,16);
48+
delay(450);
49+
myGLCD.clrScr();
50+
}

Libraries/HC-SR04_v1.9.1.zip

18.8 KB
Binary file not shown.

Libraries/LCD5110_Basic.zip

372 KB
Binary file not shown.

Library installation.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Hello,
2+
Things to do to establish libraries;
3+
4+
After downloading the zip file Sketch -> Include Library -> Select the ZIP library and add the ZIP file.
5+
6+
Important note;
7+
HC-SR04 Current Library:
8+
https://bitbucket.org/teckel12/arduino-new-ping/downloads/

Sema.png

108 KB
Loading

0 commit comments

Comments
 (0)