Skip to content
Snippets Groups Projects
Commit 52b399a4 authored by Jauhar Arifin's avatar Jauhar Arifin
Browse files

setup pin for seismo detector

parent cc1d56f8
Branches
No related merge requests found
...@@ -7,6 +7,7 @@ LiquidCrystal lcd(0, 1, 8, 9, 10, 11); /// REGISTER SELECT PIN,ENABLE PIN,D4 PIN ...@@ -7,6 +7,7 @@ LiquidCrystal lcd(0, 1, 8, 9, 10, 11); /// REGISTER SELECT PIN,ENABLE PIN,D4 PIN
const int latchPin = 2; //to IC pin 12 const int latchPin = 2; //to IC pin 12
const int dataPin = 3; //to IC pin 14 const int dataPin = 3; //to IC pin 14
const int clockPin = 4; //to IC pin 11 const int clockPin = 4; //to IC pin 11
const int seismicPin = 5;
const byte digit[] = {64, 121, 36, 48, 25, 18, 2, 120, 0, 16}; const byte digit[] = {64, 121, 36, 48, 25, 18, 2, 120, 0, 16};
byte magnitude; byte magnitude;
...@@ -15,10 +16,13 @@ void setup() { ...@@ -15,10 +16,13 @@ void setup() {
pinMode(latchPin, OUTPUT); pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT); pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT); pinMode(clockPin, OUTPUT);
pinMode(seismicPin, INPUT);
magnitude = 0; magnitude = 0;
//LCD //LCD
lcd.begin(16, 2); lcd.begin(16, 2);
Serial.begin(9600);
} }
void loop() { void loop() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment