Added: 2 years ago
From: mnicolato
Views: 5,233
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (11)

Sign In or Sign Up now to post a comment!
  • #define Lo 2 #define Bo 3 #define Ro 4 #define To 5 #define Ti 3 #define Ri 4 #define LED 13 int touchX = 0; int touchY = 0; void setup() { Serial.begin(9600); pinMode(LED, OUTPUT); } void loop() { if (touched()) { Serial.print("X="); Serial.print(touchX); Serial.print(" Y="); Serial.println(touchY); digitalWrite(LED, HIGH); delay(50); digitalWrite(LED, LOW); } }
  • boolean touched() { boolean touch = false; pinMode(Lo, OUTPUT); digitalWrite(Lo, LOW);

     pinMode(Ro, OUTPUT); digitalWrite(Ro, HIGH); pinMode(To, INPUT); pinMode(Bo, INPUT); delay(10); touchX = analogRead(Ti); pinMode(Bo, OUTPUT); digitalWrite(Bo, LOW); pinMode(To, OUTPUT); digitalWrite(To, HIGH); pinMode(Ro, INPUT); pinMode(Lo, INPUT); delay(10); touchY = analogRead(Ri); if(touchX < 1000 and touchY < 1000) touch = true; return touch;

    }

  • I muted this faster than one clock from that AVR.

  • please upload the code

  • Can you help me a identical code ?

  • will you post your code?i like how it doesn't post 0, 0...

  • Is the photoshield required to build something like this?

  • Now make a midi out for this thing, put in a box, go out and play music ;)

  • Song is Popcorn, it's been covered by thousands of people, just search for it.

  • yeah dude please, whats the song name?

  • Nice ! Where did you buy the touchpad ?

    And what is this crazy music ???

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more