Simple Infrared Controlled Lamp

Hey everyone ive got all my hardware setup but im new to coding. I made code to get the lamp to blink and that was simple enough, but using different libraries and making code is proving to be quite difficult. I use a attiny 85 micro processor instead of an arduino and i think thats where most of my problems are coming from. The amount of information for this unit is a lot less than the arduino boards. If anyone thinks they can make a code that would work for what im trying to accomplish that would be great.

List of parts
microprocessor-1PCS Digispark Kickstarter ATTINY85 Arduino General Micro USB Development Board | eBay
ir sensor-

The rest is just a regular led diode and extension cord. Sorry if it seems like im asking someone to do my project for me. I just think that if i saw the code id be able to read down it and decipher the way it works. Also ive attached my wiring diagram. The right is what i used to test out the blinking program, the left is what i plan on doing for the ir remote program. Thank you everyone.

IR Relay Model (1).pdf (34.7 KB)


spycatcher2k: How much are you offering to pay to employ someone to do this work?

considering the fact that its probably gunna take like 2 minutes for someone who really knows their stuff. I was hoping someone would do it out of the kindness of their heart. I can repay them with gratitude.


spycatcher2k: This makes NO sense! Why you think a car mechanic charges $50/£50 an hour even for simple tasks, because they know the customer does not know how to do that work, or does not have the tools. I earn my wage from developing software & hardware solutions for clients. If someone wants help with a project, and they have posted code that 'kind of works' or 'does not work as intended' then they have tried, and I may help. If someone just posts links to products, with a (Very poor) list of what they want someone to write, or give examples, then I expect them to pay for the time and experience for who ever helps.

At a rate of 60$/Hr. Itll only take 2 minutes if you know what youre doing, so ill give you 2 dollars. I know the hardware and wiring. I just dont get coding. I cant use serial ports on my board for trouble shooting so it makes it really hard to do this with not a lot of experience.



I did describe what i want my project to do. Infrared controlled lamp. Turn lamp on via infrared remote.

I did post a pdf of my circuit.

No i did not post code because idk how to write it. If i had the code i wouldnt have had to make a post.

So you were incorrect twice.

If i had to try and make code i assume it would be something like

int Prelay = 0 int IRsensor = 2

Pinmode (Prelay, Output) Pinmode (IRsensor, Input)

If IRsensor = True ( digitalwrite(Prelay, High) ) Else ( digitalwrite(prelay, Low) )

Thats about as good as i can do with the knowledge i have. When the ir sensor is getting a signal, turn the light on.


How much more explanation do you need? LIGHT ON WITH INFRARED REMOTE. 5v- Is the ground if you knew anything. The 12v is coming from the wall outlet that is clearly labeled.

I dont think you would be able to help me even if you wanted to because it sounds like you have no clue what is going on.

@mrbdog498, do not cross-post. Other thread removed.

[quote author=Coding Badly link=msg=3373717 date=1502490220] @mrbdog498, do not cross-post. Other thread removed.




I agree. I am a half wit for trying to help an ungrateful oik. I promise that will never happen again.


Why do you believe cross-posting is a good idea?

love the drawing.

1 you do realize that -5v is not the same as 0v. So when you say +5 to -5 it looks like a 10v ac transformer that's center tapped.

2 if you hook a led between 5v and dc negative it will be real bright before the magic smoke.

3 there are lots of different arduino micro processors. We have to know which one as the pin numbers used in programming are board specific

4 arduino pins outputs are 5vdc+ ive never seen one that acts as a sink.

So im guessing you don't have an arduino that you have ever plugged in. Im also guessing that loading library's, compiling and uploading are all foreign terms.

So you are asking someone to write a program then hold your hand to show you how to load the program then trouble shoot your wiring for $2.

go to a online store a buy a infer red remote controlled plug as you have no interest in a arduino and what it can do. plug it in and press the remote button to your hearts content. Its magic in a box you don't need to know how it works.