Search found 1882 matches

by mnfisher
Mon Jul 13, 2026 11:20 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Okay,
The pic12 acts as a transmitter with one or multiple recipients. The rc5 protocol would work okay - the Manchester encoder should work okay - with some tweaks to the timing.
I'll find a transmitter and play tomorrow. See
https://flowcode.co.uk/forums/viewtopic.php?t=2944
The rc5 uses a very ...
by mnfisher
Mon Jul 13, 2026 8:11 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

That's maybe two problems then - can you try the transmitter that came with the receiver boards?

I'm using the same board ky-022 from a pack of sensors.

If you are using the rc5 component to transmit - the data out might be wrong?

Martin
by mnfisher
Mon Jul 13, 2026 8:53 am
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

I managed to find a lot of stuff for the NEC format - less for the RC5 :-(

However - having just done a Manchester format decoder for the wireless comms - I think I can pull the bits together fairly easily.

Couple of things...

Did you manage to get RC5_Receive to work?
Which MCU are you aiming ...
by mnfisher
Sun Jul 12, 2026 3:05 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Hi Enrique,

Jan and I managed to get it to work very reliably on AVR and PIC (which didn't support an either edge interrupt). It's not quite the same as a component (no simulation) - but it might do the trick for you?

I'll try and find the latest version / topic....

Martin
by mnfisher
Sun Jul 12, 2026 11:53 am
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Using the Rc5_Receive from the above link - the sensor does receive data correctly (not whilst using the component!)

Somewhere there is a better version that uses a pin change interrupt not the busy_wait as in this code.

There was a lot of discussion with Jan about this...
by mnfisher
Sun Jul 12, 2026 11:45 am
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Something odd - if I do Rx available - the component toggles the Rx pin at 300us intervals.

If I set Tx available - then the pin behaves as expected (held high) and I can see the signal received (on a logic analyser) if I press a button on the control....
by mnfisher
Sun Jul 12, 2026 11:33 am
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

I found one of the sensors in the toybox and a small (hopefully RC5) transmitter.

First attempt - failed (error in Timer function).

Compiled the example which seems very similar (except it has a TimerCallback - that does nothing) - and it doesn't work (nothing output :-( )

Added a TimerCallback ...
by mnfisher
Sat Jul 11, 2026 9:53 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

The 'duplicated' by the compiler warning means that there are multiple instances of the code (the function Initialise_states) generated - which will give larger code. It 'shouldn't' (famous last words) cause an issue - but looks to be an issue with the component. The source isn't currently available ...
by mnfisher
Sat Jul 11, 2026 8:32 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

In STATE:

You have
FLASH = 0
LOOP count 7 TIMES using FLASH
...
FLASH = FLASH + 1

If you count using a variable - you don't need to set it to 0 (it does (for(flash = 0; flash < 7; flash++) { ... )

The increment means that the flash won't occur 7 times - so would be best removed (and the loop ...
by mnfisher
Sat Jul 11, 2026 8:15 pm
Forum: General
Topic: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic
Replies: 31
Views: 529

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

The messages are warnings (not errors) - but are indication of something wrong in the code.

The problem seems to be in DIGIT_RC5 where you have (for one instance) 'if command < 9999' - however command is a byte (0..255) - so the comparison may give incorrect results (similarly with if command < 999 ...