Show Posts
Pages: [1] 2 3 4
1  Development / Other Software Development / Re: Arduino IDE on the iPad on: July 28, 2011, 12:45:21 pm
One Step Closer???

Serial Adapter, and they are have code for the serial protocol on the iOS.

http://redpark.com/news.html

Chris
2  Development / Other Software Development / Re: Arduino IDE on the iPad on: May 26, 2011, 03:41:18 pm
I would love to have the IDE on my iPad!!!
For that, I would Jailbreak it!

I could completely get rid of my Laptop.  Desktop and ipad (or other) is the future.

Makes sense to have it on an android too, (especially now)  Just don't have one.

but both would be the way!

PLZ!

Chris
3  Using Arduino / Programming Questions / Re: C/C++ question on enumerators? on: March 01, 2011, 11:46:24 pm
CB, john

Thanks!

So, allow me to understand a bit more...

(things + 1)   would equate to an integer  (kinda like an auto cast to an int as a simpler form)  , but the resulting integer really isn't an animal unless manually telling it what cast you want?

i.e. ?

     things = (animal) 4;  // would result into a monkey ?


Seems as though C would be more flexible if you could work on values of an enum directly.  But oh well.


Thank you again!


Chris
Chris
4  Using Arduino / Programming Questions / Re: C/C++ question on enumerators? on: March 01, 2011, 11:06:45 pm
Whoa!

Can you explain this bit

Quote
things = (animal)(things + 1)
   

?
Specifically what comes after the "=" 
How and why does this work  ( I tested it and you are correct )  but it seems out of typical language.

Thanks!

Chris
5  Using Arduino / Programming Questions / C/C++ question on enumerators? on: March 01, 2011, 09:54:07 pm
Can I apply Mathematical operations on the enum?

i.e.  some nonsensical code
Code:
enum animal {
  CAT       = 1,
  DOG       = 2,
  Elephant  = 3,
  Monkey   = 4
}
...

animal things = ;

for (things = CAT; things <= Monkey; things++)
{
  ...

}

Mainly what I question is;    can I do the    "things++"   ?

if so, what would happen if I let it overflow ?     that is to say,   if I did not have the condition of "things <= Monkey"
and just let "things++"   run off?    would it automatically jump back down to CAT  or would it become undefined with a int value of 5+ ?

Thanks!

Chris
6  Using Arduino / Programming Questions / Re: declaring variables in the loop? (a variable scope question) on: February 24, 2011, 02:16:18 am
Static!!!  Perfect!!!  I do see!

That is exactly what I want!

Thank you oh so very much!

Chris
7  Using Arduino / Programming Questions / Re: declaring variables in the loop? (a variable scope question) on: February 24, 2011, 01:56:38 am
Nick,

Thanks for the reply;  What happens if I declare the variable in the Loop()  but don't set the value in the declaration?
is the variable the same (i.e. the same address)  or is it a new variable each time the loop such as is the case with recursion?  Or does the value remain from the last iteration?

I am used to dealing with the primary function being the main()  which doesn't loop.  It is perfectly fair to declare variables there.

Thanks,

Chris
8  Using Arduino / Programming Questions / Re: declaring variables in the loop? (a variable scope question) on: February 24, 2011, 12:12:28 am
Well, one reason for me to try not to use all globals is;  I chose the arduino over others (pic-axe etc...) because it uses C/C-like language  Which I figure what I learn programming wise will carry me further into other environments.  So programming using proper technique or close to it is important.  Too, I actually find declaring local variables to be easier.  This way, I only have to keep track of what is going on with any function I am dealing with at that time (working with little parts).

Thx,

Chris
9  Using Arduino / Programming Questions / declaring variables in the loop? (a variable scope question) on: February 23, 2011, 09:04:16 pm
Does it make sense to declare a variable in the Loop?
Would it create a new variable each time it loops through?

if you associate a value to that variable at the same time as declaring it, would it reset each loop?
i.e.

void Loop(){
int k = 10;

.
.
.
}

I realize that I can declare it as a global, but I then I get to wonder, why not declare all variables as global (other than it being sloppy memory wise)

Thx!

Chris
10  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Broken millis(), broken PWM on pins 5 and 6 on: March 27, 2008, 05:13:54 pm
I've noticed the PWM being broken on the project that I am currently working on.  Thanks for the tip! (pin, LOW) it is!

Chris
11  Forum 2005-2010 (read only) / Syntax & Programs / Re: reading - writing multiple pins simultaneously on: October 15, 2006, 06:09:18 pm
Mellis,

That is perfect!  Exactly what I needed.

With regards to the future function.  For most people, some operations would be easier not in hex.
Maybe two functions.  One hex and another where it can be loaded directly with 1's and 0's.

Or I suppose it could be a two function operation.  Not a big deal.

Thank you so very much!

ñ
12  Forum 2005-2010 (read only) / Syntax & Programs / Re: reading - writing multiple pins simultaneously on: October 14, 2006, 05:19:51 pm
Was this a real dumb question?


Hmmm, let me rephrase this.

Is there a memory location or register that I can send a value to that is in effect the "pins" themselvs?

Thanks!

ñ
13  Forum 2005-2010 (read only) / Syntax & Programs / reading - writing multiple pins simultaneously. on: October 11, 2006, 05:44:28 pm
Hey all,

Is there a way to read a byte into a variable all at once?  Or do I have to look at each pin individually? and build up the value of the variable accordingly?

Same questions applies to writing out to pins.    i.e.    can I load a variable that contains   00101110  to all the pins at once?

I don't see anything in the ref file, but that doesn't mean much...   smiley-razz

thanks,

ñ
  
14  Forum 2005-2010 (read only) / Syntax & Programs / Re: Array? on: November 27, 2006, 12:22:11 pm
Your only reading one pin at a time. and placing it into your array.  then advancing your array.

You would need a more sophisticated loop within a loop and add the values of each pin according to their position.

Or better yet, read all pins at once and place that value into your array.

Follow the link to read all pins at once  (actually the register to where they lay)

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1160606668

ñ
15  Forum 2005-2010 (read only) / Interfacing / Re: Vehicle Speed Sensor on: December 12, 2006, 12:15:34 pm
DH,

There may be a few ways to do this.

one you could ignore the voltage and just read the frequency, or the other ignore the frequence and read the voltage.

Reading the Frequency:   You could pass the the signal through a diode which will then give you half of that signal.
Pretty much giving you a clock signal that the arduino can read.    From there, I would create a look up table for the speeds.   This of course will take some experimentation and calibration.


Reading the voltage.   It has been a while since I fussed with electronics (until recently again)  But here I think you would use a bridge rectifier to convert the AC signal to a DC one.  Though I am not sure how you would clip the signal.  And here too you would probably need to create a look up table.



Not sure if this helps, but may give you a direction to look in...  or maybe a direction to look away from.http://www.arduino.cc/yabbfiles/Templates/Forum/default/wink.gif

Cheers

ñ


Pages: [1] 2 3 4