Skip to content

Instantly share code, notes, and snippets.

View mohitbhoite's full-sized avatar

Mohit Bhoite mohitbhoite

View GitHub Profile
@mohitbhoite
mohitbhoite / lightbar-controller.cpp
Created November 10, 2018 00:00
Code for controlling Neopixel strip with RGBW potentiometers using Adafruit Trinket M0
#include <Adafruit_NeoPixel.h>
int red,green,blue,white = 0;
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIN 4
#define NUMPIXELS 8
//Initialize the neopixel strip
Adafruit_NeoPixel strip(NUMPIXELS, PIN, NEO_RGBW + NEO_KHZ800);
@mohitbhoite
mohitbhoite / sand-demo.cpp
Created January 25, 2018 20:48
Modified version of Adafruit's led sand animation
#include <SPI.h>
#include <ADXL362.h>
#include <Wire.h> // For I2C communication
#include <Adafruit_IS31FL3731.h>
//#include <Adafruit_LIS3DH.h> // For accelerometer
#define DISP_ADDR 0x74 // Charlieplex FeatherWing I2C address
//#define ACCEL_ADDR 0x18 // Accelerometer I2C address
#define N_GRAINS 20 // Number of grains of sand
#define WIDTH 15 // Display width in pixels
@mohitbhoite
mohitbhoite / Pomodoro.cpp
Last active July 5, 2016 13:08
Super simple Pomodoro Timer via the Particle Internet Button!
// This #include statement was automatically added by the Particle IDE.
#include "InternetButton/InternetButton.h"
InternetButton b = InternetButton();
uint32_t workTime = 0;
uint32_t restTime = 0;
// Time definitions in milliseconds

Keybase proof

I hereby claim:

  • I am mohitbhoite on github.
  • I am mohitbhoite (https://keybase.io/mohitbhoite) on keybase.
  • I have a public key whose fingerprint is 3510 AF2A ADEE 1CAB EC43 F9CF B99C C13F 4C02 A39D

To claim this, I am signing this object: