Show Posts
Pages: 1 ... 129 130 [131] 132 133 ... 361
1951  Using Arduino / Programming Questions / Re: How to start a loop with a manual switch on: July 22, 2013, 09:38:19 pm
Where can I find info on what can be used in setup?  GoForSmoke, are you saying I can put a complete button routine in setup?

You can put a 1 time test in setup, and I would suggest 2 tests, one right after the other

while ( button not pressed ); // this test will happen until the button is pressed
// the next test will start before you can possibly let the button go
// next test waits for the button to be released for 1/10th of a second
// if the button 'bounces', the 1/10th second starts back up
// 1/10th second is a very long time to Arduino but a short time in button press & release
startTime = millis();
while (( button pressed ) || ( millis() - startTime < 100 ))
  if ( button pressed )
     startTime = millis();
// see what it takes to be reasonably sure? and still something may get around it!

1952  Using Arduino / Programming Questions / Re: Problem with Serial Communication Loop on: July 22, 2013, 07:34:35 pm
Thank you all for answering my question.

There's still one thing that is not clear to me... it's zoomkat's while loop

while (Serial.available()) {
    char c =;
    readString += c;

why is there a delay()?

To keep the controller from doing anything while waiting longer for the next serial character to arrive than it should, and save on actually coding an end-of-line check.
1953  Using Arduino / Programming Questions / Re: How to start a loop with a manual switch on: July 22, 2013, 04:25:50 pm
If you put the test in setup then you don't have to keep it on and can even use it for something else.

However these simple check the switch methods are all vulnerable to switch bouncing.
1954  Using Arduino / Programming Questions / Re: Strange behaviour if Serial Monitor on on: July 22, 2013, 04:18:55 pm
Did you have the diode across the relay? If not that would have caused back EMF spikes that could have disrupted either the arduino's code or the serial monitor.

I got a bunch of cheap ULN2803's just because they have backsurge protection built-in, and at 5 for US$0.75 I couldn't resist.
1955  Community / Bar Sport / Re: battery density on: July 22, 2013, 04:25:58 am
I wonder if something could be done using polarized filters?
1956  Community / Bar Sport / Re: battery density on: July 21, 2013, 04:22:11 pm
Up until about a year ago I used to fit the LED in routed grooves in a plastic front panel, to shade each row of LEDs.
It was fiddly and expensive to do, and if the board was pointed towards the North East the sun still got to the LEDs in late afternoon ( we are in the Southern hemisphere )

  ( I love it when they ask for a southern facing board so it is always shaded )

Now the LEDs are so bright that shading is not needed, but it still needs a double row :-

And you have problems with powering and heat.

These are leant back looking straight into the sun so not shaded by the grooves, and are perfectly clear.

The latest ones are even better, and for evening sport the auto dimming I have had to fit turns them right down to less than 10% duty cycle.

One of the problems is that schools and clubs want the scoreboard across the field from the clubhouse, often where there is no power.
Sinking cable around the field is very expensive, and could kill the sale, so if I can get affordable solar panels ( and deep cycle battery ) it might swing some sales.

The shop I worked at made the "Odds Windows" for the Delaware Race Track (horse races, long field, big stands, etc) IIRC in 1980 or 81. Every set of lights to make 1 digit/character set at the bottom of an open front box perhaps 20 cm deep. The box grid was made of 1/2 mm aluminum strips with slits that horizontal and vertical interlocked. Using aluminum strips to go in a steel frame was probably not a great idea (dissimilar metals, eventual corrosion) but it worked well.

You could try just for your own look-at, find a cardboard box big enough and set digits inside with the front open and see what that does to your power requirements. Less would help, wouldn't it?

I don't know about Africa but here the sun is not so bright when it's low in the sky.
1957  Community / Bar Sport / Re: battery density on: July 21, 2013, 10:46:02 am
Have you tried shading the board?
1958  Community / Bar Sport / Re: battery density on: July 21, 2013, 08:13:34 am
That has all the sounds of a need to be met. How much solution can they afford?

1959  Using Arduino / Programming Questions / Re: Strange behaviour if Serial Monitor on on: July 21, 2013, 07:49:07 am
This gets more interesting to me. I have not begun to play with relays. My ideas are more in the stone wheel category of not switching house AC faster than 1 second apart and try to engineer needs for longer periods than that.

1960  Community / Bar Sport / Re: "The Physics Problem" on: July 21, 2013, 07:35:28 am
And note that the speed you can take a certain radius turn will be different in a level turn vs a descending or rising turn.

Racers learn the course before trying for maximums. A good rider knows how far he or she can lean and still there is no guarantee of safety. What margin you give is the margin you get. Just because someone has killed a tiger with a stick doesn't mean to approach tigers with sticks.

1961  Using Arduino / Programming Questions / Re: Flipping between states on: July 20, 2013, 06:03:21 pm
if ( Test_State == true )
    Test_State = false;

if ( Test_State == false )
    Test_State = true;

So do you walk through your code line by line?
What happens if you start with Test_State as true?
What happens if you start with Test_State as false?

First line - if ( Test_State == true )
then what happens?
What value does Test_State have?

And when it gets to - if ( Test_State == false )
what happens?

You might want to have a read about else that goes with if:

1962  Community / Bar Sport / Re: battery density on: July 20, 2013, 04:54:20 pm
Would it be any good to use flip-dots? Or some kind of stepper-driven card rolodex?

1963  Using Arduino / Programming Questions / Re: Strange behaviour if Serial Monitor on on: July 20, 2013, 02:37:48 pm
I'll stick with a Teensy then.
1964  Community / Bar Sport / Re: battery density on: July 20, 2013, 02:34:56 pm
Look at how much less power electronics use now compared to 40-50 years ago. That trend should on the way down meet batteries on the way up.

Use of earbuds instead of speakers, leds and LCD's and other efficiencies may have room to go yet.

And there's lots of room for self-power. The hand-heat powered flashlight is one beginning. Piezos in shoe soles is another. Put solar cells in your project, been around for decades. With super-capacitor improvements to store generated power, batteries will just be another choice.

1965  Community / Bar Sport / Re: Critical thinking and programming. on: July 20, 2013, 02:24:03 pm
The ones that make a habit of playing lame do get identified and called out for it.
The ones that put in effort do enable the best help to happen for themselves, we appreciate that.

I read a lot of threads that I don't post in just to pick up tips. From the visit counts I expect that a lot of members do the same. So what help is given to one is generally also given to some/many and not wasted.
Pages: 1 ... 129 130 [131] 132 133 ... 361