Hello Guys. Firstly sorry for posting and having to ask, but I feel that unless I try here, I will not be able to achieve my project. I feel helpless at the moment, I just spent a while in the arduino chat room on freenode and didn't find it welcoming, I was called ignorant within a minute of entering due to my lack of understanding the phi_prompt libraries, I merely stated I am having problems compiling some of the example codes.
I hope someone on here is able to help me start on the right track to achiving my goal.
I have built a rudimentary aquarium controller which doses 3 peristaltic pumps, turns on some lights and co2, feeds fish by triggering an autofeeder which has it turned out had a PIC inside, and displays various events that occur when the timers are activated such as "dosing macro" or "feeding fish", then it returns to a main display.
I am building a new one for a reef aquarium I have built which is still a work in progress. and I want to disregard anything I did previously as it was a very crude way of doing things.
There are a few things I wish to achive with my controller, and I hope with the help of this forum and the community I can achive that, and expand my knowledge of the arduino platform.
Simply, at the minimum, I would like to use my sainsmart 2x16 5 button LCD shield, and an UNO, to control the duration to which a small 6-12v peristaltic pump runs for, the pump will simply be connected to a voltage source, and a relay which is controlled by one output pin on the arduino per relay.
Ideally I just want to change a value in the code which when that 'chunk' of code is executed the value set will be used.
I will explain a little more because I am pants at explaining what I conceptualise..
I am completely stuck as to how I can raise a menu on the screen, that will allow me to input how long the pump runs for.
I understand I know little, but I am willing to learn, I do not expect people to faux-code everything for me leaving me to fill in the blanks..
I have an arduino uno and a DFrobot LCD 2x16 + 5 button shield, from what I can tell, the sainsmart 2x16lcd is exactly the same.
I would like to use this, but I believe the button input might pose a problem, it uses one input with 5 SPST momentarys with differing resistor values.
Here is the flow of what I wish to do as a minimum.
By pressing a button, the arduino displays onto the LCD, a menu offering Pump 1, Pump 2, Pump 3.
Either pump is selected by pressing up or down, then select, once selected, I can press up or down to change the pumps value, of which will be ML (millilitre).
Once for example Pump 2 is selected, the screen will display
"Pump 2 amount"
Pressing up will increment by 0.1ml and pressing down will simply return to the highest value of 3.0ml or some other chosen upper limit.
Pressing select will save the setting. This is something I have no idea how to do, and where I feel hopelessly inadiquate with programming an arduino..
Some how, a function/ block of code will run once daily (perhaps with timealarm library, which I have used) for example
digitalWrite(3, LOW); delay(1100); digitalWrite(3, HIGH);
Where the time 1100ms is to be determined by the selection in the menu, ml is to be converted to an ms value some how, which will allow easy of calibration, which will be done in the sketch, and prior to uploading.
This is how I have run pumps before, they will run for 1100ms, which I have timed to be around 1ml of solution, this varies with density etc, but does not need to be specific.
The reason I would like to have it 'point' to a chunk of code, is because I may change the motor in future, and would like to change the code to perform a certain amount of steps on a stepper motor with various arduino stepper drivers, such code I feel would readily be pastable from examples into the chunk.
I simply need to build the menu, and have the selections change a value in the sketch somewhere.
I would ultimately like the menu to change an int value.
Can anybody help me start my project, perhaps even explain where my understanding is going wrong, where I am able to achieve or not...
I am looking forward to becoming part of the community. I will just write out a simple sketch that will at least get the basics running and post it here.
Thanks in advance guys and gals!