Skip to main content

Fabien Bataille

Fabien Bataille's Public Library

  • // array of function pointers const GeneralFunction doActionsArray [] PROGMEM =  {  doAction0,  doAction1,  doAction2,  };  void setup ()  {  Serial.begin (115200);  Serial.println ();   int action = 2; // 2 is an example   // get function address from program memory, call the function   ((GeneralFunction) pgm_read_word (&doActionsArray [action])) ();    } // end of setup

  • The IRrecv class performs the decoding, and is initialized with enableIRIn(). The decode() method is called to see if a code has been received; if so, it returns a nonzero value and puts the results into the decode_results structure. (For details of this structure, see the examples/IRrecvDump sketch.) Once a code has been decoded, the resume() method must be called to resume receiving codes. Note that decode() does not block; the sketch can perform other operations while waiting for a code because the codes are received by an interrupt routine.
  • The Linux Infrared Remote Control project (LIRC), however, has an open format for describing codes for many remotes. Note that even if you can't find codes for your exact device model, a particular manufacturer will usually use the same codes for multiple products.
1 - 20 of 1951 Next › Last »
20 items/page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo