Adjusting the parameters with touchscreen

Hi. I am not asking for help with coding (just yet) but I am trying to manage my expectations of Arduino against the realities of its capabilities. I basically want it to do the following and wonder if it will be possible further along my DIY build.

I am making a high powered LED light for my fish tank using 4 different coloured leds, each with their own driver and will be controlled/dimmed by four of the PWM pins on my mega board.

I want to:

  1. be able to configure a sunrise to sunset programme to raise the intensity of the LEDs in the morning and then dim them at night. (Via an RTC)
    2 be able to adjust the levels of each channel when they are on full (not partially through a dim fade)

Is there a way of doing this, in theory by setting X and Y as variables with X being the PWM values at sunrise and Y being that at sunset… And then have X and Y adjustable from another select menu on the touch screen shield I have?

As I say, I just want to know if this is within Arduinos (or a programmers) ability?

See this? Toorum's Quest

This guy did a sideways scrolling game with 256 colours, 4 sound channels, moving sprites and controlled with a NES controller, using an Atmega328 - the same chip as in the Arduino Uno.

So yes, I think you can turn on 4 LEDs from time to time.

Certainly within an Arduino's capability.

The programmer (you?) is something I know nothing about.

If you are new to the Arduino start by learning how to control the variables using values typed into the Arduino Serial Monitor. When you are confident with that you can move on to the touch screen

Think of your project as a series of separate pieces that are "glued" together. Look at how this is done in planning and implementing a program.


Excellent advice Robin thank you very much. That's exactly what I plan to do. Just built my led driver board and set it to fade with a delay so next to get the RTC working once it's delivered and set the fade by time. As you say, little blocks. Thanks again.

Is there any links that you know of (can't seem to find it, maybe not searching for the right thing) but like a tutorial on how I can control something with the serial monitor... For example turning the LED on by typing a number on the serial monitor, and then turning it off with another number.

Section 7 of planning and implementing a program deals with getting user data via the Serial Monitor.

The examples in serial input basics are also an option

Between them you should have most of what you need.


Brilliant. Thanks Robin.

Playing with Arduino's and aquariums seems to go hand in hand for a lot of people :slight_smile:

What you are looking to do has been done many times before so there is not really any need to re-invent the wheel.

You may want to start from scratch to improve your own knowledge but, if not, let me know and I can send you a basic sketch.

What drivers are you using for the LED's?


Hi Magicj.

I am using four Meanwell LDD 700ma drivers. Have you done the same thing then?

I have tried starting from scratch, and even following the Arduino manual for basic concepts was a bit daunting, especially with no previous coding experience. I learn better from looking at something working and reverse engineer it to see why and how its doing whats it doing.

Cheers, Steve