initial upload
This commit is contained in:
parent
c2f9c584b9
commit
fce1b561da
17 changed files with 737 additions and 0 deletions
|
@ -0,0 +1,44 @@
|
|||
// Author:Frankie.Chu
|
||||
// Date:March 9,2012
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
/***************************************************************************/
|
||||
#include "RGBdriver.h"
|
||||
#define CLK 2//pins definitions for the driver
|
||||
#define DIO 3
|
||||
RGBdriver Driver(CLK,DIO);
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
unsigned int i;
|
||||
while(1){
|
||||
for(i = 0;i < 256;i ++)
|
||||
{
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0,0,i); //Blue. First node data. SetColor(R,G,B)
|
||||
Driver.end();
|
||||
delay(10);
|
||||
}
|
||||
for(i = 255;i > 0;i --)
|
||||
{
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0,0,i); //Blue. first node data
|
||||
Driver.end();
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Author:Frankie.Chu
|
||||
// Date:March 9,2012
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
/***************************************************************************/
|
||||
#include "RGBdriver.h"
|
||||
#define CLK 2//pins definitions for the driver
|
||||
#define DIO 3
|
||||
RGBdriver Driver(CLK,DIO);
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(255, 0, 0); //Red. first node data
|
||||
Driver.SetColor(0, 0, 255); //Blue. second node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0, 0, 255); //Blue. first node data
|
||||
Driver.SetColor(0, 255, 0); //Green. second node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0, 255, 0); //Green. first node data
|
||||
Driver.SetColor(255, 0, 0); //Red. second node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// Author:Frankie.Chu
|
||||
// Date:March 9,2012
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
/***************************************************************************/
|
||||
#include "RGBdriver.h"
|
||||
#define CLK 2//pins definitions for the driver
|
||||
#define DIO 3
|
||||
RGBdriver Driver(CLK,DIO);
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(255, 0, 0); //Red. first node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0, 255, 0); //Green. first node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
Driver.begin(); // begin
|
||||
Driver.SetColor(0, 0, 255);//Blue. first node data
|
||||
Driver.end();
|
||||
delay(500);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue