Arduino rookie - HUGE code - is it possible ?

Hi everyone,
I have a bit of a problem here. I need a code that is pretty complicated because there are lots of things to do, so i just need someone to tell me if it is possible or not.. here it goes :

I have the arduino, connected to a temperature/humidity sensor (DS18B20), a magnetic sensor (KY-025), "Ultra HD 3.2 Inch TFT LCD Screen Module Display 320X480 HX8357B 3.2'' 320*480 for arduino Compatible with MEGA 2560" , a poetentiometer, 6 programable LEDs, 3 buttons and a potentiometer.

Now here comes the fun part :

I need the board to display on the screen a timer (mm/dd/hh/min/sec), that will keep counting until 99 months. When button 1 is clicked, i need the screen to display : temperature from sensor in Celsius, 5 voltages (5 different voltmeters or something like that), the LED status** and keep the time counting somewhere down on the screen. When i press again, it goes "off".
**By LED status i mean that i want it to tell me which LED is on and which is off.

Now, the LED's pattern will be something like this. (LED1=L1 ; LED2=L2 etc)

L1 on (2.3s) ; L2 on (0.7s) ; L3 on (2.3s) ; L4 on (0.7s) ; L5 on (2.3s) ; L6 on (0.7s) => L1
and so on in a infinite loop. This pattern must work above everything, at all times, just like the time counter. * there has to be no time in between LED blinks !

Now here is my problem : i have only been working with arduino for about 2 weeks, i cant yet set up the counter right because i don't know how and everyone on the internet has a different style of teaching me. But, the entire LED pattern and the library for the display sensors etc took me more than those 32 KB that my arduino uno has. I know i'm lame at coding, i did it all with delays because i can't seem to see how millis work. my question remains : is this kind of code possible ?

Sounds do-able to me

how exactly? i have 7 pins to LED + 6 to Voltmeters which is 13 pins already, and i ran out of pins for the display. it's tricky

Consider buying an Arduino with more pins and/or serial displays.

What happens after 99 months?

Computationally this does not demand a lot of computational power. I have a couple recommendations:

  1. Look a getting a real time clock shield. The arduino by itself is really precise, but not very accurate. You will gain seconds per hour. Also consider the use of GPS for timing in your circuits.
  2. Research shift registers. You can multiply the number of inputs or outputs you have with software. With that being said, a mega will give you more options.
  3. I really don't see this as HUGE.

You purchased an LCD shield that requires a Mega, not an Uno.

You can use the Uno for early work with LEDs and switches but once you want to add the LCD, you'll need the Mega as that LCD requires about 12 dedicated I/O pins.

There are indeed plenty of LCD displays out there that use 4 pins (SPI bus) or even just two (I2C bus). That will cut down your pin use considerably.

The overall requirement looks totally doable and not huge by any means. A couple hundred lines of code maybe, based on what you described.

I don't understand why your LCD library would be >32 kB already, unless you're talking about source code and not compiled code - the size of the first has little to do with the size of the second. That must go down to 1-2 kB at most in compiled form.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

If your code is too big tp code tag, then attach it to your post as an .ino file.

Thanks.. Tom... :slight_smile:

Ok so, from what i understand from you guys it's not that big of a deal, i just have to learn how to code right. After 99 months the timer runs out. :slight_smile:

Thank you for answering my question people, you've been really helpful.