Aufgabe Codeschloss Programmrumpf

Dependencies:   LCD_i2c_GSOE

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2019 ARM Limited
00003  * SPDX-License-Identifier: Apache-2.0
00004  */
00005 
00006 #include "mbed.h"
00007 #include "platform/mbed_thread.h"
00008 
00009 InterruptIn s(PA_1);
00010 InterruptIn takt(PA_6);
00011 
00012 PortOut anzeige(PortC,0x7F);
00013 DigitalOut freigabe(PC_7);
00014 DigitalOut seg7On(PC_15);
00015 
00016 int zustand=0;
00017 int nr=0;
00018 int seg7[10]={0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 
00019                 0b01101101, 0b01111101, 0b00000111, 0b01111111, 0b01101111};
00020 
00021 void hoch()
00022 {
00023 //Ihr Code Aufgabe 1
00024 }
00025 
00026 void weiter()
00027 {
00028 //Ihr Code Aufgabe 2
00029 }
00030 
00031 
00032 void init(void)
00033 {
00034     s.mode(PullDown);
00035     takt.mode(PullDown);
00036     s.rise(&hoch);
00037     takt.rise(&weiter);
00038     freigabe=0;
00039     seg7On=1;
00040 }
00041 
00042 int main()
00043 {
00044     init();
00045     while (true) {
00046      //Ihr Code Aufgabe 2
00047     }
00048 }