Skip to content

Instantly share code, notes, and snippets.

View kateosborn10's full-sized avatar

Kathryn Osborn kateosborn10

View GitHub Profile
/* Code Adapted from SparkFun https://learn.sparkfun.com/tutorials/haptic-motor-driver-hook-up-guide */
#include <Sparkfun_DRV2605L.h> //SparkFun Haptic Motor Driver Library
#include <Wire.h> //I2C library
SFE_HMD_DRV2605L HMD; //Create haptic motor driver object
int button_middle = 7;
int button_index = 5; // choose the input pin for pushbutton
int button_ring = 9;
int button_pinky = 3;
/* Code adapted from https://learn.sparkfun.com/tutorials/haptic-motor-driver-hook-up-guide?_ga=2.227031901.1514248658.1513372975-1149214600.1512613196 */
#include <Sparkfun_DRV2605L.h> //SparkFun Haptic Motor Driver Library
#include <Wire.h> //I2C library
SFE_HMD_DRV2605L HMD; //Create haptic motor driver object
int button = 7; // choose the input pin 7 for pushbutton
int button_val = 0; // variable for reading the pin status
void setup()
{
//
// tsh - A tiny shell program with job control
//
// Kathryn Osborn
// kosborn
//
using namespace std;
#include <stdio.h>