Comments (2)
I'm a bit embarrassed to admit that the hardware specific parts of the code are almost beyond my understanding. They are a slightly rearranged version of the code from Ken Shirriff's IRremote library. The code involves manipulating hardware registers to set up a specialized frequency adjustable PWM using hardware timers. You can look at IRLibProtocols/IRLibHardware.h at about line number 174 assuming you're using the default TIMER2 and see if you can figure out what you need to do. The value IR_SEND_PWM_START turns on the modulated signal and IR_SEND_PWM_STOP turns it all off but I'm not sure how you get the start version to conclude with the pin high unless you just stuck in your statement like digitalWrite(pin, HIGH). You might do better to use the bit-bang version of sending which starts at line 148. Just reverse the high and low statements in the digitalWrite commands. I'm assuming you're not using any kind of driver circuit because you said your board space was extremely tight. If you are using a transistor to drive the LED you could reverse the logic by substituting PNP instead of NPN.
from irlib2.
Thanks for the reply. I looked at that bit-bang code, and I have not
programmed that close to the metal in decades, and didn't want to attempt
it on an unfamiliar architecture (I, who used to write chained
channel-command words (CCWs) on IBM mainframes, and manipulate the bits in
the I/O controllers from the original 8088 PC through the 80386). I can
probably figure it out, given enough time, but time is in short supply as
we have an Oct 31 deadline. Because the IR path will be under three feet,
and possibly as little as 3 inches, power was not a primary concern,
hence, the decision to drive the IR emitter directly from the processor.
The tiny board size we have (two single-sided boards, 1" diameter and
including battery, 5/8" high), being able to reduce from four components
to one component matters, thus the desirability of the dual-emitter unit.
If only they made a common-cathode version!
Joe
I'm a bit embarrassed to admit that the hardware specific parts of the
code are almost beyond my understanding. They are a slightly rearranged
version of the code from Ken Shirriff's IRremote library. The code
involves manipulating hardware registers to set up a specialized frequency
adjustable PWM using hardware timers. You can look at
IRLibProtocols/IRLibHardware.h at about line number 174 assuming you're
using the default TIMER2 and see if you can figure out what you need to
do. The value IR_SEND_PWM_START turns on the modulated signal and
IR_SEND_PWM_STOP turns it all off but I'm not sure how you get the start
version to conclude with the pin high unless you just stuck in your
statement like digitalWrite(pin, HIGH). You might do better to use the
bit-bang version of sending which starts at line 148. Just reverse the
high and low statements in the digitalWrite commands. I'm assuming you're
not using any kind of driver circuit because you said your board space was
extremely tight. If you are using a transistor to drive the LED you could
reverse the logic by substituting PNP instead of NPN.You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#7 (comment)
from irlib2.
Related Issues (20)
- Broken link(s) - to www.sbprojects.com
- IR2test:19:11: error: 'class IRdecode' has no member named 'dumpResultso'; did you mean 'dumpResults'? MyDecoder.dumpResultso();
- Support for Canon Cameras
- Receiver or decode problem HOT 2
- Multiple receivers
- Cannot compile for MKR WAN 1300 HOT 1
- Support for Arduino Nano 33 IoT
- Compling Error for Arduino Uno Wifi Rev 2 board
- IRsendRaw
- Arduino UNO WIFI Rev2 compiling error
- Add support for sending control strings directly from PROGMEM.
- Arduino Nano Every compiling error
- Consolidate in one library or split to multiple repositories?
- RCMM protocol - how to do it HOT 2
- IRLib2 wont compile when i try to compile for the Nano Every HOT 4
- Example for multiple raw arrays HOT 1
- AC Remote IR read issue HOT 3
- Can I use the library for multiple receivers on one arduino HOT 1
- Attiny 1604 support? HOT 2
- The codes received from the IR receiver is not relaying ON & OFF signals to the AC according to the temp conditions given.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irlib2.