chipKIT® Development Platform

Inspired by Arduino™

Library for infrared receiver and transmitter

Created Tue, 12 Jul 2011 11:13:44 +0000 by rebeN


rebeN

Tue, 12 Jul 2011 11:13:44 +0000

Hello! I've tried using the Arduino library to transmit and receive infrared and gives me this error. If I choose in an arduino board, for example if I uno32 chipkit compiles but gives me this error:

NECIRrcv.cpp: In member function 'void NECIRrcv::begin()': NECIRrcv.cpp:15:3: error: 'TCCR2A' was not declared in this scope NECIRrcv.cpp:20:3: error: 'TCCR2B' was not declared in this scope NECIRrcv.cpp:20:3: error: '_SFR_BYTE' was not declared in this scope NECIRrcv.cpp:20:3: error: 'CS22' was not declared in this scope NECIRrcv.cpp:20:3: error: '_BV' was not declared in this scope NECIRrcv.cpp:21:3: error: 'CS21' was not declared in this scope NECIRrcv.cpp:22:3: error: 'CS20' was not declared in this scope NECIRrcv.cpp:25:3: error: 'TIMSK2' was not declared in this scope NECIRrcv.cpp:25:3: error: 'TOIE2' was not declared in this scope NECIRrcv.cpp:27:3: error: 'TCNT2' was not declared in this scope NECIRrcv.cpp:29:7: error: 'sei' was not declared in this scope

Is there any way to do some library or created? thanks


svofski

Tue, 12 Jul 2011 14:12:30 +0000

Esta librería usa registros de AVR del nivel más bajo. No puedes utilizarla sin reescribirla de nuevo antes.

This library uses AVR registers on the low level. You can't use it without rewriting it first.


rebeN

Tue, 12 Jul 2011 16:25:29 +0000

How complicated is it? Any manual or something to try to do it myself or know of someone who is doing? thanks


davec

Tue, 12 Jul 2011 22:15:43 +0000

The NECIRrcv code is nicely documented so it shouldn't be too hard to port. You need to provide alternate timer code that works with the PIC32 timers, and replace the use of PORTB output to blink the pin 13 LED with a digitalWrite(). Look around for PIC32 interrupt-driven timer examples.