School project help

I am a beginner at programming, we programm in c++ in school and we got a project to create a program on USB BOARD K8055. But i have no idea how to create one.
The program should be like this:
When Button1 is on(1) souldn’t do anything, but when you release button 1 it becomes off, then the program should count time till you press button 1 again :smiley:
please help, i know its very simple but i just cant do it the right way :s

Thank you, (young programmer)

Sorry, I’m sure you’ll understand that we cannot do your homework for you.
The purpose of a school project is that YOU learn something and that YOU show what you can do.
We suggest that you study the C source of the K8055 demo program. With a little modification, I’m sure it can do what you require it to do.
The forum can help with very specific questions, once you have started your project.