Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1.  
  2.  
  3. int red[3] = {255, 0, 0};
  4. int green[3] = {0,255,0};
  5.  
  6. int count = 1;
  7.  
  8. void setup() {
  9.   // put your setup code here, to run once:
  10.   setColor(red);
  11.  
  12.   getColor(count);
  13. }
  14.  
  15. void loop() {
  16.   // put your main code here, to run repeatedly:
  17.  
  18. }
  19.  
  20. void setColor(int colorToSet[])
  21. {
  22.   int r = colorToSet[0];
  23.   int g = colorToSet[1];
  24.   int b = colorToSet[2];
  25.  
  26. // analogWrite(redPin, r);
  27.  //analogWrite(greenPin, g);
  28.  //analogWrite(bluePin, b);  
  29.  
  30. }
  31.  
  32. int getColor(int colorNumber){
  33.    if (colorNumber == 1)  {
  34.       return (0, 255, 255);      //red
  35.      }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement