Loading...
  Show Posts
Pages: 1 ... 51 52 [53] 54 55 ... 59
781  Using Arduino / LEDs and Multiplexing / Re: LED and photoresistor on: January 27, 2011, 06:33:44 pm
The original code will be "true" unless the sensor is in the very very dark (or light, depends on your circuit)
Code:
if (analogRead(lightPin)) {
should be
Code:
if (analogRead(lightPin) > 500) {
Pick any value between 1 and 1023 to be the trigger value.
(If you are not using Serial.<otherfunctions> elsewhere in the code then you do not need the Serial.begin in the setup)

782  Using Arduino / Project Guidance / Re: Switch on->LED on for 5 seconds until switch is reset? on: January 27, 2011, 01:59:37 pm
Help to self-help  smiley

Download the Arduino software, and write your code. USe the Arrow-button (or Ctrl-R) to compile. You can do this without the arduino board. When you have written what you hope is the right code and it compiles without errors, then post it here, and I'll gladly comment on it.
783  Using Arduino / Project Guidance / Re: Switch on->LED on for 5 seconds until switch is reset? on: January 27, 2011, 12:34:19 pm
Yes.... in effect writing the program. It will be the same lines just with correct syntax. For this look at the http://arduino.cc/en/Reference/HomePage page and click on if() to get syntax details. Remember the two '=' inside the if - a common beginner fault.

A nearly complete example close to what you need is the http://arduino.cc/en/Tutorial/Button

Examine this, include/modify what I suggest, and see if you can work it out.

Good luck/work!
784  Using Arduino / Project Guidance / Re: Switch on->LED on for 5 seconds until switch is reset? on: January 27, 2011, 12:18:22 pm
Yes very easily:

In the loop examine the switch input pin.
  if HIGH and FLAG is LOW
    turn on the LED; wait 5 secs; turn LED off; set FLAG HIGH
  if LOW and FLAG is HIGH
    Set FLAG LOW

785  Using Arduino / Interfacing w/ Software on the Computer / Re: How to control an Arduino from a PC on: January 27, 2011, 11:53:13 am
Via the USB cable.

I suspect you are asking for something else....
786  Community / Website and Forum / Re: Bug report: profile edit fails on: January 27, 2011, 08:10:30 am
can you see my email address by mousing over the email icon (if it's visible to you)?
I have not seen your email in any way. Icons, mouse over, memberslist etc.
787  Community / Bar Sport / Typo in the forum heading? on: January 27, 2011, 02:50:10 am
Forum heading:
Quote
jokes, mobs, and all sorts of unrelated topics, shout out loud your love, and course for that burnt battery-pack
I don't get the last bit...? was course intended to be spelled  curse ?
788  Community / Website and Forum / Re: Security BUG Report: Topline shows password! on: January 26, 2011, 05:02:59 pm
I have now tested and confirmed the error on both Firefox (Win7) and Safari (on a Mac)

I tried to attach a screen shot (slightly edited to pretoect the guilty smiley-cool ) but it failed to post with it.
789  Community / Website and Forum / [SOLVED] Security BUG Report: Topline shows password! on: January 26, 2011, 04:22:41 pm
The top line shows the password, not the username, there where it says "Logged in as xyz" This also implies the password is constantly being sent in clear text.

(And no, I am not sending a screen shot ... smiley-razz)

NB: Using IE8 on WinXP in case its is browser specific
790  International / Scandinavia / Börja om från begyndelsen on: January 26, 2011, 04:16:48 pm
Hejsan alla Skandianvier, så må vi begynde fra början.  smiley-draw

Jo jag er både Svensk/Dansk og har Norska venner... och så bor jeg i Oresundregionen (which for international purposes is spelled wrong ...)

Msquare
791  Forum 2005-2010 (read only) / Forum / Re: Frequently Asked Questions on: August 03, 2010, 07:29:37 pm
I'll second that.

But  (always a "but" ...)

 who gets to decide if a question has been asked often enough? Who/what will enforce it. Moderators yes, but ... it's a lot of work.
792  Forum 2005-2010 (read only) / Troubleshooting / Re: Problem with 0021 and Arduino Uno on: November 10, 2010, 11:24:51 am
Sorry for the stupid question, but have you plugged it in? The choice of COM ports isnt populated until you have
(a) installed the USB driver (if needed)
(b) plugged it in (Which may complete step (a) as a side effect)
793  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Arduino example MIDI Note Player will not compile. on: October 02, 2010, 01:11:49 am
Hi vanakaru, as David so kindly points out, given just the error messages, is that it seems likely that a typing error (yours, the webpage, whereever) has omitted the space between the word int and the word note some where in the code. That is a good guess, because if it said "int note" that would define the variable "note" and thus elliminate both errors (defining the right names)

And - voila - your 2nd post shoing the code clear shows this.
Code:
for (intnote = 0x1E; note < 0x5A; note ++) {
should be
Code:
for (int note = 0x1E; note < 0x5A; note ++) {
794  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Strange atol results with char array on: September 14, 2010, 05:41:23 pm
Terminating nul byte of a string ? The atol does not get to know the length of the array.
Code:
char testChar1[] = {'5', '0', 0x00};
  char testChar2[] = {'9', '9', 0x00};
795  Forum 2005-2010 (read only) / Syntax & Programs / Re: Long delay on: January 20, 2011, 12:22:49 pm
Code:
delay(25200000)  // :)
It is ok, there is room for 4 294 967 296 milliseconds - it is a unsigned long parameter.

If you need to have both a one second and a 7 hour, then use the method outlined i the NoDelayBlink, where you loop and check if milli() has increased 25200000 since you last "fired" the 7 hour code. And this will be acurate, evn if your 7 hour code takes minutes of CPU time (the milli() stuff increments via a timer interrupt)

The acuracy is limited by the crystal. It will be in the same ballpark accuracy wise as any ordinary watch.
Pages: 1 ... 51 52 [53] 54 55 ... 59