#include <IRremote.h>
const int buttonPin = 12;
const int led = 13;
IRsend ir;
char dato;
unsigned int pwrTv[68] = {4550,4300,600,1550,600,1550,600,1550,600,450,600,450,650,450,600,500,550,500,600,1550,600,1600,600,1550,600,500,600,450,550,500,600,450,600,500,600,450,600,1550,600,500,600,450,600,500,600,450,600,500,600,450,600,1550,650,450,600,1550,600,1550,600,1550,600,1550,600,1550,600,1550,600};
unsigned int Signal_0_0[] = {4550,4400,600,1650,550,1650,600,1650,550,550,600,500,600,550,550,550,600,500,600,1650,600,1600,600,1650,550,550,600,500,600,550,600,500,600,500,650,450,650,1600,600,500,650,450,650,500,600,500,600,500,600,550,600,1600,600,500,650,1600,650,1550,650,1600,650,1550,650,1600,650,1600,600};
unsigned int rawData[67] = {4500,4500, 500,1700, 550,1700, 500,1700, 550,600, 500,600, 500,550, 600,550, 550,600, 500,1650, 550,1750, 500,1700, 500,600, 550,600, 500,600, 500,600, 550,550, 550,600, 500,1700, 550,600, 500,600, 500,550, 550,600, 550,600, 500,550, 550,1700, 550,600, 500,1650, 550,1750, 500,1650, 550,1750, 500,1700, 500,1750, 500};
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
pinMode(buttonPin, INPUT);
pinMode(buttonPin, OUTPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
}
if (buttonState == HIGH);
{
ir.sendRaw(rawData,67,38);
}
else {
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
}
can you guys help me
i'm using an arduino uno
here is the error:
/tmp/425907993/on_off_tv_remote_benede/on_off_tv_remote_benede.ino:27:1: error: expected unqualified-id before 'if'
if (buttonState == HIGH);
^
/tmp/425907993/on_off_tv_remote_benede/on_off_tv_remote_benede.ino:28:3: error: expected unqualified-id before '{' token
{
^
/tmp/425907993/on_off_tv_remote_benede/on_off_tv_remote_benede.ino:32:1: error: expected unqualified-id before 'else'
else {
^
exit status 1