Skip to content

Commit

Permalink
Added roomba example gist and comment about max pulse frequency of 16…
Browse files Browse the repository at this point in the history
…6khz.
  • Loading branch information
qwertzguy committed Mar 27, 2014
1 parent a0c61c1 commit 70aa5a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion IRremote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Modified by Mitra Ardron <[email protected]>
* Added Sanyo and Mitsubishi controllers
* Modified Sony to spot the repeat codes that some Sony's send
* Modified by Gaspard van Koningsveld to trim out IRrecv, simplify code, allow setting of IR LED pin, and make it compatible with the Spark Core v1.0 (STM32F103CB based)
* Modified by Gaspard van Koningsveld to trim out IRrecv, not using PWM anymore, allow setting of IR LED pin, and make it compatible with the Spark Core v1.0 (STM32F103CB based)
*
* Interrupt code based on NECIRrcv by Joe Knapp
* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
Expand Down Expand Up @@ -278,6 +278,7 @@ void IRsend::space(int time) {

void IRsend::enableIROut(int khz) {
// Enables IR output. The khz value controls the modulation frequency in kilohertz.
// MAX frequency is 166khz.
pinMode(irPin, OUTPUT);
digitalWrite(irPin, LOW);

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ Modifications
-------------

* Trimmed out IRrecv (removed the decoding of IR signals. Thus you can only send IR codes with this lib. If you make the IRrecv part of the code copatible, please send a pull-request :) )
* Removed the use of PWM. It now only uses digitalWrite() and delayMicroseconds() to make the IR pulses. Thus the maximum frequency of pulses is 166khz. (Most IR codes are 38khz so it's not a problem)
* Removed the use of PWM. It now only uses digitalWrite() and delayMicroseconds() to make the IR pulses. Thus the maximum frequency of pulses is 166khz. (Most IR codes are 38khz so it's not a problem). Kudos to eflynch: [https://github.com/eflynch/sparkcoreiremitter/blob/master/ir_emitter/ir_emitter.ino](https://github.com/eflynch/sparkcoreiremitter/blob/master/ir_emitter/ir_emitter.ino)
* Allows to set the pin of the IR led. (any A or D pin should work on the Spark Core)
* Allows to make multiple instance of the IRsend class with different pins to control multiple IR leds.

Usage examples
--------------

You can look at usages examples for sending on the original library: [https://github.com/shirriff/Arduino-IRremote/tree/master/examples](https://github.com/shirriff/Arduino-IRremote/tree/master/examples)
You can look at usages examples for sending on the original library for various TVs: [https://github.com/shirriff/Arduino-IRremote/tree/master/examples](https://github.com/shirriff/Arduino-IRremote/tree/master/examples)

I used it to control my Roomba using this gist: [https://gist.github.com/probonopd/5181021](https://gist.github.com/probonopd/5181021)

0 comments on commit 70aa5a1

Please sign in to comment.