New to Arduino

Hello and good day, my name is Justine I am very new to coding and the Arduino. I’ve had this project in my mind for sometime with Christmas around the corner I picked up an electron robot for my son to play with as he has a construction tech class in school. So I thought I’d give this a try and understand some of the basics so here I am.

I’ve look on the net but can’t seem to find the info for my project.
Most of the information I have found does not show or teach how to put all of this together, I did try cut and past parts of the code but with no luck getting it to work and with my lack of understanding I’ve come to ask for some help.

Ie. links to my hardware in showing me how to put this all together. Any information on calibrating my coil sensor as well. Or just some hand holding ;D.

I have uploaded my project pics. You will see a red led in the top right It’s just a power light.

I have 4 soil sensors connected to A0, A1, A2 and A3.

Pin13 was used as per the sketch I used from the samples on lcds.

Thank you all very much.
Justine.

P.s.

Was not sure where to post this, sorry if it’s in the wrong spot.

How to upload images.

Please read the how to use this forum-please read sticky to see how to properly post code (#7) and some advice on how to ask an effective question (#11). Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code. And we need more specific information on your hardware and what your goals are.

justinehermary:
I picked up an electron robot

Can you post a link so we have all the details about the specific robot that you have.

...R

Does it look like this ?

So sorry guys I see half my post is missing including my pics but no worries.

My hardware

1 - ATmega2560 board
1 - 3.5" TFT LCD 480x320 Arduino Touch Screen HD Color Screen Module for Arduino UNO & MEGA 2560 Board with/Without Touch Panel(with Touch pane.

1 - -50-110°C W1209 Digital Thermostat Temperature Control Switch Sensor Module 12V

4pcs Capacitive Soil Moisture Sensor 4Channel 5V Relay Module. I have these connected to the A0 to A3 and have no clue how if necessary to calibrate these guys.

And one 15gal/min 120v Submersible aquarium pump.

What I would like to do is.
Have the temperature prob show soil temp readings on to the LCD, as well as the moisture sensors showing there levels on the lcd.
And have the pump kick in when the soil moisture drops below set value.

In a nutshell auto watering with temperature in moisture levels being displayed on LCD screen and turning the pump on and off.

Do to my handheld uploading my pics is truly a pain :wink:

Pretty ambitious list of requirements for a first-time project.

I'd recommend starting with basic stuff like getting an LED to blink, using the serial port, reading a switch, understanding millis() vs delay() timing etc.

If these are the common "soil moisture sensors" keep in mind that they are toys and will not be useful for more than a few days.

Constructing a usable soil moisture sensor is non-trivial. :astonished:

If you have the cheap PCB sensors you will probably need some extra ones as they are prone to breakdown in the soil.

A simple single example here for the cheaper ones.

You may also want to consider a seperate PSU for the sensors with a common ground back to the Arduino.
Part of that will depend on the type of cable used for the sensors and the distance between them.

Consider each part as a seperate project to begin with and learn to understand what you need to do to get each part working by itself.

Once you get that far you can start to combine elements together.

Posting tips.

  • Always list the version of the IDE you are using and the board version if applicable.
  • How to insert an image into your post. ( Thanks Robin2 )
  • Add your sketch where applicable but please use CODE TAGS ( </> )
  • Add a SCHEMATIC were needed even if it is hand drawn
  • Add working links to any specific hardware as needed (NOT links to similar items)
  • Remember that the people trying to help cannot see your problem so give as much information as you can

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Bob.

justinehermary:
So sorry guys I see half my post is missing including my pics but no worries.

My hardware

1 - ATmega2560 board
1 - 3.5" TFT LCD 480x320 Arduino Touch Screen HD Color Screen Module for Arduino UNO & MEGA 2560 Board with/Without Touch Panel(with Touch pane.

1 - -50-110°C W1209 Digital Thermostat Temperature Control Switch Sensor Module 12V

4pcs Capacitive Soil Moisture Sensor 4Channel 5V Relay Module. I have these connected to the A0 to A3 and have no clue how if necessary to calibrate these guys.

And one 15gal/min 120v Submersible aquarium pump.

What I would like to do is.
Have the temperature prob show soil temp readings on to the LCD, as well as the moisture sensors showing there levels on the lcd.
And have the pump kick in when the soil moisture drops below set value.

In a nutshell auto watering with temperature in moisture levels being displayed on LCD screen and turning the pump on and off.

why a w1209?

i have a few dozen hydroponic projects which i mean spade for spade watering plants is sort of the basis of hydroponics.
the cheap pcb soil mosure sensors are actually really good if you use them right. you power them up for 5 seconds take a reading and then power them down again the ones you get from china for a dollar are read with Analog read, or digital read if you are just using the onboard comparator to trigger a response. depends on your application.
i would get a BME280 they are truely great teperature, relative humidity and barometric pressure all in one , which means with a little extra code you can stop from over watering your plants if it rains, or the pressure is high enough for it to rain. then just get a regular relay module single relay since you only have one pump, the arduino wil control that and you have more manipulative control over where when and why the relay turns on the pump. BE VERY CAREFUL DEALING WITH MAINS VOLTAGE, CHECK IT TWICE AND THEN CHECK IT AGAIN FOR SHORTS OR OPENS AND DEPENDING ON YOUR LOCALE YOU MAY HAVE A SEVERE RISK FOR AN ARC FLASH, WHICH WILL MESS YOU UP.
personal opinion on this if iwas you i would get a blue plastic outlet box and an outlet from your hard ware store, as well as a spare exrtension cord, make the cord go into the box place the relay in the bottom of the box wire all the high voltage in this box and then run longer lovoltage relay wires from the box to the arduino. finish out the wiring of the relay high voltage to the outlet, then all you have to do is inturrupt the black wire with the relay, and then plug your pump into an outlet like you normally would.
i have more advice but ive pretty well submitted a lot of unsolicited advice in here as it is .

Use the forum Google search function in the upper right of this page to search for the key words of your project. You will probably find many similar previous project discussions and code to get you started.

To put your code in a code box, use the </> icon in the far left of the post tool bar and paste your code between the two bracket sets that appear.

To go back and put your code in a code box, in the bottom right of your post, select “more” and click modify. When the modify post opens, high light your code and click the </> in the far left of the post tool bar. This will put you code in code brackets. Then save the changes.

First off thank you all for your input, unfortunately a lot of the stuff like “code in a code box, use the </> icon”… well goes over my head. as I have no real understanding coding, forums as I dont use them till now. any ways thank you, I will figure this out one day lol.

@Blackfin ambitious…? yes indeed. I have always thought big, one idea came then another and so no. Now Im trying to see if I can build it my self before I just pay someone to do it for me.

“I’d recommend starting with basic stuff like getting an LED to blink, using the serial port, reading a switch, understanding millis() vs delay() timing etc.”

I did make the led blink as well as iv wired up the 16x2 lcd and a few other things. My problem lies in how I learn and its unfortunately not by reading text :frowning: A obvious question to most is quite the opposite to me.

@Paul__B, @ballscrewbob Oh I am aware of of the corrosion that will happen on the sensors as they sit in the soil that is why I picked up the capacities soil moisture sensor, and yes I will have to replace then.

@ballscrewbob Thank you for the links I’ve looked at them and plan on read them in-depth, One thing do you have a link to help me read the schematics. I know what ground is and a resistor but that’s about it for now. I can build that part I got. And I will look at the forum tips as well :D.

@billion W1209 it was only 3$ and free delivery. I’ve picked up capacities soil moisture sensor just have to seal the sides. And thank you for your suggestions I will keep them in mined.

Step-1:
Create a TASK LIST

  1. For each item on the list state the objective in as few words as possible. (meaning separate the sensor
    from the LCD, ie: SENSOR: "Sesnse moisture", LCD: "Display Moisture", etc.

  2. For each item on the list, Google that function statement , worded as simply as possible.
    IMPORTANT NOTE:(!): PRECEED ALL SEARCHES WITH THE WORD "ARDUINO"

  3. Do a general search for the task, and if you're lucky, you'll find a tutorial that includes schematic and code.

  4. Otherwise, google code and hardware wiring separately

  5. Post a Status Report detailing what steps you have taken for each task. (including google searches)

  6. Get a blank sheet of printer paper and draw a schematic and post a photo of it.

  7. Assemble, wire and test each component separately. (you don't need soil moisture data to test the LCD)

  8. You don't need an LCD to test the soil sensor. Use the serial monitor.

  9. Use diagnostic serial prints initially and comment them out later.

FYI, it seems like you are getting a very late start on this based on your stated schedule.

justinehermary:
First off thank you all for your input, unfortunately a lot of the stuff like “code in a code box, use the </> icon”… well goes over my head. as I have no real understanding coding, forums as I don’t use them till now. any ways thank you, I will figure this out one day lol.

Better get used to it. If you can’t manage forums, I venture to say coding will be a nightmare! :grinning:

You certainly need a lot of help and practice. No offence.
There’s a section of the forum Introductory Tutorials, while the posts wander off track sometimes, they try to pass on the electronic and other fundamentals you’ll need.

You’ve only been in this for four days, it’s going to take a bit longer, but you MUST work through the examples and forum guides, and it’s very likely you’ll fry a chip or two while on the journey.

If possible, see if you can find a patient ‘buddy’ in your area that can spend a couple of one-hour sessions sorting out the fundamentals with you.

justinehermary:
My problem lies in how I learn and its unfortunately not by reading text

Different people have different learning styles. What have you found to be the best way for you to learn?

Not being able to learn by reading is probably a substantial handicap for programming because so much of it involves reading documentation which often seems to have been written with intention of putting the reader to sleep. But that's probably an inevitable side effect of describing technical matters unambiguously. I usually find that things begin to make sense after the 14th read (and that's not entirely a joke).

However everything about programming can seem very complicated and stress-making for a newbie. If you persevere for several weeks and learn some of the basics you may find that everything becomes a lot less impenetrable.

As @lastchancename has said, if you can find someone to learn with face-to-face it can be a big help at the earliest stage as it is much easier to pause the conversation and get clarification whenever you don't understand.

...R