Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int red[3] = {255, 0, 0};
- int green[3] = {0,255,0};
- int count = 1;
- void setup() {
- // put your setup code here, to run once:
- setColor(red);
- getColor(count);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
- void setColor(int colorToSet[])
- {
- int r = colorToSet[0];
- int g = colorToSet[1];
- int b = colorToSet[2];
- // analogWrite(redPin, r);
- //analogWrite(greenPin, g);
- //analogWrite(bluePin, b);
- }
- int getColor(int colorNumber){
- if (colorNumber == 1) {
- return (0, 255, 255); //red
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement