Smart Prototyping
Published

How to Use Touch Sensor Wheel With MP3 Player

Control an MP3 player with a Qwiic Capacitive Touch Sensor that consists of a touch wheel and touch keypad in Arduino.

BeginnerFull instructions provided12 minutes138
How to Use Touch Sensor Wheel With MP3 Player

Things used in this project

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Zio Qwiic Capacitive Touch Sensor

schematics_Sher65UU1R.jpg

Code

Code snippet #3

Plain text
digitalWrite(13,HIGH);    
touchWheel.update(); //sliding on the wheel    uint8_t P=touchWheel.getSliderPosition(); //for getting the position of the finger on the wheel        Serial.println("TOUCHING...");    
Serial.println("P");    
Serial.println(P);    
delay(100);    
touchWheel.update();    
uint8_t P2=touchWheel.getSliderPosition();    
Serial.println("TOUCHING...");    
Serial.println("P2");    
Serial.println(P2);    

if (P2>P){ //if we slide our finger to the clock side, volume up      
volume++;      
mp3ChangeVolume(volume);      
displaymag();    
}      
else if (P2<P){//if we side in the other side, volume down      volume--;      mp3ChangeVolume(volume);      displaymag();    }    delay(100);  }  digitalWrite(13,LOW);

Github

https://github.com/adafruit/Adafruit_SSD1306

Github

https://github.com/adafruit/Adafruit-GFX-Library

Credits

Smart Prototyping

Smart Prototyping

12 projects • 4 followers
We're a group of fun-loving, electronic DIY'ers with Smart-Prototyping.com. We hope to share useful tutorials as well as the cool things!

Comments