Skip to content

Instantly share code, notes, and snippets.

long randNumber1;
long randNumber2;
long randNumber3;
int volume = 5;
int pixelCounter = 0;
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#include "blynk/blynk.h"
char auth[] = "25a1705b64304b4e89400c2c3d9a9b1f";
#include "Adafruit_LiquidCrystal/Adafruit_LiquidCrystal.h"
#include "Adafruit_BMP085/Adafruit_BMP085.h"
#include "Adafruit_Sensor.h"
#include "Adafruit_BNO055.h"
const int redButton = 5;
const int greenButton = 4;
const int yellowButton = 6;
const int speedLB = 200;
const int speedLF = speedLB - 10;
const int speedRB = speedLB - 10;
const int speedRF = speedLB;
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
#define GNOTRH 0
#define YNORTH 1
#define GEAST 2
#define YEAST 3
#define NOCARS 0
#define CARSNORTH 1
#define CARSEAST 2
#define CARSBOTH 3
long randNumber;
#define INTPIN 0 // Pin 2 on Arduino
#define LEDPIN 8
volatile bool pinState = false;
long unsigned initialTime;
volatile long unsigned reactionTime;
volatile long unsigned finalTime = 0;
void setup() {
Serial.begin(9600);