You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The controller blinks the LED around the xbox button continually, which is actually quite annoying. We should make the light go solid when we claim() and blink again when we release()#9
int led_cmd[10] = {0,0,1,0,0,0,0,1,0,0}; //Activates/initialises the LEDs, leaving the center LED lit.
int anim_cmd[10] = {0,0,1,0,0,0,0,1,0,1}; //Makes the startup animation on the ring of light.
void sendData(int cmd_do[]) {
pinMode(data_pin, OUTPUT);
digitalWrite(data_pin, LOW); //start sending data.
int prev = 1;
for(int i = 0; i < 10; i++){
while (prev == digitalRead(clock_pin)){} //detects change in clock
prev = digitalRead(clock_pin);
// should be after downward edge of clock, so send bit of data now
digitalWrite(data_pin, cmd_do[i]);
while (prev == digitalRead(clock_pin)){} //detects upward edge of clock
prev = digitalRead(clock_pin);
}
digitalWrite(data_pin, HIGH);
pinMode(data_pin, INPUT);
}
The text was updated successfully, but these errors were encountered:
weisjohn
changed the title
stop the blinking once it has been claimed
stop LED blinking on claim()Mar 7, 2015
The controller blinks the LED around the xbox button continually, which is actually quite annoying. We should make the light go solid when we
claim()
and blink again when werelease()
#9I found a reference from an Arduino project: https://dilisilib.wordpress.com/hacking/xbox-360-rf-module-arduino/. An excerpt incase of rot:
The text was updated successfully, but these errors were encountered: