oefening

Dependencies:   C12832

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 
00007 #include "mbed.h"
00008 #include "platform/mbed_thread.h"
00009 #include "C12832.h"
00010 
00011 // Blinking rate in milliseconds
00012 #define BLINKING_RATE_MS 500
00013 
00014 
00015 
00016 AnalogIn pot1 (A0);
00017 AnalogIn pot2 (A1);
00018 PwmOut r (D5);
00019 PwmOut g (D8);
00020 PwmOut b (D9);
00021 
00022 int main()
00023 {
00024     while(1){
00025     r = (float)pot1;
00026     g = (float)pot2;
00027     b = (float)pot1;
00028     wait(0.1);
00029     }
00030 }
00031 
00032 
00033 
00034 
00035