Make a clock face consisting on a big white circle. Give it just one hand, the "seconds" hand. Make it a black line. Make it tick in the way a seconds hand ticks. Number the 12, 3, 6 and 9 points on your clock. Don't worry about the minutes and hours hands.
This forum is not for handing out code. Explain why you are stuck writing this yourself and post your efforts so far. Someone will help you from there
You can get the number of milliseconds that have passed since the sketch started using millis(). Divide that by 1000 to get seconds (instead of milliseconds) and then plug that into rotate()
You will have to map the value, every 60 seconds (or 60000 milliseconds) rotate will have to be back where it was. In other words, make it so that rotate accomplishes TWO_PI rotations (same as 360 degrees) every 60 seconds
There is a seconds() method that fits better than millis() IMO
No full code solutions please.
ban angel fire
Light the fires, burn the heretics! This is the result of over zealousness! >:)
really, he posted 4 times just the texts for assignments...
angelfire101 is posting homework questions and asking for code solutions (see here). That is called cheating. We are not here to support cheats.
@angelfire101 if you continue to ask for code solutions for what is obviously a school assignment you risk being banned.
If you want further help with this problem please post the code that you have produced in attempting to solve the problem.
Will members please wait for angelfire101's code before posting any further help.
If I had to crack this one, I would want to know about circular functions, (sin() cos() - see reference/wikipedia) aka trigonometry.
A clock is a circle… And it has 60 seconds, a circle has 360 degrees… seems easy math :)
Note that sin() and cos() are expecting radians, theres a handy function by that name also.
yeah, there is a nice tutorial on trigonometry
but reading that means real work...