Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Dick'O'Scope

By: a guest on Apr 5th, 2014  |  syntax: C  |  size: 2.17 KB  |  views: 140  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. unsigned char dickX[256] =
  2. {
  3. 9, 10, 11, 12, 14, 14, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 62, 62, 61, 60, 59, 58, 57, 56, 55, 53, 53, 51, 50, 49, 48, 46, 45, 44, 43, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 45, 45, 44, 43, 43, 42, 41, 40, 39, 38, 37, 35, 34, 33, 32, 32, 32, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 30, 29, 28, 27, 26, 24, 23, 22, 21, 21, 20, 19, 19, 18, 18, 18, 18, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 10, 8, 7, 6, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 6, 7
  4. };
  5.  
  6. unsigned char dickY[256] =
  7. {
  8. 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 6, 6, 5, 4, 4, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 39, 40, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 47, 48, 49, 50, 50, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 58, 59, 60, 60, 61, 62, 62, 63, 63, 63, 63, 63, 62, 61, 61, 60, 59, 59, 59, 60, 60, 61, 62, 63, 63, 63, 63, 63, 63, 62, 61, 61, 60, 59, 59, 58, 57, 57, 56, 55, 54, 54, 53, 52, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 15, 14, 14, 13, 12, 12, 11, 10, 9, 9, 8, 7, 6, 6, 5, 4, 4
  9. };
  10.  
  11. int main()
  12. {
  13.         DDRC |= 0x3f;
  14.         DDRB |= 0x3f;
  15.         unsigned char count = 0;
  16.         while(1)
  17.         {
  18.                 PORTC = dickX[count];
  19.                 PORTB = dickY[count];
  20.                 count++;
  21.                 delayMicroseconds(10);
  22.         }
  23. }
clone this paste RAW Paste Data