hypersonic5000 Posted October 31, 2014 Share Posted October 31, 2014 I have an idea for a tv-b-gone type device but I know nothing on circuits so I could use some help. I want to make a infrared repeater (Code name: The Black Mime). What I want the device to do is have a infrared sensor and save the infrared code onto a attiny85. If the switch for the sensor is off and a button is pressed then I want the infrared transmitter to send the last saved code. If the sensor is turned on after another code is saved then the attiny will reset itself and have no data on it then save the code received. That's basically what I want for this project. If this one gets built and posted then I will keep thinking of projects. Thanks, hypersonic5000 Quote Link to comment Share on other sites More sharing options...
Oli Posted October 31, 2014 Share Posted October 31, 2014 You might need to know a few things about circuits before trying to make a non-trivial device. Get an Arduino Uno and the IR sensors / receivers that Adafruit sell and do some tutorials - things will probably become more clear then. Just use the ATMEGA328 on Uno for research and development and then move to the ATTINY when you have things working. Quote Link to comment Share on other sites More sharing options...
hypersonic5000 Posted November 12, 2014 Author Share Posted November 12, 2014 You might need to know a few things about circuits before trying to make a non-trivial device. Get an Arduino Uno and the IR sensors / receivers that Adafruit sell and do some tutorials - things will probably become more clear then. Just use the ATMEGA328 on Uno for research and development and then move to the ATTINY when you have things working. Ive been working on the code but ive reached the point where I dont know the command #include <IRremote.h> int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); irrecv.disableIRIn(); // Stop the receiver } } Rsend irsend; void setup() { Serial.begin(9600); } void loop() { if (Serial.read() != -1) { for (int i = 0; i < 3; i++) { irsend.send(0xa90, 12); // Sony TV power code delay(100); } } } could someone please help me fix this code... Thanks Quote Link to comment Share on other sites More sharing options...
cooper Posted November 12, 2014 Share Posted November 12, 2014 Maybe you should tell us whatever output you got that informs you that it isn't working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.