Observation regarding carrier frequency #63
Replies: 6 comments 1 reply
|
For all practical purposes, there is no difference between 38000 and 38400, as I wrote in the other thread. Does the sketch below work? |
|
Your sketch works at 38000kHz. |
|
Please try the current state, just checked in a fix.
I assume you mean that you just checked with 38000, not that something is not working with 38400. |
|
OK, all three of the sketches above now work at 38000Hz. 👍 |
|
Ok, sounds good. I will tag the current state and release it as a new version. Thank you very much for discovering the problems.
Well, your code, not my code ;-). But I think that array sizes should be |
|
|
Uh oh!
There was an error while loading. Please reload this page.
For an NEC1 controller I am using an Arduino pro mini 3.3V @ 8MHz.
I changed the static const frequency_t frequency = 38000U; in src/Nec1Renderer.h:
`
#include <IrSenderPwm.h>
#include <Nec1Renderer.h>
IrSender* irsend = IrSenderPwm::getInstance(true);
static void sendNec1(unsigned D, unsigned S, unsigned F, unsigned times) {
const IrSignal* irSignal = Nec1Renderer::newIrSignal(D, S, F);
irsend->sendIrSignal(*irSignal, times);
delete irSignal;
}
void setup() {
}
void loop()
{
delay(1000);
sendNec1(135U, 124U, 154U, 1);
}
`
I test the robustness of my code by running over and over for extended periods.

After a short period the programme starts sending random code and can onle be recovered by RST.
If I reset the carrier to 38400 the prog runs ok with an occasional glitch but then starts re-sending the correct code.
I can avoid this by using a watchdog but there must be an error.
All reactions