Hey guys, I just finished developing an RFID scanner on an Arduino Mega to use as a motorcycle ignition system and it all worked fine on my Mega 2560 I purchased a Nano today to use as the main device.
I only changed 2 parts of my code. I remove some LED's as the production part won't have them but left the LED part of the code in (There's just nothing connected to those pinouts) and some of the digital pins to suit the nano (those that exist on the Mega but not on the Nano).
Now whenever I scan an RFID chip the Arduino just freezes the LED on pinout 13 lights up permanently and if I restart it it does the same thing again.
Code is a bit long to fit here but I made a github repo for it. I'm hoping someone can help I'm stumped...
Did you get any compiler warnings about the size of your code or memory usage ?
This, for example, would be fine:
Sketch uses 1834 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 207 bytes (10%) of dynamic memory, leaving 1841 bytes for local variables. Maximum is 2048 bytes.
6v6gt:
Did you get any compiler warnings about the size of your code or memory usage ?
This, for example, would be fine:
Sketch uses 1834 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 207 bytes (10%) of dynamic memory, leaving 1841 bytes for local variables. Maximum is 2048 bytes.
None, this was the output from the compiler + upload
Sketch uses 9588 bytes (31%) of program storage space. Maximum is 30720 bytes.
Global variables use 262 bytes (12%) of dynamic memory, leaving 1786 bytes for local variables. Maximum is 2048 bytes.
I specified Pins 3 and 2 as LED outputs (I believe Pin 3 is an interupt??) I swapped them to A1-3 and it solved my problem. All working as it should now!