Advertisement
Guest User

Untitled

a guest
Aug 26th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.72 KB | None | 0 0
  1. /*
  2.   TEXT SAMPLE CODE for LOL Shield for Arduino
  3.   Copyright 2009/2010 Benjamin Sonntag <benjamin@sonntag.fr> http://benjamin.sonntag.fr/
  4.  
  5.   History:
  6.     2009-12-31 - V1.0 FONT Drawing, at Berlin after 26C3 ;)
  7.  
  8.   This program is free software; you can redistribute it and/or modify
  9.   it under the terms of the GNU General Public License as published by
  10.   the Free Software Foundation; either version 2 of the License, or
  11.   (at your option) any later version.
  12.  
  13.   This program is distributed in the hope that it will be useful,
  14.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.   GNU General Public License for more details.
  17.  
  18.   You should have received a copy of the GNU General Public License
  19.   along with this program; if not, write to the Free Software
  20.   Foundation, Inc., 59 Temple Place - Suite 330,
  21.   Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #include "Charliplexing.h"
  25. #include "Font.h"
  26.  
  27. #if defined(ARDUINO) && ARDUINO >= 100
  28. #include "Arduino.h"
  29. #else
  30. #include "WProgram.h"
  31. #endif
  32.  
  33.  
  34.  
  35.  
  36.  
  37. /* -----------------------------------------------------------------  */
  38. /** MAIN program Setup
  39.  */
  40. void setup()                    // run once, when the sketch starts
  41. {
  42.   LedSign::Init();
  43. }
  44.  
  45.  
  46. /* -----------------------------------------------------------------  */
  47. /** MAIN program Loop
  48.  */
  49. void loop()                     // run over and over again
  50. {
  51.  
  52. char test[]="SYSCO BOOSTS SHAREHOLDER VALUE!";
  53.  
  54.     int8_t x=0,x2=0;
  55.   for(int8_t j=13;j>-100;j--) {
  56.     x=j;
  57.     LedSign::Clear();
  58.     for(int i=0;i<50;i++) {
  59.       x2=Font::Draw(test[i],x,0);
  60.       x+=x2;
  61.       if (x>=13) break;
  62.     }  
  63.     delay(80);
  64.   }
  65.   delay(3000);
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement