Achindra Bhatnagar
Published © MIT

Controlling RGB with Digispark

Remotely control an RGB LED Strip with a Digispark (ATTiny85).

IntermediateShowcase (no instructions)10 hours3,616
Controlling RGB with Digispark

Things used in this project

Story

Read more

Schematics

IRRemote Library

https://github.com/z3t0/Arduino-IRremote

Code

IRremoteInt.h

C/C++
Change pin for IR Transmitter
...
# define TIMER_PWM_PIN 14 // MightyCore
#else
# define TIMER_PWM_PIN 1 //3 // Arduino Duemilanove, Diecimila, LilyPad, etc
#endif // ATmega48, ATmega88, ATmega168, ATmega328

Analyze raw key codes

Plain text
irrecord can analyze raw key codes
$irrecord -a rgb.conf

begin remote

name DESK_LIGHT
 bits 32
 flags SPACE_ENC|CONST_LENGTH
 eps 30
 aeps 100

header 9134 4491
 one 591 1664
 zero 591 545
 ptrail 613
 gap 108325
 toggle_bit_mask 0x0

begin codes
 KEY_PLAY 0x00F7C03F
 KEY_PAUSE 0x00F740BF
 ...

Test Program

C/C++
Test program for sending IR signals
#include <IRremote.h> 

IRsend irsend; 

void setup() 
{
}

void loop() 
{
  irsend.sendNEC(0x00F7C03F, 32); //On
  delay(1000); 
  irsend.sendNEC(0x00F740BF, 32); //Off
  delay(1000); 
}

Github

https://github.com/z3t0/Arduino-IRremote

Credits

Achindra Bhatnagar

Achindra Bhatnagar

20 projects • 161 followers
Windows Kernel Hacker, IoT Hobbyist, Enthusiast, Developer and Dreamer

Comments