A
A
akgndkut2016-01-27 02:06:28
Arduino
akgndkut, 2016-01-27 02:06:28

Can this be done?

There is an Arduino Uno, such a remote control ru.aliexpress.com/item/IC-2262-2272-4-CH-315Mhz-Ke... and, for example, a written code in a sketch so that when you press the remote control, the specified information is transmitted to the computer, For example, opening a folder, and there is a movie, or turning off the computer? I’m a beginner, I’m just studying and I wanted to know the capabilities of this machine, I don’t have to write code and so on, but the principle of operation, how can I make it clear to the computer what Arduino itself wants from it when I press the remote control, I would like to know if anyone is hacking, thanks. Oh yes, is it also possible to output text or a sound signal through the Arduino board to its attached monitor using the remote control? Is it also possible to connect the board with sensors and send a signal or transmit information about the passage of the scanner to a computer or phone and turn off the computer?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
Curly Brace, 2016-01-27
@stasuss

winlirc.sourceforge.net
Well, if it's necessary with the Arduino, then you will first need to study the structure of the signals from the remote control. there nifiga is not like a flashlight) there are certain timings for signals, use a digital code.
then hang an infrared sensor on the arduino (as on a site like volume) and read from it (you can hang it on an interrupt so that the cycle does not turn). when receiving a signal (correctly accept it for a start, having analyzed the timings), send a command to the computer (to a specially written program that is connected via com to the arduino via usb).
and the program will do what it needs to.
It is not so difficult to connect a display to an arduino (if it is a standard one), because it comes with a library for working with it. you can also squeak, there is again a utility, stupidly set the desired frequency, and connect the squeaker.
I didn't know about the scanner. sensors cling to your heart's content) at least a geiger)))
it's easier to turn off the computer through the program than through acpi physically. for the phone it's easier to steer via bluetooth

Y
Yuri, 2016-01-27
@riky

for arduino there is a library for working with remotes
https://github.com/z3t0/Arduino-IRremote
it already contains remotes from many manufacturers, if I'm not mistaken, you can add your own.
somehow dabbled with remotes, it turns out not difficult.
that's all she does

M
Maikesteps, 2016-01-30
@Maikesteps

That receiver that you threw off (stupid as a stick) is pretty simple. Just 1 or 0 on the feet when signaled from the remote (it's more difficult for me, I use a 12-button remote and a $0.60 receiver). As I understand it, you need that, upon arrival of 1 to the input of the arduini, the arduina would see a command in the com port, and you need a program on the PC so that when the command arrives on someone port, something is done there. In the case of output, command in which port everything is simple (I’ll sketch out a sketch on my remote control, for the sake of self-study). But I don’t know from with the program on the PC - I haven’t programmed anything except arduini in my life =)
UPD:
Code:

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
  pinMode(2, OUTPUT);           //порт 2 питание приемника
  pinMode(5, OUTPUT);           //порт 2 питание приемника
  digitalWrite(2, 1);           //порт 2 питание приемника
  digitalWrite(5, 0);           //порт 2 питание приемника
  Serial.begin(9600);
  mySwitch.enableReceive(1);    // data приемника
}

void loop() {
  if (mySwitch.getReceivedValue() == 5592323) {
    Serial.println("play");
  }
  else if (mySwitch.getReceivedValue() == 5592332) {
    Serial.println("stop");
  }
  else if (mySwitch.getReceivedValue() == 5592335) {
    Serial.println("deystvie 1");
  }
  else if (mySwitch.getReceivedValue() == 5592368) {
    Serial.println("deystvie 2");
  }
  else if (mySwitch.getReceivedValue() == 5592371) {
    Serial.println("key5");
  }
  delay(1000);
}

Video:
https://goo.gl/photos/LMtzmBm6AnPceyGeA
It remains to make a program on a PC ..............

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question