Temperaturna komora sa dodatom regulacijom.

Dependencies:   mbed Adafruit_GFX DS1820

Committer:
tzwell
Date:
Thu Nov 11 19:04:21 2021 +0000
Revision:
0:d859694d093c
Child:
1:aa2a0b18bdb1
First publish first commit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tzwell 0:d859694d093c 1 /*
tzwell 0:d859694d093c 2 * Primer regulacije osvetljaja diode LED2 pomoću potenciometra POT1
tzwell 0:d859694d093c 3 * pisan za STM32L476RG napisan koristeci mbed.h biblioteku.
tzwell 0:d859694d093c 4 *
tzwell 0:d859694d093c 5 * Katedra za Elektroniku i digitalne sisteme
tzwell 0:d859694d093c 6 * Elektrotehnicki fakultet
tzwell 0:d859694d093c 7 * Beograd
tzwell 0:d859694d093c 8 *
tzwell 0:d859694d093c 9 * Novembar 2021.
tzwell 0:d859694d093c 10 *
tzwell 0:d859694d093c 11 */
tzwell 0:d859694d093c 12
tzwell 0:d859694d093c 13 /*
tzwell 0:d859694d093c 14 * Biblioteke za uvoz:
tzwell 0:d859694d093c 15 */
tzwell 0:d859694d093c 16 #include "mbed.h"
tzwell 0:d859694d093c 17
tzwell 0:d859694d093c 18 /*
tzwell 0:d859694d093c 19 * Definisanje makroa:
tzwell 0:d859694d093c 20 */
tzwell 0:d859694d093c 21 #define INCREMENT 0.1f
tzwell 0:d859694d093c 22 /*
tzwell 0:d859694d093c 23 * Globalne promenljive:
tzwell 0:d859694d093c 24 */
tzwell 0:d859694d093c 25 PwmOut blue_led(PB_15); // Kreiranje promenljive diode
tzwell 0:d859694d093c 26 AnalogIn potentiometer(PA_0); // Kreiranje promenljive potenciometra POT1
tzwell 0:d859694d093c 27
tzwell 0:d859694d093c 28 /*
tzwell 0:d859694d093c 29 * Deklaracija funkcija:
tzwell 0:d859694d093c 30 */
tzwell 0:d859694d093c 31
tzwell 0:d859694d093c 32
tzwell 0:d859694d093c 33 /*
tzwell 0:d859694d093c 34 * Glavna funkcija:
tzwell 0:d859694d093c 35 */
tzwell 0:d859694d093c 36 int main()
tzwell 0:d859694d093c 37 {
tzwell 0:d859694d093c 38
tzwell 0:d859694d093c 39 // Inicijalizacija i funckije koje se jednom izvrsavaju:
tzwell 0:d859694d093c 40
tzwell 0:d859694d093c 41 // Glavna petlja:
tzwell 0:d859694d093c 42 while(true)
tzwell 0:d859694d093c 43 {
tzwell 0:d859694d093c 44 blue_led.write(potentiometer.read());
tzwell 0:d859694d093c 45 //ili:
tzwell 0:d859694d093c 46 // blue_led = potentiometer;
tzwell 0:d859694d093c 47 }
tzwell 0:d859694d093c 48 }
tzwell 0:d859694d093c 49
tzwell 0:d859694d093c 50
tzwell 0:d859694d093c 51 /*
tzwell 0:d859694d093c 52 * Definicija funkcija:
tzwell 0:d859694d093c 53 */