Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/birdra1n/infraredarduino
Receiving data by infrared with Arduino
https://github.com/birdra1n/infraredarduino
arduino infrared irremote
Last synced: 2 days ago
JSON representation
Receiving data by infrared with Arduino
- Host: GitHub
- URL: https://github.com/birdra1n/infraredarduino
- Owner: BirdRa1n
- License: mit
- Created: 2021-12-23T01:55:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-31T15:17:28.000Z (over 2 years ago)
- Last Synced: 2024-04-24T05:59:30.524Z (7 months ago)
- Topics: arduino, infrared, irremote
- Homepage:
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# INFRAVERMELHO ARDUINO
O projeto a seguir recebe códigos de controles utilizando infra vermelho.
![App Screenshot](https://thumbs2.imgbox.com/6a/8b/sucfZwsT_t.png)
## IR.INO
```c++
#include
int RECV_PIN = 9; // porta digital que será definida para receber os dados do Arduino.
IRrecv irrecv(RECV_PIN);
decode_results results;void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // habilitar o infra vermelho.
}
void loop()
{if (irrecv.decode(&results))
{
Serial.println(" ");
Serial.print("Código: ");
//Serial.println(results.value); mostra o código ao ser precionado um botão do controle
const int ALL_ON_CODE = results.value;
Serial.println(ALL_ON_CODE); // vai conter o código que será usado nas condições
Serial.println(" ");
}irrecv.resume(); // reseta o estado do ISR
}
```