Go Down

Topic: you assume quite a lot (Read 5531 times) previous topic - next topic

smoochmyhoop

like the header said... you assume quite a lot... the last time i wrote SIMPLE code was when the c64 was just hitting the market... ya I'm old.  I've read a lot in forums and such and have hit one major wall with every one of them.  they all seem to assume that if you know how to apply their example to something you trying to achieve(OK you know how to make the led blink so the rest should be obvious).  i run into the same problem when i try to explain audio production to people.  i forget they don't know what a phased array is... let alone a simple chain loop.  you get my meaning.  if you don't know the lingo your swimming in a circle.  for instance.  I'm trying to write a section of code to blink a led when i push a button or simply write "blink" in my code.  i understand that i must use some sort of function/loop within my main loop that will return the desired effect every time i hit the button or input "blink" and i also understand that a function has to include the name of the function type and give it a name and apply variables to it " but i don't know what to write to initiate the function(set up the function) so that the program will understand it.  all the examples I've seen show a specific function to achieve a specific result and when i try to apply it to my sketch it doesn't work.  because all they've done is show me an example of their code and not the basics behind it.  the rest of the code they input they do assuming you already knew you had to do that.

so if i write a loop that i want to blink a led on and off a given amount of times when i write "blink" into my main loop what else must i do else where to  make it function and more importantly... why?   example:

int led = 9;
????????????

void setup(){
    pinMode(led, OUTPUT);
     ??????????             // do i need statements here?  why or why not?
}}

void loop(){

     {"blink";       //whats the correct way to input this?  how and why?

}}

void blink(?){            //is this the function to use?  why or why not?
  if(something)
   {action}}
these are things that non programmers, like myself, do not know.  copying other guys code can only get you so far.  without the knowledge of "why" and "how" and a good grasp of the lingo you end up where i am.  i can assign pins.  read and write them and even pull off a couple of "if" else" statements and i know what i want it to do but i don't know why i have to put a "int" up there. i know i have to put a "{}" there... but why? a lot of the time i feel like I'm trying to  decipher ancient hieroglyphs when i read other guys examples...lol 

zoomkat

i've still have my VIC20 with dataset. To cut to the chase, just what specifically are you trying to do?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


wildbill

The arduino is programmed using C/C++. From the problems you're having, I'd suggest taking a look at a few tutorials on the language before you try to progress with the arduino itself.

grendle

its frustrating, i understand where your coming from, but alot of the guys i think want you to find the answers, to better understand things. i know the code your trying to implement, the answers are here, in the forums and on the main site/playground. also, these guys have seen millions of times "how do i blink my led?", long story short, im new too, and theres no fast, or "magic" way or answer. research is the answer. then post your code according to the rules if it still doesnt work and you will get help/advice.

AWOL

Detail and precision are required because the computer, be it Xeon multicore server, microprocessor or microcontroller, is the most monumentally moronic device imaginable.
It has absolutely no idea what it is doing, and must have everything set down for it.

You have to tell it what type of data it is operating on ("int"),you have to tell it whether it is accessing its pins as inputs or outputs ("pinMode") and just about everthing else - you cannot make any assumptions.
You can have defaults, but these are usually well-defined.

Grumpy_Mike

If you ask for directions to the train station in Germany by pointing at a piece of paper saying "how do I get to the train station" would you be surprised to find you could not understand the answers you were given?
You must have a certain amount of knowledge in order to understand the answer.
So questions like:-
Quote
int led = 9;
????????????

Show that you have not bothered to try and understand even the very first page of a book about the C language.
Learning takes effort as does answering badly phrased questions which they inevitably will be, but we understand that.

This forum is a two way process, we are willing to teach if you are willing to learn.
The first step in this is for you to show willing and read the "How to use this forum" sticky topic at the start of each section. The show you can learn by taking note of it, especially the bit about how to post code.

smoochmyhoop


If you ask for directions to the train station in Germany by pointing at a piece of paper saying "how do I get to the train station" would you be surprised to find you could not understand the answers you were given?
You must have a certain amount of knowledge in order to understand the answer.
So questions like:-
Quote
int led = 9;
????????????

Show that you have not bothered to try and understand even the very first page of a book about the C language.
Learning takes effort as does answering badly phrased questions which they inevitably will be, but we understand that.

This forum is a two way process, we are willing to teach if you are willing to learn.
The first step in this is for you to show willing and read the "How to use this forum" sticky topic at the start of each section. The show you can learn by taking note of it, especially the bit about how to post code.


