Lego PowerFunctions

I am using this lib. GitHub - jurriaan/Arduino-PowerFunctions: Lego Power Functions Infrared Control for Arduino for a design of an IR transmitter for LEGO motors.

Lego have designed the system so 4 IR channels can be used.
I would like to be able to switch between the 2 channels controlled in the Arduino code.

I have been reading the Lego open source document (can be found at the above github link) and I have tried to se in the documentation and examples for juriaan's library but my knowledge is limited - I cant find a solution.

I hope for a little help here - thank you.

I would like to be able to switch between the 2 channels controlled in the Arduino code.

have you tried having two instances of PowerFunctions sharing the same IR Pin?

#include <PowerFunctions.h>
PowerFunctions pfCh1(12, 0); // IR on pin12, channel 1
PowerFunctions pfCh3(12, 2); // IR on pin12, channel 3

and sending commands to one or the other ?

J-M-L
Thank you very much - for a fast reply.
Great idea - I will try that.
I think that will solve the problem.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.