wiring-sucks

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit fc987358731972531ff250d45fd791da98bfb98e
parent 6bc163953859a2744ba88e4cca091d28da3d9626
Author: Elecon-rou <quest90spin@gmail.com>
Date:   Thu, 10 Nov 2016 22:04:46 +0300

Fix CPU delay time; edit.gitignore

Diffstat:
M.gitignore | 3+--
MArduino.h | 2--
MMakefile | 4++--
Mconfig.mk | 2+-
Mprogram.cpp | 4++--
5 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,2 @@ -WApplet -WApplet.bin +applet.bin *.o \ No newline at end of file diff --git a/Arduino.h b/Arduino.h @@ -20,8 +20,6 @@ #ifndef Arduino_h #define Arduino_h -#include <util/delay.h> - #include <stdlib.h> #include <stdbool.h> #include <string.h> diff --git a/Makefile b/Makefile @@ -38,8 +38,8 @@ applet: $(OBJS) $(CXX) $^ -o $@.o $(OBJCOPY) $@.o $@.bin -flash: applet - avrdude -p m328p -c arduino -P $(SERIAL) -U flash:w:$^.bin +flash: + avrdude -p m328p -c arduino -P $(SERIAL) -U flash:w:applet.bin clean: rm -f applet.bin *.o diff --git a/config.mk b/config.mk @@ -2,7 +2,7 @@ MCU=atmega328p SERIAL= /dev/ttyACM0 -CFLAGS= -Os -mmcu=$(MCU) -I. +CFLAGS= -Os -mmcu=$(MCU) -I. -Iinclude -DF_CPU=16000000L CC=avr-gcc $(CFLAGS) CXX=avr-g++ $(CFLAGS) diff --git a/program.cpp b/program.cpp @@ -10,7 +10,7 @@ void setup() void loop() { digitalWrite(ledPin, HIGH); // set the LED on - delay(1600); // wait for a second + delay(10000); // wait for a second digitalWrite(ledPin, LOW); // set the LED off - delay(900); // wait for a second + delay(1000); // wait for a second } \ No newline at end of file