Pages: [1]   Go Down
Author Topic: Ardunio for Beginners but what about for the others ?????  (Read 1180 times)
0 Members and 1 Guest are viewing this topic.
Bucharest
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

    Ok, so I`m a bit frustrated, I love the Arduino , I know how to make a frikin LED to Blink, Fade, Turn OFF  smiley  etc. , I use all the Examples and I understand almost 70% of the code, can make modification to the program but there is a major problem and I don`t think i`m the only one. How do you make the next step. Combine sketch`is , create a completely unik program using the librarys at hand, how do you structure a program how do you make links between the subroutines ( theat think i see where you put a subprogram at the end at the sketch and call it in the main porgram by name) , how do you make two thinks to work in the same time in a program, there are a lot of questions and I do not see any tutorials for this. I wold like to see people doing tutorials for this, video for this, do not show the simple examples work, we all know how to do this  smiley-mad.
   I`m not a programmer and I do not know C++, it wold be nice for some one to explain this to us the users that know electronics but do not know programming. 
   Please comment and share links and videos for the people in between not beginners but not advanced either.
Sorry for ranting everyone  smiley-sweat   
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino basically uses the industry-standard C++ language, implemented by the GNU g++ compiler.

For information on basic things like loops, strings, functions, data types, and so on try consulting one of the many online C++ references. Hint: Google "C++ tutorial".

Although the Arduino main page states that "the microcontroller on the board is programmed using the Arduino programming language (based on Wiring)" this should not be taken to mean that the Arduino is programmed in some sort of cut-down or "similar to C" variant.

The main sketch is C++, however the IDE does do a certain amount of pre-processing (in particular, generating function prototypes for you) before submitting the code to the main C++ compiler.

There are many websites explaining C++.  Just google for some introductory explanations.

Logged

Bucharest
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the replay Gufuf smiley, so basically you are saying that the structure of the programs are identical to the C++ programs. There are many Tutorials out there can you suggest something that work`t for you, mainly in structuring of programs and learning the logic bloc diagram to build a program from scratch. 
Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Until you are experienced enough to where you won't need to, I would recommend doing flow charts for any new project.
Logged

Bucharest
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Arrch, I do this in my own way I guess, I try to figure out what are my inputs and what are my outputs, I put this in the beginning of the list, this shod be at the start of the program, also the variables and the integral values that I need to use. The part I get stuck is where I need to do a loop in the program while I also need to do another thing completely separate that dose not have to do with the loop. Can the Arduino even do this or do I have to do a linear type of program witch uses a single process at a time.       
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13707
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Kerningham and Ritchie wrote THE reference for C programming 40 yrs ago and it is still a must read. It discusses most of your questions.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Bucharest
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Robtillaart at a first search I found this online  [link to pirated copyright material removed]  I will try to look thou it and see if i get any insight into the C++ Language. If you have a sugestion on a way theat you used to learn C++ please post the link here. smiley
« Last Edit: July 16, 2013, 02:58:38 pm by AWOL » Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Arrch, I do this in my own way I guess, I try to figure out what are my inputs and what are my outputs, I put this in the beginning of the list, this shod be at the start of the program, also the variables and the integral values that I need to use. The part I get stuck is where I need to do a loop in the program while I also need to do another thing completely separate that dose not have to do with the loop. Can the Arduino even do this or do I have to do a linear type of program witch uses a single process at a time.       

Arduino doesn't have an OS or schedulers to manage multitasking. If you want to do multiple things "simultaneously" then you have to write non-blocking code. The basics on this concept are demonstrated in the Blink Without Delay Example.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13707
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you have a sugestion on a way theat you used to learn C++ please post the link here.
- http://www.cplusplus.com/doc/tutorial/ -

PS, you should buy the K&R book its worth the money !
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some of the books mentioned are great reference manuals, if you can read them cover to cover more props to you (i don't have the patience anymore).  However, through my college classes I have found that a good math book is better than most programming manuals as long as you understand the basics.  When you start, you must first define your variables and terms (what does "x" mean).  From there it's simply logical scenarios.  If, Then, Else If, And, Or, >,<, =, +, -, etc.  From there you have simple commands like PRINT, GOTO, READ, etc. which is what a good book reference is all about. 

You also seem to be asking about compatability between programs, or communication.  If I'm right (new to arduino), and other members can help me out on this, but I believe you're looking for "Serial Communication" in Arduino.  From there you can use "Processing" to collect the information and make it into something useful. 

Hopefully I answered your question, and other members should check my post for errors...i'm new to arduino too.
Some of the tutorials that include Processing might be able to answer your question better such as http://makezine.com/projects/a-touchless-3d-tracking-interface/
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5578
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Until you are experienced enough to where you won't need to, I would recommend doing flow charts for any new project.

As someone who's had enough 6S training to be dangerous - in many cases, flow-charts (process diagrams of all sorts, actually) can, in all but the most trivial cases, be helpful in determining whether an overall process works in the manner in which it is designed. Indeed, if you design the process from the standpoint of such tools, you can in many cases (with a lot of thought, design, and meetings with stakeholders and users) find areas of potential bugs and such in the process long before implementing it. Add in methods to take measurements of the effectiveness of the design (defects and other problems), you can then use that to feedback into the design to make focused changes to improve the output.

/like I said, just enough to be dangerous - not going to earn my black-belt any time soon...heh smiley-wink
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Pages: [1]   Go Up
Jump to: