Skip to content

Instantly share code, notes, and snippets.

@paul-em
paul-em / looping.ino
Created December 16, 2017 21:56
Looping Louie Advanced
#define POT_PIN 1
#define DC_MOTOR_PIN 3
#define BUTTON_PIN 2
#define LED_PIN 13
int speed = 0;
int minSpeed = 60;
int maxSpeed = 255;
int val = 0;
int prevButtonState = 0;
0x25d5187ff08a8351b831959bdaf72218c888cb5a
/**
*
* This will deep check two variables including objects
* Note: equals(NaN, NaN) uses js default behaviour: false
*
* equals(1, 1) --> true
* equals(1, 2) --> false
*
* equals({a: 1}, {a: 1}) --> true
@paul-em
paul-em / tiny-equals.js
Last active May 16, 2023 23:43
deep equals method for comparing variables including objects
/**
*
* This will deep check two variables including objects
* It works in IE9+
* Note: equals(NaN, NaN) uses js default behaviour: false
*
* equals(1, 1) --> true
* equals(1, 2) --> false
*
* equals({a: 1}, {a: 1}) --> true