Skip to content

Instantly share code, notes, and snippets.

@louisgv
Forked from aroman/arduino_sketch.ino
Created October 25, 2019 22:02
Show Gist options
  • Save louisgv/6afbb21985ef13c536c8c70f7dd83460 to your computer and use it in GitHub Desktop.
Save louisgv/6afbb21985ef13c536c8c70f7dd83460 to your computer and use it in GitHub Desktop.
Extreme Software Engineering: https://www.youtube.com/watch?v=tMJW7p0EX7k
void setup() {
Serial.begin(9600);
pinMode(7, OUTPUT);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
char currentIMStatusCode = Serial.read();
Serial.println(currentIMStatusCode);
digitalWrite(7, HIGH);
delay(1000);
digitalWrite(7, LOW);
}
}
██████╗██████╗ ██╗████████╗██╗ ██████╗ █████╗ ██╗
██╔════╝██╔══██╗██║╚══██╔══╝██║██╔════╝██╔══██╗██║
██║ ██████╔╝██║ ██║ ██║██║ ███████║██║
██║ ██╔══██╗██║ ██║ ██║██║ ██╔══██║██║
╚██████╗██║ ██║██║ ██║ ██║╚██████╗██║ ██║███████╗
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗███╗ ██╗████████╗ █████╗ ██╗ ██╗
██╔════╝╚██╗ ██╔╝████╗ ██║╚══██╔══╝██╔══██╗╚██╗██╔╝
███████╗ ╚████╔╝ ██╔██╗ ██║ ██║ ███████║ ╚███╔╝
╚════██║ ╚██╔╝ ██║╚██╗██║ ██║ ██╔══██║ ██╔██╗
███████║ ██║ ██║ ╚████║ ██║ ██║ ██║██╔╝ ██╗
╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
███████╗██████╗ ██████╗ ██████╗ ██████╗
██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗
█████╗ ██████╔╝██████╔╝██║ ██║██████╔╝
██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗
███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
#include <stdio.h>
int main() {
printf("Hello world!");
return 0;
}
#!/bin/sh
# Colors and Fonts #
OF="\e[m"
RD="\e[31m"
GN="\e[32m"
YL="\e[33m"
BL="\e[34m"
BLINK="\e[5m"
B="\e[01m" # bold
U="\e[04m" # underscore
I="\e[07m" # invert colors
OFF="\e[m"
#SERIAL=/dev/null
SERIAL=/dev/ttyACM0
compile() {
printf "$B$GN"
echo "cc main.c -o main"
echo "Compiling..."
printf "\a"
printf "$OFF"
echo
sleep 2
}
input() {
echo -n "$ "
read INPUT
}
critical() {
sleep 3
printf "$B$RD$BLINK"
cat critical.txt
for delay in 1 0.8 0.6 0.4 0.2 0.2 0.1 0.1 0.1 0.1; do
printf "\a"
sleep $delay
done
printf "$OFF"
for i in `seq 10000`; do
printf "\a"
sleep 0.05
echo >$SERIAL
done
}
clear
# Phase 1
input
vi main.c
input
compile
#echo "$ ./main"
input
sleep 1
echo "Hello world!"
# Phase 2
input
vi main.c
input
compile
critical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment