Skip to content

Instantly share code, notes, and snippets.

View AnandChowdhary's full-sized avatar
🚀
Shipping

Anand Chowdhary AnandChowdhary

🚀
Shipping
View GitHub Profile
#define analogInPin 0
const float Pi = 3.141592;
char sensorValue[480];
char outputValue[480];
int number,frameCurrent;
int pos0value, pos90value;
void setup() {
Serial.begin(38400);
for(int n=0;n<480;n++){
outputValue[n]=(char)127*sin((float)2*Pi*n/48)+127;
@AnandChowdhary
AnandChowdhary / tut4.ino
Created September 25, 2018 11:49
Tutorial 4
int potentiometerPin = A0;
int sensorPin1 = 3;
int sensorPin2 = 2;
long potentiometerValue = 0;
int sensor1Value = 0;
int sensor2Value = 0;
volatile long position;
void setup() {
// Set up internal pull up resistor for pin
@AnandChowdhary
AnandChowdhary / capacitivesensor.ino
Last active September 11, 2018 09:33
Capacitive Sensor
#include <CapacitiveSensor.h>
CapacitiveSensor c = CapacitiveSensor(13, 12);
float observedRightValue = 1750.0;
float observedLeftValue= 5000.0;
void setup() {
Serial.begin(9600);
}
@AnandChowdhary
AnandChowdhary / hideEmail.php
Created November 15, 2017 14:07
PHP function to obfuscate email
<?php
function hideEmail($email) {
$email = explode("@", $email);
$name = $email[0];
if (strlen($name) > 3) {
$name = substr($name, 0, 2);
for ($i = 0; $i < strlen($email[0]) - 3; $i++) {
$name .= "*";
}
@AnandChowdhary
AnandChowdhary / A-Pen-by-Anand-Chowdhary.markdown
Last active February 11, 2021 02:47
iOS' slide to unlock feature made using HTML5 range