jurriaan / Arduino-PowerFunctions

Lego Power Functions Infrared Control for Arduino
MIT License
73 stars 20 forks source link

Change channel? #7

Open classic-audio opened 3 years ago

classic-audio commented 3 years ago

How can I change channel in the code? I would like to be able to use e.g. 2 Lego IR receivers 8884 in a car. Then I would like to be able to switch the channel in the Arduino code. What is the code to do that?

classic-audio commented 3 years ago

Suggestion

include

PowerFunctions pfCh1(12, 0); // IR on pin12, channel 1 PowerFunctions pfCh3(12, 2); // IR on pin12, channel 3 Will work - I think ( a suggestion from Arduino Forum - J-M-L)