IoT Ox


Oxford CWM 2017 Microcontroller Lab

You are viewing an older revision! See the latest version

Analog Logic

Table of Contents

    analoglogic.h

    The script is to get the time from the chip and scale the variables in order to draw a analog clock. Throughout the whole code, in order to use the touch screen , we divided the screen into specific areas. If those areas are interacted by the user, the code runs the loop. In every interface, we used the same logic.

    "runanaclock" function gets the time from the Tiny RTC module with DS1307 clock chip , scales them to the polar coordinates and uses basic trigonometry to draw a line from the center to the corresponding points. In order to erase the previous moving hand, we decided to draw a black line on to the previous moving hand as seen in the code.

    Repository: MainSketch


    All wikipages