the whole point of this was to be able to send 8 bits of color code to 2 rgb leds through 2 74hc595 registers. if i can get the default color for each led to be sent out then the next part of code is to have a user interface to let someone select which led and what color they want. so now trying to shiftout default colors to these 2 leds. when it compiled i got no shifting leds did not change. like i said i am a noob at this stuff.
#include <arduino.h>
const int ledred = (char)0x80;
const int ledgreen = 0x20;
const int ledcyan = 0x28;
const int ledyellow = (char)0x0A0;
const int ledwhite = (char)0x0A8;
const int ledblack = 0x00;
const int ledvoliet = 0x44;
const int ledblue = 0x08;
#define step1 1
#define step2 2
#define step3 3
#define step4 4
#define step5 5
#define step6 6
#define step7 7
#define step8 8
#define led1 1
#define led2 2
#define led3 3
#define led4 4
#define led5 5
#define led6 6
#define led7 7
#define led8 8
char display_step;
char i;
char c;
char str[80],sstep,lamp,color;
int done;
char colors [8][7]={
"Red " ,"Green" ,"Cyan " ,"Yellow" ,"White " ,"Black " ,"Voliet" ,"Blue "};
char database[56]={
8,ledred,ledgreen,ledcyan,ledyellow,ledblack,ledwhite,
7,ledvoliet,ledblue,ledwhite,ledyellow,ledcyan,ledred,
3,ledred,ledred,ledred,ledblue,ledblue,ledblue,
5,ledred,ledwhite,ledblue,ledred,ledwhite,ledblue,
9,ledgreen,ledblue,ledvoliet,ledyellow,ledcyan,ledblack,
4,ledblack,ledblue,ledblack,ledyellow,ledblack,ledcyan,
6,ledwhite,ledblue,ledgreen,ledvoliet,ledcyan,ledyellow,
10,ledgreen,ledyellow,ledblue,ledred,ledblack,ledblue};
char numberlamps=2;
char numbersteps=8;
const int data = 9;
const int clock = 10;
const int latch = 8;
int main()
{
pinMode(data, OUTPUT);
pinMode(clock, OUTPUT);
pinMode(latch, OUTPUT);
}
void loop(){
int index;
int i;
int updateLEDs;
int lampvalue;
display_step = 1 + display_step%numbersteps;
index = (display_step - 1)*(numberlamps + 1);
time = database[index];
for( i = index +1; i < numberlamps ; i++);
lampvalue = database[index];
digitalWrite(latch, LOW);
shiftOut(data, clock, MSBFIRST, lampvalue);
digitalWrite(latch, HIGH);
}