Thursday, 13 June 2013

251 - Development

The Code to send was much simpler.

I tweaked it so that if the arduino serial read a specific key that I pressed (such as "a""), it would send the data collected from the previous code through a infrared sender diode.

Here is a simple example.

This was the code to turn the school's projector On and Off.

#include <IRremote.h>

IRsend irsend;

void setup()
{
  Serial.begin(9600);
}

void loop() {

  char readvalue = Serial.read();

    if (readvalue == 'a')

  irsend.sendNEC(0xF20A40BF, 32);

   
}

No comments:

Post a Comment