background preloader

Arduino

Facebook Twitter

Arduino. The World Famous Index of Arduino & Freeduino Knowledge. A Multi-Protocol Infrared Remote Library for the Arduino. Do you want to control your Arduino with an IR remote?

A Multi-Protocol Infrared Remote Library for the Arduino

Do you want to use your Arduino to control your stereo or other devices? This IR remote library lets you both send and receive IR remote codes in multiple protocols. It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols. If you want additional protocols, they are straightforward to add. The library can even be used to record codes from your remote and re-transmit them, as a minimal universal remote. To use the library, download from github and follow the installation instructions in the readme. How to send This infrared remote library consists of two parts: IRsend transmits IR remote packets, while IRrecv receives and decodes an IR message. #include <IRremote.h> IRsend irsend; void setup() { Serial.begin(9600); } void loop() { if (Serial.read() !

This sketch sends a Sony TV power on/off code whenever a character is sent to the serial port, allowing the Arduino to turn the TV on or off. How to receive Hardware setup. Arduino Interrupts. Often when working on microcontroller projects you need a background function to run at regular intervals.

Arduino Interrupts

This is often done by setting up a hardware timer to generate an interrupt. The interrupt triggers an Interrupt Service Routine (ISR) to handle the periodic interrupt. In this article I describe setting up the 8-Bit Timer2 to generate interrupts on an Arduino ATMega168. I walk through steps required for setup and inside the ISR function. If you are following the Arduino sound articles this one will be important to read as well. The Arduino default processor is an ATMega168 (datasheet link). Interrupts? Interrupts Links When a new character arrives the UART system generates an interrupt. If you have lots of interrupts firing or fast timer interrupts your main code will execute slower because the microcontroller is spreading it’s processing time between your main code and all the ISR functions.

With an interrupt you don’t have to keep checking to see if a character has arrived. Cheap Arduino Wireless Communications. I was looking for a way to handle wireless communications between two Arduino boards.

Cheap Arduino Wireless Communications

Other options like Xbee or Bluetooth were going to cost $50 to over $100. Then I found a cheap RF transmitter and receiver at Sparkfun. The total cost is only $9! Here are a few limitations to RF solution: Communications is only one way. The advantages are that it is cheap and it is pretty easy to use. Below are some images showing how I hooked up the receiver and transmitter to two different Arduino boards. Arduino Tutorials.

Start [processinghacks.com] Top 40 Arduino Projects of the Web.