hi im trying to build a dual stopwatch the timers to start together with one switch then stop with two. i am kinda new to this and cant get the code right it ether wont start or they both stop together. here is may last code i tried.
I'm not even going to try to work out what a program full of unnamed pins and uncommented single character variables is trying to do. If you know what is connected to pins 8, 9 and 10 and what the values of a, b1, b2 etc mean then you're the only one who can sort it out.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
@slipstick means like this, the variable names are self explanatory.
fix your formatting. It's a mess. Basic indentation goes a long way to understanding what's going on. Curly braces on their own lines (opening braces at the end of the line where the block starts is fine). No more than one curly brace on a line. Then press ctrl-T in the IDE and it'll look a lot nicer.
use proper names. Name your pins, name your variables properly. That makes life so much easier (and your code much more maintainable than having to hunt down all instances of pin 10).
look up variable types, and how they work. Double is a floating point type, and the wrong type to store a large integer like you get from millis(). The way a float is stored may also cause problems when you try to work with those times. You need an unsigned long for that. By the way, double and float are aliases on Arduinos.
When you follow those basic practices you have a much better chance of understanding what you're doing.
Mikeh23:
Is this possible with one Arduino or will two have to be used
A single Arduino will be basically idle >99% of the time with the work load of two stop watches and an LCD screen.
i made some changes that was said and this is what i have it will start and stop on the right side but i dont know how to code it to put the left stop in when i do it ether want start or wont stop
Thanks that works I have my lcd working to but how do I make it show the time in a decimal form like 1.08 for the 1080 it shows in Mills I tried to divide the Mills by 1000 but then it just shows me 1