first steps for time
This commit is contained in:
parent
b555118efa
commit
2769d52fc9
|
@ -14,6 +14,29 @@ int main(void) {
|
|||
io.setActiveLED(true);
|
||||
io.activateChargers();
|
||||
|
||||
time_t testStamp;
|
||||
|
||||
time(&testStamp);
|
||||
|
||||
char charTime[255];
|
||||
|
||||
dtostrf(testStamp, 4, 2, charTime);
|
||||
serialSend("Time: ");
|
||||
serialSend (charTime);
|
||||
serialSend(" \r\n");
|
||||
|
||||
_delay_ms(1000);
|
||||
|
||||
|
||||
time(&testStamp);
|
||||
|
||||
dtostrf(testStamp, 4, 2, charTime);
|
||||
serialSend("Time: ");
|
||||
serialSend (charTime);
|
||||
serialSend(" \r\n");
|
||||
|
||||
_delay_ms(1000);
|
||||
|
||||
/* create charger */
|
||||
|
||||
s_charger charger_settings;
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
/* system header */
|
||||
#include <avr/io.h>
|
||||
#include <string.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
/* project header */
|
||||
#include "ioController.h"
|
||||
#include "multiplexer.h"
|
||||
#include "charger.h"
|
||||
|
||||
/* PINS */
|
||||
/* Pins */
|
||||
#define WS2812B PD2
|
||||
#define ACTIVELED PB5
|
||||
#define PROBE15V PC1
|
||||
|
@ -23,6 +26,7 @@
|
|||
#define S1 PD6
|
||||
#define S0 PD5
|
||||
|
||||
/* Serial */
|
||||
#define BUAD 9600
|
||||
#define BUAD_RATE_CALC ((F_CPU/16/BUAD) - 1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue