/*
* Project: blink4quick
* Author: Jane-Maree Howard
* Date: Tuesday 24/02/2010
* Platform: Arduino 18
* Purpose: To demonstrate variable blink times for the built-in LED
* Operation: Sets up input & output pins in setup() method;
* Declares pin definition variable
* Declares delayTime variable
* Defines loop() to perform LED blinking & delay operations
* The whole idea is to vary the delay time to the point where individual blinks
* can no longer be detected...
* The author reports that she can just detect a delay time of 14 milliseconds
*/
int ledPin = 13; // LED connected to digital pin 13
//int delayTime = 20; // LED blink delay time
//int delayTime = 15; //comment out unused delay times
int delayTime = 14; //comment out unused delay times
//int delayTime = 13; //comment out unused delay times
//int delayTime = 12; //comment out unused delay times
//int delayTime = 10; //saves rewriting variable errors
// The setup() method runs once, when the sketch starts
void setup()
{
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
}//end setup()
// Loop turns pin13 (LED) on, waits briefly, turns LED off, waitsbriefly;
// repeats endlessly while Arduino has power
void loop()
{
digitalWrite(ledPin, HIGH); // turn the LED on
delay(delayTime); // wait for 'delayTime' milliseconds
digitalWrite(ledPin, LOW); // turn the LED off
delay(delayTime); // wait for 'delayTime' milliseconds
}//end loop()
//Author just just see the delay time at 14 milliseconds
From the mail bag…
37 minutes ago
Arrrgh!!
ReplyDeleteBloody
tags not working in my program.
However, it should be OK when pasted into a sketch.
My Cut-off point is 14 milliseconds.
ReplyDeleteI really can't do better than that.
The program just uses the on-board LED with no other add-ons.
This is Task #10 in EmbeddedNotices
I've had a problem @home with COM ports. My home 'puter shows only one port (COM1) & it's being used (mouse, portable hard drive, modem) & the silly old sausage can't find any other ports, so my board won't work @home..
ReplyDeleteMaybe if I get a dinkum serial port card.. I should do that ("Hello StudyLink")