1757WestwoodRobotics / 2017-Steamworks

2017 FRC Robot
https://whsrobotics.org
Other
2 stars 0 forks source link

Implement Arduino light controller #13

Open acabey opened 7 years ago

acabey commented 7 years ago

Interface with the onboard Arduino to control ring lights

LTSENG01 commented 7 years ago

Reference: here are the pins for controlling the ring lights through the arduino. We will have to uncomment portions of Chris's code (or let Chris do it).

Hue: Analog 0 (arduino) Saturation: Analog 1 (arduino) Value: Analog 2 (arduino)

#define H_ANALOG_PIN 0
#define S_ANALOG_PIN 1
#define V_ANALOG_PIN 2
acabey commented 7 years ago

Those aren't comments, they are compile-time constants.

LTSENG01 commented 7 years ago

Oh, i know, the code referenced above is part of the reference of where I got those values. We need to uncomment the place where it actually uses those constants. He was cycling the hue values as a demonstration on Sunday.

const int hue        = cycle_hue;        // NEED TO COMMENT OUT (line 56)
//const int hue        = analogRead(H_ANALOG_PIN);      // NEED TO UNCOMMENT HERE (line 57)
const int saturation = analogRead(S_ANALOG_PIN);
const int value      = analogRead(V_ANALOG_PIN);
acabey commented 7 years ago

Ookay I see

1757Robotics commented 7 years ago

Status; Working example program. Need to integrate into the project and create commands / subsystems.