// Diese Software testet die verschiedenen Funktionen des NUClight V3 Boards  
// BULME Graz,     
// by F. Wolf   01.11.2019
/*
                             PIN-OUT-NUClight
                                NUCLEO-L432KC
                     RGB-rot   D1|-------| VIn
                     RGB-gruen D0|       | GND
                             NRST|       | RST
                              GND|       | 5V0
                        LED1 <-D2|       | A7
                        LED2 <-D3|       | A6 -> LED7
SDA (I2C)  (MPU6050 gyro)   <- D4|       | A5
SCL (I2C)  (MPU6050 gyro)   <- D5|       | A4
                        LED3 <-D6|       | A3 -> POTI
                            nc D7|       | A2 -> Taster
                            nc D8|       | A1 -> Taster
                         LED4  D9|       | A0 -> DS18B20
                  RGB-blau <- D10|       | ARF
                      LED5 <- D11|       | 3V0
                      LED6 <- D12|-------| D13 -> LED8
        
 RGB LED aktiv hight (1)       
 */  

/*
;platformio.ini


[env:nucleo_l432kc]
platform = ststm32
board = nucleo_l432kc
framework = mbed


monitor_speed = 9600
monitor_port = COM3

upload_speed = 115200
upload_port = COM3

lib_deps =
    # Lib: DS1820
    3127
*/

#include "mbed.h"

 //****** Definitionen **********************
Serial pc(SERIAL_TX,SERIAL_RX);  //nucleo
 
// Definition der Taster (Switches)
InterruptIn sw1(A1); 

// Definition der 8 LED's
DigitalOut led1(D2);

  
// **********  Hauptprogramm ************** 
int main()
{
    pc.printf("******** TEST-SW *************\r\n"); //HTerm Welcome Message  
    pc.printf("B0-start-LED\r\n"); //HTerm Welcome Message 
    pc.printf("*******************************\r\n"); //HTerm Welcome Message 
    while(1)
    {
        led1=!led1;    //Led1 togglen
        wait(1);
    }  
}
/********************   ENDE  ***********************/