you also assume that I've ever been on a forum... i barely use e-mail.  so excuse me for not understanding the"forum" lingo(like i said I'm old... it took me half an hour to figure out how to even get on this forum).  you also assume that i have not pursued the answers on my own... i do not have regular access to the internet which makes it hard to access information.  although your obvious realm of knowledge far exceeds that of any other human being in existence(as do all uk-ers) so the next time i post a question I'll make sure i already know the answers... just to test you.  people like you are the reason why more people are not interested in learning anything...  this is why i have never joined a forum... every time i look at a forum its a bunch of guys trying to show that they know more than someone else.  as i stated earlier i am currently reading the c++ tutorials so I'm sure i will find the answers there and figure it out... thanks to the guys that simply wrote "c++ tutorial... without the smug comments.

AWOL

Quote
you also assume that I've ever been on a forum.

Quote
every time i look at a forum its a bunch of guys trying to show that they know more than someone else

?

Grumpy_Mike

Quote
people like you are the reason why more people are not interested in learning anything.

I find that personal and offensive please withdraw it. Needless to say I disagree.

Quote
every time i look at a forum its a bunch of guys trying to show that they know more than someone else

No, not show tell. If there was not a bunch of guys willing to help others then there would be no forum worth logging on to.

You started with the criticism unprovoked on your first post.

Quote
without the smug comments.

Or the pleading of the pathetic.

el_supremo

Quote
i do not have regular access to the internet which makes it hard to access information

You don't need internet access. There are all sorts of books available that cover C and/or C++ programming. Get one and read the first few chapters. Print out a program such as the blinking LED demo and as you go through those chapters you'll find that they cover many of the concepts which will help you to understand the program. You will eventually also need to refer to some of the functions that are documented here: http://arduino.cc/en/Reference/HomePage

Pete
P.S.
Quote
the last time i wrote SIMPLE code was when the c64 was just hitting the market... ya I'm old.

That isn't old.
Don't send me technical questions via Private Message.

mistergreen

There are lots of books for beginners you can check out which will help a lot. I started on a Commodore 64 as well. Great little machine.

I wrote a quick into to programming for beginners if you want to check it out. The adage, "you have to learn to walk before you can run" applies to programming as well.

http://aquatictechtank.net/viewtopic.php?f=37&t=8


grendle

#12
Mar 15, 2013, 10:03 pm Last Edit: Mar 15, 2013, 10:06 pm by grendle Reason: 1
Quote
people like you are the reason why more people are not interested in learning anything.


personally, theres a few guys on here id love to sit down with for a few hours to learn some stuff from, but alas, i dont have that much money for beer. i could fly you all in, but not beer, too expensive.  :smiley-eek-blue:

now if i really wanted to know something bad, and quick,  like example, how to push a button and make an led blink, i would offer someone money or something to write me some code. paypal.

i am impressed how much knowledge is floating <<< no pun intended, around here. i would like to thank those that do take time out of their day to help out.

MAS3

Ah, the C-64.
That was my start too.
I've still got it and plan to never throw it out.
And i used it to try and do some programming, where most others around me interested in that device were just playing games with it (not that i didn't).
What i did then was very unimpressive (except to me).
But i did learn a bit.
In the mean time (almost 30 years have passed since) i showed interst in computers and electronics (and made electronics my job).
I was active in fora, have been moderating a few too for 10 years.
None of this all was about programming.
I didn't have any problem understanding the blink example, because of what i have learned in the past.
But that's different for every person.

My vision is that i learn every day, and will do so as long as i live.
I learned from the fora and i learned by being a moderator over there.
One of the most important things to learn, is to be respectfull.
If you have a question then ask that question and be clear in doing so.
A lot of times, thinking about your question and the best way to ask it, might already bring you closer to answering it.
To answer questions, some analytic sense needs to be present, or it might be hard to find out what that question actually is about.
Demanding answers or blaming others of your faillure to solve the problem you're confronted with at that time will not get you to convince people to help you.

And telling the community that it assumes too much, is an assumption in itself and will be hardly helpfull to you or anyone.

Jus tkeep in mind that you are here because you want to learn (< that's an assumption of mine) , and have accepted that you could use some help with that.
Ask your questions kindly and keep your postings kind and polite even if that might be quite a challenge at times.
Read your posting after typing it but before submitting it (maybe click the preview button), so you are able to refine it.
So take your time and see how you can help getting yourself some help.
You can assume that people over here are asking themselves what someone asking a question really wants.
And you need to keep in mind that the consensus over here is that Arduino isn't just about having fun with hard- and software, but most of all about learning while having that fun.
Just telling you do this and do that, might solve a problem, but teaches you nothing at all.

Again:
Whenever you have a question, ask that question in a clear way so someone willing to help understands what you are asking.
Be thankfull someone is willing to help at all.
Tell them what you do not understand.
But also what you already tried.
And generally, try to break your problems down to smaller sub problems that you can solve one at a time.
Combining the solutions will most likely also solve the initial problem.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Osgeld

It amuses me is that the op can spend the entire day fussing, but wont take 5 min of their life to look at the learning page on the front of the website.

I mean for god sakes man Section one Basics: Article 2 Blink, its 2 freaking clicks.

Go Up