Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CS207 Lab Test Template 4
- // Name:
- // Student Number:
- #include <EEPROM.h>
- #include <CapSense.h>
- const int data = 4;
- const int latch = 7;
- const int clock = 8;
- const int button1 = 10;
- const int button2 = 11;
- const int button3 = 12;
- const int slider1 = A2;
- const int slider2 = A1;
- const int slider3 = A0;
- const int buzzer = 3;
- const int LDR = A3;
- const int LED1 = 5;
- const int LED2 = 6;
- //Initialize CapSense object
- CapSense cs_9_2 = CapSense(9,2);
- void setup()
- {
- pinMode(data, OUTPUT);
- pinMode(latch, OUTPUT);
- pinMode(clock, OUTPUT);
- //Configures buttons for internal pull-up
- pinMode(button1, INPUT);
- pinMode(button2, INPUT);
- pinMode(button3, INPUT);
- digitalWrite(button1, HIGH);
- digitalWrite(button2, HIGH);
- digitalWrite(button3, HIGH);
- // Turn off capsense object autocalibration
- cs_9_2.set_CS_AutocaL_Millis(0xFFFFFFFF);
- }
- int numberGlyphs[] =
- {
- B11000000, //0
- B11111001, //1
- B10100100, //2
- B10110000, //3
- B10011001, //4
- B10010010, //5
- B10000010, //6
- B11111000, //7
- B10000000, //8
- B10011000, //9
- B11111111, //10 - CLEAR
- };
- int endSongNotes[36] = { 262, 0, 392, 0, 349, 0, 330, 0, 294, 0, 523, 0, 392, 0, 349, 0, 330, 0, 294, 0, 523, 0, 392, 0, 349, 0, 330, 0, 349, 0, 294, 0, 262, 0, 262, 0 };
- int endSongTimes[36] = { 1100, 100, 500, 100, 100, 100, 100, 100, 100, 100, 1100, 100, 500, 100, 100, 100, 100, 100, 100, 100, 1100, 100, 500, 100, 100, 100, 100, 100, 100, 100, 1500, 100, 100, 100, 100, 100 };
- void loop()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement