Skip to content

Instantly share code, notes, and snippets.

@damp11113
Last active August 29, 2022 08:23
Show Gist options
  • Save damp11113/62af5256702c661086f8ae6d2bb6716e to your computer and use it in GitHub Desktop.
Save damp11113/62af5256702c661086f8ae6d2bb6716e to your computer and use it in GitHub Desktop.
adrod 13
/*
* Created by damp11113
*
* This example code is in github https://gist.github.com/damp11113/62af5256702c661086f8ae6d2bb6716e
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
int lcdColumns = A5;
int lcdRows = A4;
const int BUTTON_PIN = 2;
const int BUTTON_PIN2 = 3;
LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);
void setup() {
pinMode(BUTTON_PIN, INPUT_PULLUP);
pinMode(BUTTON_PIN2, INPUT_PULLUP);
// initialize LCD
lcd.init();
// turn on LCD backlight
lcd.backlight();
Serial.begin(9600); // initialize serial
lcd.setCursor(0, 0);
lcd.print("adrod 13 installer");
delay(5000);
lcd.clear();
}
void installed() {
int buttonState2 = digitalRead(BUTTON_PIN2); // read new state
lcd.setCursor(0, 0);
lcd.print("The system has been destroyed");
delay(750);
for (int positionCounter = 0; positionCounter < 15; positionCounter++) {
int buttonState2 = digitalRead(BUTTON_PIN2); // read new state
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(750);
}
lcd.clear();
delay(1000);
lcd.setCursor(0, 0);
lcd.print("Preass power button to shutdown");
delay(750);
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
for (int positionCounter = 0; positionCounter < 15; positionCounter++) {
int buttonState2 = digitalRead(BUTTON_PIN2); // read new state
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(750);
}
lcd.clear();
delay(1000);
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
lcd.print("bro ur ardu has been bricked");
delay(750);
for (int positionCounter = 0; positionCounter < 15; positionCounter++) {
int buttonState2 = digitalRead(BUTTON_PIN2); // read new state
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(750);
}
lcd.clear();
delay(1000);
if (buttonState2 == LOW) {
lcd.clear();
lcd.noBacklight();
}
installed();
}
void loop() {
int buttonState = digitalRead(BUTTON_PIN); // read new state
lcd.setCursor(0, 0);
lcd.print("Press button to install adrod 13");
delay(750);
if (buttonState == LOW) {
delay(300);
lcd.clear();
delay(300);
installed();
}
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
int buttonState = digitalRead(BUTTON_PIN); // read new state
if (buttonState == LOW) {
delay(300);
lcd.clear();
delay(300);
installed();
}
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(750);
}
lcd.clear();
delay(1000);
if (buttonState == LOW) {
delay(300);
lcd.clear();
delay(300);
installed();
}
lcd.setCursor(0, 0);
lcd.print("adrod 13 installer");
delay(750);
for (int positionCounter = 0; positionCounter < 2; positionCounter++) {
int buttonState = digitalRead(BUTTON_PIN); // read new state
if (buttonState == LOW) {
delay(300);
lcd.clear();
delay(300);
installed();
}
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(750);
}
lcd.clear();
delay(1000);
if (buttonState == LOW) {
delay(300);
lcd.clear();
delay(300);
installed();
}
}
@damp11113
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment