Need Help With Coding!!

I'm looking to build a wireless control with the HC-12 modules. Ive got to control a linear actuator with the receiving arduino, and also 3 buttons that control a 5/3 solenoid in one direction, and another button to jog it in the other direction. Each button needs to be programmed to hold the solenoid open for a certain amount of time.

Is there anyone who can help talk me through this project?
Without you all, I am lost!

Hardware will be:

2x Arduino Uno
2x HC-12
4x NO Tactile Switches

You need to write some code of your own so we can help you. If you want someone else to write the code for you, you usually have to pay for it. If you want to learn to code, you need to start with simpler tasks. Break your project into simpler tasks, like getting a linear actuator to work with one Arduino.

For receiving the data have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

...R

Carterworo:
I'm looking to build a wireless control with the HC-12 modules. Ive got to control a linear actuator with the receiving arduino, and also 3 buttons that control a 5/3 solenoid in one direction, and another button to jog it in the other direction. Each button needs to be programmed to hold the solenoid open for a certain amount of time.

Is there anyone who can help talk me through this project?
Without you all, I am lost!

Hardware will be:

2x Arduino Uno
2x HC-12
4x NO Tactile Switches

How much Arduino (C language) do you know already? That is the most important part in determining how long this will take you even with help that isn't do it for you. Short version: if you don't know beginner-level C then that is a study you should get through first.

Your solenoid may or may not need external power too. That's not a big issue unless it gets screwed up royally.

I know absolutely none! I would like to learn for myself and do this project alone.

Do you have any good book recommendations for learning?

better than books are real people who can help you on the way. The first thing is to learn from youtube.com then start coding slowly. When you get stuck somewhere forums are one the one to ask questions and one such forum is this.

...and let us not forget the dozens of worked examples provided in the IDE

AWOL:
...and let us not forget the dozens of worked examples provided in the IDE

Oh yes those too :slight_smile:

Carterworo:
Do you have any good book recommendations for learning?

If you search the Forum you will find that question discussed several times with various recommendations. I know that some people like learning from books and others like learning from YouTube and online tutorials. Google "Arduino book" would probably be a good idea -or search on Amazon.

Someone suggested Arduinos for Dummies and I had a quick look at it in a book shop recently. I reckon it is well worth looking at.

My introduction to the "Dummies" books was "Sailing for Dummies" and it is excellent.

There are lots of useful links on the Useful Links Thread.

...R

Thanks alot people! You are all so helpful and I will start with the basics!

Still wondering though, if I want a programmable button that remains on for a certain amount of time when pressed, what would be a good example of the coding?

I'll get there some day but examples would always help me learn in the right direction.

Carterworo:
Still wondering though, if I want a programmable button that remains on for a certain amount of time when pressed, what would be a good example of the coding?

When you know a bit more about programming you will understand that that is not a very practical question, Programming is not the same as asking the ironmonger for a 100mm long bolt. In programming there are many ways to do most things and different circumstances favour different options.

Have a look at how millis() is used to manage timing in Several things at a time.

...R

Carterworo:
I know absolutely none! I would like to learn for myself and do this project alone.

Do you have any good book recommendations for learning?

I see some already suggested.

I was looking for your start point. Do you know any programming language? Even Basic!

I found a site that looks useful for getting C basics explained with interactive lessons (their words), you can see if you like,

That was the top hit when I googled on learning c

In my day it was get or borrow books. The library helped and in college towns the used book stores gave me some finds, course books can often be found cheap in those places.

One thing to note is that while Arduino uses C, the IDE puts you inside of the standard C main() function so you start with

void setup()
{
// put things here that only run once
}

and

void loop()
{
// put things here that run over and over
}

It means that standard C examples won't exactly match how Arduino code is arranged.
For the most part, what you see inside of standard C main() goes right inside of Arduino setup() -- especially simple code!

Arduino does provide the tutorial examples in the IDE with more full explanations on the Arduino site.
On this page
https://www.arduino.cc/en/Tutorial/HomePage
they are referred to as Built-In.
You want to go through some or all of sections 1, 2, 3, and 5.
Skip section 4, it teaches a bad habit for Arduino, sorry but true!

On the same page is a link to Foundations and More that you might visit and re-visit as you learn more. Basic hardware specifics and other topics are there. Save the Hacking section for later.

As you pick up the basic concepts the examples will get easier and easier. When you're up to basic "words and grammar" it will be time to tackle your project, what good is a book you can't read?