Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- darzento
- Date:
- 2015-05-18
- Revision:
- 6:276d384f8483
- Parent:
- 5:2ead41027963
- Child:
- 7:11a20cba4eae
File content as of revision 6:276d384f8483:
#include "mbed.h"
/*****************************************************************************
******************************************************************************
******************************************************************************
******************************************************************************
******************************************************************************/
DigitalOut myled(LED1);
DigitalOut frame(); //Clock frame
DigitalOut dot_Point(); //Time point
BusOut hour(); //Hour hand
BusOut minute(); //Minute hand
BusOut
InterruptIn hall(); //Hall sensor sensing interrupt
void hour_hand(void);
void minute_hand(void);
void sensor()
{
}
int main()
{
hall.rise(&sensor); //rising edge operating
while(1)
{
frame = 1;
hour_hand();
minute_hand();
}
}
void hour_hand(void)
{
hour = 0x1F;
wait ();
hour = 0x00;
wait ();
}
void minute_hand(void)
{
minute = 0x0FF;
wait ();
minute = 0x00;
wait();
}
