Skip to content

Joining IRremote with PCF8574  #825

@Samone1

Description

@Samone1

If you have handling problems or questions, consider to open a discussion https://github.com/Arduino-IRremote/Arduino-IRremote/discussions instead of an issue.

Board

  • [x ] Arduino ATmega328* board (UNO, Nano)

IDE

  • [x ] Arduino IDE 1.8.13

Protocol

  • [x ] NEC

Version version=3.0.3

Pin(s) used for IR-receive, if not default - tryied 2,3, and all 4-13, A1-A3

Use code blocks; it helps us help you when we can read your code!
Please also refrain from pasting more than 50 lines of code in a post, instead create a gist if you need to share large snippets
Code Block:

joined code :

<script src="https://gist.github.com/Samone1/bd309dc12678b2b8768dc8e6a1e91592.js"></script>

Current behavior

PCF :
repository=https://github.com/xreef/PCF8574_library - example readAll_Interrupt_lowMemory

IR remote :
TinyIRReceiver.h
MinimalReceiver.ino

Compiller output :
WInterrupts.c.o (symbol from plugin): In function attachInterrupt': (.text+0x0): multiple definition of __vector_2'
sketch\MinimalReceiver-PCF-pokus_z_cisteho.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1

First I would like to thank you for making this library. I appreciate your time spent on working on this library. It is really helpful.

A) I tryied to apply your library + MinimalReceiver as well as dealing with PCF8574_library for communication - also with interrupt using sketch "readAll_Interrupt_lowMemory" from examples.

Both examples are working perferctly if alone. When I join them together, it is not compilable. There is a problem with a __Vector_2 (or __vector_1) - depends on combination of interupt pins declared
PCF interupt pin : 3 2 2 3
IR interrupt pin : 2 2 3 3
problem : _vector :: 1 1 2 2
(yes, I know they should be different, but I did not know what else I should test #47

Reading your info that in MinimalReceiver is not used any interrupt (readme.md - FAQ + Minimal receiver) I wonder why is there this problem.

B) Going thorough your library more deeply, I finwd an info, that on ATMega328 is possible to use also other pins up to D13 and all A1-A5. Defining them as interrupt pins (it is compillable) it does not work .

I tested it so, because definig pin for interrupt higher then 3 solved above described problem, but IR does not work.

Sorry, I cannot to include the joined code PCF + IrRemote, because I do not know how. For testing purposes I purely copied one of above mentioned example into the another.

Expected behavior

Both functions (PCF interrupt + IR interrupt) working together in one code on Arduino Nano

Additional context

checklist:

  • I have read the README.md file thoroughly.
  • I have searched existing issues to see if there is anything I have missed.
  • I have browsed the examples for one, that matches my use case.
  • Any code referenced is provided and if over 30 lines a gist is linked INSTEAD of it being pasted in here -
  • The title of the issue is helpful and relevant.
  • I checked, if at least one of the examples was working.

** We will start to close issues that do not follow these guidelines as it doesn't help the contributors who spend time trying to solve issues if the community ignores guidelines!**

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions