Go Down

Topic: Ir Controller Using Arduino (Read 568 times) previous topic - next topic

Combinu

Sep 18, 2014, 03:38 pm Last Edit: Sep 18, 2014, 03:40 pm by Combinu Reason: 1
Hi to all.

The code below is very simple to understand, i have recorded 2 remotes, 1 being of a tv and 2 being of an AC.

The codes work fine and all i have to do is send a character and this character will send the according code

The code is attached to the post!

It uploads completely into the arduino.
Strangely enough no errors are recorded and nothing, as it is it does not work at all!!

BUT if i remove some irsends say up to case 108, the program starts working again!!

Can you please help me out? Is it a memory problem when it is executed, i mean when the arrays of the codes are declared??

How can i solve this??

johnwasser


BUT if i remove some irsends say up to case 108, the program starts working again!!


That is often an indication of running out of SRAM.  If you have any constant data, particularly arrays and strig constants, you should move them into FLASH memory.  See: http://arduino.cc/en/Reference/PROGMEM
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Combinu

SOLVED thanks to johnwasser

It is a bit slow when retrieving the array from the flash memory in some cases but it worked!

Thanks and Regards

Combinu

Hi, i need to bring this up again!

I have attached the modified code again, but i have a problem.

Ok now the program is running i receive feedback from the serial that the code is being sent as you can see from the code.

The problem is that it seems that it is not retrieving the actual array, i know from the reference you gave me i have to do something else to read, but can't seem to figure it out.

Can you please help me out.
The code is attached with this thread again, modified.


Combinu

SOLVED AGAIN.

I have used the flash library found here:

http://arduiniana.org/libraries/flash/

You can easier manipulate data that depends on flash memory rather than SRAM.

Hope my problem solved any other questions!

Go Up