Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IR controlling for Microlab Solo 6C
- //
- //Created by adduxa
- //Thanks to http://ex.uz/2013/09/microlab-remote-control-s4/
- //
- //Connect IR led's "+" to pin 3 on Arduino (it can not be reassigned)
- #include <IRremote.h>
- IRsend irsend;
- int inByte;
- void setup()
- {
- Serial.begin(9600);
- }
- void loop() {
- if (Serial.available() > 0) {
- inByte = Serial.read() - 48;
- switch(inByte) {
- case 1: irsend.sendNEC(0x807F8877, 32); break; //v+
- case 2: irsend.sendNEC(0x807F08F7, 32); break; //v-
- case 3: irsend.sendNEC(0x807F906F, 32); break; //t+
- case 4: irsend.sendNEC(0x807FB04F, 32); break; //t-
- case 5: irsend.sendNEC(0x807F50AF, 32); break; //b+
- case 6: irsend.sendNEC(0x807F708F, 32); break; //b-
- case 7: irsend.sendNEC(0x807F10EF, 32); break; //reset
- case 8: irsend.sendNEC(0x807F20DF, 32); break; //input
- case 9: irsend.sendNEC(0x807F40BF, 32); break; //mute
- default: Serial.println("What?!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement