Go Down

Topic: Help Replacing Buttons with IR Remote Control (Read 6636 times) previous topic - next topic

Dancopy

Greetings everyone

I have an arduino project "Digital_Clock_MAX7219_DS1307RTC_3button" which, as the name implies, is a Clock with a LED Matrix Module (4 in 1) using 3 buttons to set the time.

However, I would like to replace these 3 buttons with a simpler IR Remote Control, found on ebay, with 17 keys, manufactured by KEYES.

But, I don't have enough knowledge to do this, so I ask everyone's help.

I will be attaching the sketch to the intended changes and also attached an image of the Remote Control mentioned with its decodes.

In the sketch header the links from author page and youtube page.

Thank you in advance for your help.

6v6gt

OK. I see it following on from https://forum.arduino.cc/index.php?topic=418963.msg4390700#msg4390700

Have I understood the situation correctly: You have build the clock according to the project described in the link: https://www.youtube.com/watch?v=uSOpftD8VwU&feature=emb_logo and the only issue is now to replace the 3 physical control buttons (shown on the breadboard) with an IR based control ?

If that is the case, it is a relatively simple project.

Dancopy

That's right; my control is as I attached to the "Keyes Infrared Remote.jpg" picture and it is working correctly.

You say it is relatively simple, but for me it is not, because I have little knowledge in Arduino.

So if you can help me with the code, I really appreciate it!

6v6gt

#3
Dec 02, 2019, 10:41 am Last Edit: Dec 02, 2019, 10:42 am by 6v6gt
This is a separate test sketch just to checkout the IR parts.
Connect the output of the IR receiver to arduino pin A3 and test all the buttons work.

If that works, I will integrate into your clock sketch. The integration is quite simple but let's hope you have no problem with the size of it (memory usage).

It will behave as follows:

Button 1 on the IR will have the same effect as pressing button A on the clock.
Button 2 on the IR will have the same effect as pressing button B on the clock.
Button 3 on the IR will have the same effect as pressing button C on the clock.
The original clock buttons will continue to function as before.

What pin do you want to use for the IR receiver ?

I wont be able to test the integrated sketch because I don't have the hardware or libraries installed.





Dancopy

Hi 6v6gt
First, I want to thank you very much for your kindness in helping me.

Regarding the sketch you sent me, I don't know if you did it by the way, but the "cases" were all with different Hexadecimal codes, so it presented all commands in the Serial Monitor as "Bad Results detected".

So I changed all Hex in the sketch as per my Control, then tested it on Serial Monitor and now show all "Valid Results detected".

For example, button 1 looks like this:

1
Valid Results detected
irResults.value: 0xFF6897; irKeyValue: 1

The irReceiver pin A3, I changed it to 9.

Thank you and I'm waiting,

Daniel Fernandes

6v6gt

I see from the picture of the your IR device that it is nearly identical to mine, only they have turned it up side down and relabeled the buttons. Hence you had to correct the assignment between the codes and the buttons.


Try the attached code.  I've not disturbed the main structure of the sketch too much. All lines which I've changed are marked  // IR

I can't test it. If there is a problem with the total size, post the compiler/linker size message. Some optimisation is possible. If you make any changes to the code and need help, then post the entire new version of the sketch.


Dancopy

Hi 6v6gt
Thanks for your effort!

Really, the sketch got big; as follows:

Global variables use 1104 bytes (53%) of dynamic memory, leaving 944 bytes for local variables. The maximum is 2048 bytes.
Sketch too large; See http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on how to reduce it.
Error Compiling for Arduino / Genuino Uno Card

6v6gt

OK. There is enough RAM so it must be the flash memory of which there is 32kB.


Look in the diagnostic output after doing a "verify" operation for the phrase "Linking everything together..." and post ALL the output that appears below it. This will include the flash memory usage (program storage space). Do this with both your original sketch and the new one.

I have a smaller IR library but, as it is currently configured, it can use only pin 2 or pin 3.

If it is really a border line case, you can free up flash memory by commenting out some of the debug print statements. However, be careful because there are some multi-statement lines which include print , e.g.

Code: [Select]

case 0xFD8877: rv = -10 ; Serial.println(F(" UP ARROW")); break;


You have to comment it out like this:

Code: [Select]

case 0xFD8877: rv = -10 ; /*Serial.println(F(" UP ARROW")); */  break;


Also, don't start removing comments unless you are only say 80 bytes short because trouble shooting will be much harder.

Dancopy

I wouldn't want to be bothering you, but even exaggerated what you instructed me to do, and left the sketch as in the attached image, considering I would be using only cases 1, 2, and 3;

Even so, the sketch remains large:

Global variables use 1104 bytes (53%) of dynamic memory, leaving 944 bytes for local variables. The maximum is 2048 bytes.

My suggestion: What do you think about excluding the functions of the 3 buttons?

6v6gt

You have to do this:

=======
Look in the diagnostic output after doing a "verify" operation for the phrase "Linking everything together..." and post ALL the output that appears below it. This will include the flash memory usage (program storage space). Do this with both your original sketch and the new one.
=======

The problem is not global variables (RAM) ,  it program storage space (flash memory). I need this information to decide how to progress.

