Skip to content

Leo-Nicolle/ClickWheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClickWheel

Arduino clickwheel controller with MPR121.

I am using Adafruit MPR121, did not test with other MPR121 breakouts.

How to design the PCB?

There are good articles here and there about how to do it.

Who did the job ?

How to use ?

#include <Arduino.h>
#include "clickwheel.h"

ClickWheel clickWheel = ClickWheel();

void setup() {
 Serial.begin(9600);

 while (!Serial) { // needed to keep leonardo/micro from starting too fast!
   delay(10);
 }
 
 Serial.println("Clickwheel test "); 
 
 // Default address is 0x5A, if tied to 3.3V its 0x5B
 // If tied to SDA its 0x5C and if SCL then 0x5D
 if (!clickWheel.begin(0x5A)) {
   Serial.println("MPR121 not found, check wiring?");
   while (1);
 }
 Serial.println("MPR121 found!");
 clickWheel.initTouchWheel(4, -20 ,1);
 delay(100);
 clickWheel.takeWheelBaseline();

}

void loop() {
 int16_t deltaWheel = clickWheel.getWheelIncrement();  
 Serial.print("deltaWheel ");
 Serial.println(deltaWheel);
 delay(100);
}

About

MPR121 Click wheel project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages