This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Headers for sd1306 display | |
/* Based on code Written by Limor Fried/Ladyada for Adafruit Industries, | |
with contributions from the open source community. | |
BSD license, check license.txt for more information | |
All text above, and the splash screen below must be | |
included in any redistribution. | |
**************************************************************************/ | |
#include <SPI.h> | |
#include <Wire.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hacked from: https://lastminuteengineers.com/drv8833-arduino-tutorial/ | |
// Define the control inputs | |
#define MOT_A1_PIN 6 | |
#define MOT_A2_PIN 5 | |
void setup(void) | |
{ | |
// Set all the motor control inputs to OUTPUT | |
pinMode(MOT_A1_PIN, OUTPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Arduino "No hardware" touch switch | |
// Based on https://github.com/todbot/TouchyTouch | |
#include "TouchyTouch.h" | |
#define STATUS_LED 4 | |
#define SENSE_PIN 12 | |
const int touch_pin = SENSE_PIN; | |
// Install as TouchyTouch library in Arduino. | |
TouchyTouch touches ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ***************************************** | |
// Reaction timer using interrupt | |
// ***************************************** | |
#define BUTTON_PIN 2 | |
#define LED_PIN 8 | |
// This must be declared volatile since it is accessed from | |
// the ISR and from loop() | |
//https://en.wikipedia.org/wiki/Volatile_(computer_programming) | |
static volatile int isr_counter = 0 ; |
OlderNewer