H
H
hehoboy2019-11-25 17:02:31
Programming
hehoboy, 2019-11-25 17:02:31

How to program a microcontroller?

There is a light source and a button located next to it. I need a mechanism that will press the button every time the light source lights up (I need a sensor for the brightness of the light).
Never worked with microcontrollers. Have I chosen the right tool?
As I understand it, I need to choose a simple microcontroller (which one?), program it and connect it to a mechanism (how?) that will perform a mechanical action (pressing a button).
I understand that the question is very general, so I will be grateful if you tell me what I need to study / where to dig and which tool is suitable for my work.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
ittakir, 2019-11-25
@hehoboy

You need to take an Arduino, a photoresistor, a relay.
The Arduino will measure the resistance of the photoresistor using the ADC (voltage drop across it) and turn on the relay.

A
Alexander Rakhmaev, 2019-11-25
@rahmaevao

It's easier to do it loose. even Arduino modules with a comparator from a photoresistor are available for anyone.

A
Alexander, 2019-11-25
@UPSA

The answer is already there, but I'll write ....
The same question should be sent to the electronics section.
You don't need a microcontroller at all. If roughly - You need a Photodiode (phototransistor) and a transistor (like a button). There is light - the current flows and opens another transistor, which you control like a button.
Now I'm lying, it will cost - 100-200 rubles.

A
Alexander Skusnov, 2019-11-25
@AlexSku

There are light sensors already with a relay.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question