Skip to content

Instantly share code, notes, and snippets.

NormalUniverse

Block or report user

Report or block NormalUniverse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Button, Buzzer, and LED State Machines
//Title: Button Debouncing using a State Machine
//Author: Chris Guichet
//Date: Jan 15, 2018
//
//Description:
// -A State Machine is a useful tool to organize complex code
// -Think of it like the next step beyone "If Else" statements
// -This example code uses a State Machine to handle tac switch debouncing
// -It also has a "Hold" function to enable interaction with long button presses
// -The tac switch is used to control a buzzer and an LED, it can multitask
View Simple Button Debounce State Machine
//Title: Button Debouncing using a State Machine, Complex Version
//Author: Chris Guichet
//Date: Jan 15, 2018
//
//Description:
// -A State Machine is a useful tool to organize complex code
// -Think of it like the next step beyone "If Else" statements
// -This example code uses a State Machine to handle tac switch debouncing
// -It also has a "Hold" function to enable interaction with long button presses
//
@NormalUniverse
NormalUniverse / gist:f8dbc04164ce240c973e739a1fb37eeb
Created Mar 14, 2018
Simple Button Debounce State Machine
View gist:f8dbc04164ce240c973e739a1fb37eeb
//Title: Button Debouncing using a State Machine, Complex Version
//Author: Chris Guichet
//Date: Jan 15, 2018
//
//Description:
// -A State Machine is a useful tool to organize complex code
// -Think of it like the next step beyone "If Else" statements
// -This example code uses a State Machine to handle tac switch debouncing
// -It also has a "Hold" function to enable interaction with long button presses
//
View NERF_CLOCK.ino
//***VARIABLES AND SUCH***
#include <Time.h>
#include <TimeLib.h>
#include <Adafruit_NeoPixel.h>
//Variables associated with Clock FSM
int t_hour = 20;
int t_minute = 29;
int t_second = 50;
@NormalUniverse
NormalUniverse / SC_Sandbox_Switch-Class
Created Jun 25, 2016
Arduino sketch that creates a "Swith" class that handles debouncing
View SC_Sandbox_Switch-Class
//***************************************************************************************************
//Defeinition of "Switch" class
//Should I change the name to avoid conflict with "switch" logical structure?
//***************************************************************************************************
//The switch
class Switch
{
public:
You can’t perform that action at this time.