Dancopy

OK!

Original sketch:

Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\sketch\\Digital_Clock_MAX7219_DS1307RTC_3button.ino.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_PZone.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Blinds.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Close.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Diag.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Dissolve.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Fade.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Grow.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_HScroll.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Mesh.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Open.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Print.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Random.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Scan.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Slice.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Sprite.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_VScroll.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_Parola\\MD_Parola_Wipe.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_MAX72XX\\MD_MAX72xx.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_MAX72XX\\MD_MAX72xx_buf.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_MAX72XX\\MD_MAX72xx_font.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_MAX72XX\\MD_MAX72xx_pix.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711\\libraries\\MD_DS1307\\MD_DS1307.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/core\\core.a" "-LC:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.hex"
Usando a biblioteca MD_Parola na versão 3.0.2 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_Parola
Usando a biblioteca MD_MAX72XX na versão 3.2.1 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_MAX72XX
Usando a biblioteca SPI na versão 1.0 na pasta: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Usando a biblioteca Wire na versão 1.0 na pasta: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
Usando a biblioteca MD_DS1307 na versão 1.3.5 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_DS1307
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_997711/Digital_Clock_MAX7219_DS1307RTC_3button.ino.elf"

The sketch uses 28990 bytes (89%) of program storage space. The maximum is 32256 bytes.

Global variables use 696 bytes (33%) of dynamic memory, leaving 1352 bytes for local variables. The maximum is 2048 bytes.

Dancopy

New sketch:

Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\sketch\\Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_PZone.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Blinds.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Close.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Diag.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Dissolve.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Fade.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Grow.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_HScroll.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Mesh.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Open.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Print.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Random.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Scan.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Slice.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Sprite.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_VScroll.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_Parola\\MD_Parola_Wipe.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_MAX72XX\\MD_MAX72xx.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_MAX72XX\\MD_MAX72xx_buf.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_MAX72XX\\MD_MAX72xx_font.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_MAX72XX\\MD_MAX72xx_pix.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\MD_DS1307\\MD_DS1307.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\IRremote.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\esp32.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\irPronto.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\irRecv.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\irSend.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Aiwa.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Denon.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Dish.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_JVC.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_LG.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Lego_PF.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Mitsubishi.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_NEC.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Panasonic.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_RC5_RC6.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Samsung.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Sanyo.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Sharp.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Sony.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Template.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\ir_Whynter.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224\\libraries\\IRremote\\sam.cpp.o" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/core\\core.a" "-LC:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.elf" "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.hex"
Usando a biblioteca MD_Parola na versão 3.0.2 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_Parola
Usando a biblioteca MD_MAX72XX na versão 3.2.1 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_MAX72XX
Usando a biblioteca SPI na versão 1.0 na pasta: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Usando a biblioteca Wire na versão 1.0 na pasta: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
Usando a biblioteca MD_DS1307 na versão 1.3.5 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\MD_DS1307
Usando a biblioteca IRremote na versão 2.2.3 na pasta: C:\Users\Daniel\Documents\Arduino\libraries\IRremote
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Daniel\\AppData\\Local\\Temp\\arduino_build_69224/Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.elf"

The sketch uses 36178 bytes (112%) of program storage space. The maximum is 32256 bytes.

Global variables use 1104 bytes (53%) of dynamic memory, leaving 944 bytes for local variables. The maximum is 2048 bytes.

Sketch too large; See http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on how to reduce it.


* I had to send in two parts because it exceeded the limit.

arduarn

Try disabling all unnecessary protocols in IRremote.h and recompile.

Dancopy

#13
Dec 04, 2019, 03:28 am Last Edit: Dec 04, 2019, 03:31 am by Dancopy
@ arduarn - Greetings

I disabled all protocols, as you said, leaving only the NEC protocol;

It worked, but only with the Uno card; on arduino Nano 328 still shows that the sketch is very large; I found this strange because the processor on both boards is ATmega328p.

I would like to use it on the Nano board because, besides being much smaller (taking up less space), it is cheaper too.

Thank you very much for the valuable and excellent tip!


@ 6v6gt

You friend, who did the great job of adding the Remote Control function to the sketch, was a gift you gave me in advance (my birthday on 28 Jan 2020); my thank you very much.

I will try more often to see if you record on Arduino Nano; If not, can I talk to you again?

Hugs to you friends!


PS. Sorry for the spelling mistakes, because English is not my native language (I'm from Brazil).

6v6gt

#14
Dec 04, 2019, 08:46 am Last Edit: Dec 04, 2019, 08:50 am by 6v6gt
Ok. So it all works perfectly on the uno and you can use the IR to control the clock exactly as with the buttons on the clock? If so, that is good news.

The problem with Nano is likely to be that it has an old bootloader on it which uses a large amount of flash memory. The uno (and some newer Nanos ) use optiboot which is 500 bytes. The older one uses 2kB.

You can use your uno to burn the uno (optiboot) bootloader on to the Nano. Google for a tutorial.

Incidentally, it was this line in your listing which shows the flash memory usage:
The sketch uses 36178 bytes (112%) of program storage space. The maximum is 32256 bytes.

Go Up