Receiver interface for the fischertechnik IR control set
FtControlSetReceiver Class Reference
Receiver interface for the fischertechnik IR control set. More...
#include <FtControlSetReceiver.h>
Public Member Functions | |
FtControlSetReceiver (PinName in) | |
Create a receiver in: The pin the IR detector's message line is connected to. | |
FtControlSetMessage | getMessage () const |
get the last received message | |
uint32_t | getErrorCount () const |
get number of receive errors | |
void | setCallback (const FunctionPointer &callback) |
hook a call back into the receiver ISR e.g. |
Detailed Description
Receiver interface for the fischertechnik IR control set.
An mbed port of the code found on this ft community WIKI page The ft IR remote control uses some kind of RC-MM Protocol . When any of the controls is applied the remote control sends updates at a rate of at 1/120ms or 1/90ms depending on the senders frequency setting. Each message delivers the complete remote control status encoded into 30 bits. The structure of the message can be seen in FtControlSetMessage.h. The protocol uses Pulse Distance Modulation (PDM) with two bits (di-bit) per pulse, hence four different distances. A transmission consists of 16 pulses (15 distances) for a total of 30 bits.
I assume that the ft control set works fine with standard 38kHz IR detectors. I have used a CHQ0038 from a broken DVD Player. It can be onnected directly to the mebed: GND, VCC->3.3V and the signal line to any of the numbered mbed gpios.
The PDM timing of the ft IR control set isn't that exact. Thus receive errors occur quite frequently. I am observing an error rate somewhere between 3% and 5%. This driver "ignores" up to 3 consecutive receive errors, i.e. it just indicates an error but still provides the last correctly received message, before it resets the message to zero after the fourth error.
Some fluorescent energy saving lamp might disturb the transmision quite heavily.
Definition at line 31 of file FtControlSetReceiver.h.
Constructor & Destructor Documentation
FtControlSetReceiver | ( | PinName | in ) |
Create a receiver in: The pin the IR detector's message line is connected to.
Definition at line 10 of file FtControlSetReceiver.cpp.
Member Function Documentation
uint32_t getErrorCount | ( | ) | const |
get number of receive errors
Definition at line 77 of file FtControlSetReceiver.h.
FtControlSetMessage getMessage | ( | ) | const |
get the last received message
Definition at line 72 of file FtControlSetReceiver.h.
void setCallback | ( | const FunctionPointer & | callback ) |
hook a call back into the receiver ISR e.g.
for sending a RTOS message. called on each update or receive error
Definition at line 83 of file FtControlSetReceiver.h.
Generated on Fri Jul 15 2022 03:15:46 by 1.7.2