132

Dependencies:   mbed OneWire TextLCD

main.cpp

Committer:
lucem1n
Date:
2019-07-01
Revision:
3:20874daf248d
Parent:
2:ad0b044d0a10

File content as of revision 3:20874daf248d:

#include "mbed.h"
#include <OneWire.h> 
#include <TextLCD.h>

/*  (Для NUCLEO-F401RE
    1 > GND
    2 > 5V
    3 > n/c
    4 > PA_13 (rs)
    5 > GND
    6 > PA_14 (e)
    7-10 > n/c
    11 > PC_13
    12 > PB_13
    13 > PB_14
    14 > PB_15 
    15 > GND
    16 > 5V    */

TextLCD lcd(PA_13, PA_14, PC_13, PB_13, PB_14, PB_15, TextLCD::LCD20x2); // rs, e, d4-d7
uint8_t count[] = {0x20, 0x20, 0x4F, 0xCF, 0xD3, 0x43, 0x54, 0xC8, 0x54, 0x45, 0x20, 0xC4, 0x45, 0x48, 0x42, 0xC3, 0xC8, 0x20, 0x20, 0x20} ;
uint8_t count1[] = {0x80, 0x42, 0x48, 0x45, 0x43, 0x45, 0x48, 0x4F, 0x3A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xC0, 0x8C, 0x20, 0x20, 0x35, 0x2E, 0x30, 0x30};


int main() { 

//for (i++){
    lcd.locate(0,1);
   lcd.putc(count1[2]);
   lcd.putc(count1[3]);
   lcd.putc(count1[4]);
    //count+=1;
    //wait(0.1);
    //if(i==19) {i=0;} }
    //lcd.printf("%02X", count1[7]);
}