We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey colleges, i need your question in this point: I want to write a clock in the style of dominoe. I've already programmed the hours, but the minutes are a bit harder to me. The minutes have to be divided into the first and the second number. Here's an example: Minute 42 becomes 4 and 2. Is Processing able to give me these numbers individually?
Check out this image for better understanding of what i want to do.
Thank's alot for your help! :)
Answers
NB integer division
Thank's alot for your fast answer, that seems to work! :)
I've another beginners questions regarding the hours. How do i map the hours from 1-24 to 1-12? Whenever i use float hour() = map(hour(),0, 23, 0, 12) i get an error message. Thank's in advance. ;)
How about
if ((hours %= 12) == 0) hours = 12;
? (*)you can't assign anything to hour(), it's a method. h is fine though.
also, why would it be a float?
Thank's alot for these fast answers. I'm currently working on the code and everything works fine now.
Thank you! :)