Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 1847
61  Using Arduino / Project Guidance / Re: Estimating velocity and position on: July 21, 2014, 07:19:38 am
It's just that, in a C context, "^" confuses a lot of people (especially if they're from a BASIC background)
62  Using Arduino / Programming Questions / Re: Help with understanding for/if statement in RFID sketch on: July 21, 2014, 06:56:31 am
Why mess around with Strings?
A simple "sprintf" with a bunch of "%02X" formats would do the trick.

Edit: Why mess around with sprintf and strings? You're just comparing two arrays. Use "memcmp" or "memcmp_P"
63  Using Arduino / Programming Questions / Re: Trough Detector on: July 21, 2014, 06:33:14 am
Code:
   if(transistorPin == 9)
    {
      transistorPin = 10;
    }
    else
    {
      transistorPin = 9;
    }
Is a very long-winded way of writing
Code:
transistorPin = 19 - transistorPin;

(there's no need to set the pinMode of a PWM pin, and if there were, it would be best to set the mode of both pins used)
64  Using Arduino / Project Guidance / Re: Estimating velocity and position on: July 21, 2014, 05:23:36 am
The usual formulas for velocity and acceleration are
  v = u +at
  v2 = u2 + 2as
  s = ut + 0.5 at2
65  Using Arduino / Programming Questions / Re: Servo Code Double Check on: July 21, 2014, 05:21:21 am
I think you need to take a break.
Or two.

I tried out this code before my earlier reply and I confess I had not noticed the missing break; statements. The code seemed to work fine.

Interestingly I have just tried the code again with and without break and it seems to make no difference.

...R
Because of the speed of "loop()", the fall-through from the HIGH case to the LOW case would result in a very brief write to 25 "degrees", and back round to read the switch again, which would almost certainly still be HIGH, so you'd write 110 "degrees" almost straightaway.
The servo simply wouldn't have time to move.
66  Using Arduino / Installation & Troubleshooting / MOVED: How to interface arduino Uno with Matlab in Ubuntu14.04 on: July 21, 2014, 05:17:21 am
This topic has been moved to Interfacing w/ Software on the Computer .

http://forum.arduino.cc/index.php?topic=256210.0
67  Using Arduino / Programming Questions / Re: read serial data on: July 21, 2014, 03:45:29 am
Give it a moment to wear off, and then read it again.

I did that (several times) before I wrote my previous request for an explanation of the problem you see, and I don't.

...R
It looks a little like this ".", but it's a tiny bit higher, above the ","
68  Using Arduino / Programming Questions / Re: read serial data on: July 21, 2014, 03:30:24 am
Give it a moment to wear off, and then read it again.
69  Using Arduino / Programming Questions / Re: Servo Code Double Check on: July 21, 2014, 03:10:04 am
Code:
case HIGH:
    {
      myservo.write(110);
      delay(8);
      myservo.write(80);
      delay(8);
      myservo.write(110);
    }
    case LOW:
    {
      myservo.write(25);
    }
I think you need to take a break.
Or two.
70  Using Arduino / Programming Questions / MOVED: Arduino to C# on: July 21, 2014, 03:01:01 am
This topic has been moved to Interfacing w/ Software on the Computer .

http://forum.arduino.cc/index.php?topic=256163.0
71  Using Arduino / Programming Questions / MOVED: Help (ayuda) on: July 21, 2014, 01:58:00 am
This topic has been moved to EspaƱol.

http://forum.arduino.cc/index.php?topic=256171.0
72  Using Arduino / Programming Questions / Re: read serial data on: July 20, 2014, 04:03:49 pm
Code:
for (byte n = 0, n < 5, n++)
{ cough }
73  Using Arduino / Programming Questions / Re: Encountering Issues with If Else Statement & PIR Sensor on: July 20, 2014, 03:59:52 pm
why wouldnt i be able to?
All the emoticons.
74  Using Arduino / Programming Questions / Re: Activ sensor ! Or not ! on: July 20, 2014, 03:55:32 pm
OK, thanks for letting us know.
75  Using Arduino / Project Guidance / Re: Arduino Programs on: July 20, 2014, 03:44:19 pm
 
Quote
Another thing that hasn't been mentioned is that an interpreter is going to be very slow.
But then, so were the processors of yesteryear.

Ditto the games of yesteryear.

...R
Elite on the BBC B was pretty damned impressive.
Pages: 1 ... 3 4 [5] 6 7 ... 1847