Beamer autostart
For a public display a beautiful LG HS200G LED beamer has been used which can play from USB data sources. However, no autoplay – autostart function was included. The beamer has been connected to a power source with timer switch. However, somebody still needs to push the on-off button, go trough the menu etc..
The projector is used for back-projection in a window, using standard LEE 216 filters ‘White Diffusion’ as projection foil.
A simple solution has been made using an Arduino Nano (any Arduino or Atmel AVR will do) and the Arduino IRremote library Using the example sketches and one TSOP17xx IR receiver chip, the codes used by the remote for powering on/off, starting USB, left, right, menu, ok etc.. were located. (In this case an NEC protocol). After that a simple Arduino sketch was made using IRsend commands and delay’s (for example a delay of 15 seconds between powering on and going to the USB menu). See wiki for full code and documentation.
[sourcecode language=”c”]
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;
// remote control definitions
#define on 0x20DFB54A
#define usb 0x20DF3EC1
#define ok 0x20DF22DD
#define down 0x20DF827D
#define left 0x20DF609F
// sequence to get the beamer playing:
typedef struct {
unsigned long time;
long code;
} remoteAction;
remoteAction beamerShow[17]={
{5,on},{20,usb},{23,ok},{24,ok},{25,down},
{26,ok},{27,down},{28,ok},{29,ok},{30,ok},
{31,down},{32,ok},{33,left},{34,left},{35,left},
{26,ok},{1000,on}};
int pointer=0;
void setup(){
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
pinMode(BUTTON_PIN, INPUT);
pinMode(STATUS_PIN, OUTPUT);
}
// and somewhere as play function:
void loop() {
unsigned long timer=millis()/1000;
if (timer>beamerShow[pointer].time {
digitalWrite(STATUS_PIN, HIGH);
irsend.sendNEC(beamerShow[pointer].code, 32); //on-off-left-right-usb
digitalWrite(STATUS_PIN, LOW);
pointer++;
}
}
// rest of IR remote example has been left out – see wiki for full code
[/sourcecode]
The timer switch turns on both the arduino power supply and beamer power supply. On startup the Arduino sends out the required codes to start a slide show from USB disk. After three hours, the arduino sends the power off command.. a little after that the timer switch switches off power completely.
Comments