Go Down

Topic: Digital imput via arduino to processing (Read 3451 times) previous topic - next topic

AWOL

Quite so
Mein Luftkissenfahrzeug ist mit Aalen gefüllt
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon

How about answering my questions in reply #14.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon


Mein Luftkissenfahrzeug ist mit Aalen gefüllt


Sie haben schöne Oberschenkel.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon


Sorry, was bad coment, now I changed. How now ?


So far I haven't seen a single line of code that you have posted with the [ code ] tags as we have repeatedly requested. You want people to help you but are not prepared to take a couple of minutes to work out how to do that.

Your comments do not agree with the code you post. That shows a lack of attention to detail. Detail is what makes programs work. The computer cannot read your mind, nor can we. Code like this (bearing in mind the comments) show a total confusion on your part:

Quote
Code: [Select]
int switchPin = 4;                       // Switch connected to pin 4
...
  pinMode(switchPin, INPUT);      // Set pin 0 as an input


Meanwhile comments like this, while correct:

Quote
Code: [Select]
  if (val == 2) {              // If the serial value is 2,


... simply do not add anything at all to the code.

Imagine if I said this:

Code: [Select]
if (a == 2)   // if a is 2


What has the comment done? Has it helped in any way?

Or this:

Code: [Select]
a = 42;   // make a have the value 42


Try to think clearly. Programming is not about writing "stuff that looks like programs". It is about understanding what you are doing.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up