From e5f0386dc112b33b06815209ca05997ebf93e454 Mon Sep 17 00:00:00 2001 From: Tristan Krause Date: Fri, 7 Jun 2019 09:58:58 +0200 Subject: [PATCH] handbuch update --- control/examples/diode/Makefile | 30 ++++++++++++++++++++++++++ control/examples/{ => diode}/main.cpp | 23 +++----------------- control/examples/diode/test_plot | Bin 0 -> 256 bytes control/src/README.md | 17 +++++++++++---- 4 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 control/examples/diode/Makefile rename control/examples/{ => diode}/main.cpp (89%) create mode 100644 control/examples/diode/test_plot diff --git a/control/examples/diode/Makefile b/control/examples/diode/Makefile new file mode 100644 index 0000000..8000d6e --- /dev/null +++ b/control/examples/diode/Makefile @@ -0,0 +1,30 @@ +# Name: Makefile +# Project: B15F (board15 Famulus Edition) +# Author: Tristan Krause +# Creation Date: 2019-05-15 + +# Environment +COMPILER_PATH = g++ + +# Options +CFLAGS = -std=c++17 -O3 -Wall -Wextra +LDFLAGS = -lb15fdrv +OBJECTS = main.o +OUT = main.elf + +COMPILE = $(COMPILER_PATH) $(CFLAGS) + +main: $(OBJECTS) + $(COMPILE) $(OBJECTS) -o $(OUT) $(LDFLAGS) + +help: + @echo "This Makefile has the following targets:" + @echo "make main .... to compile" + @echo "make clean ... to delete objects and executables" + +clean: + @echo "Cleaning..." + rm -f $(OBJECTS) $(OUT) *.bin gnuplotscript.gp + +.cpp.o: + $(COMPILE) -c $< -o $@ diff --git a/control/examples/main.cpp b/control/examples/diode/main.cpp similarity index 89% rename from control/examples/main.cpp rename to control/examples/diode/main.cpp index b121dd3..694664d 100644 --- a/control/examples/main.cpp +++ b/control/examples/diode/main.cpp @@ -1,7 +1,7 @@ #include #include -#include "drv/b15f.h" -#include "drv/plottyfile.h" +#include +#include void kennlinieErsterQuadrant() @@ -156,23 +156,6 @@ void testFunktionen() int main() { //testFunktionen(); - //kennlinieZweiterQuadrant(); - - B15F& drv = B15F::getInstance(); - while(1) - { - //uint8_t be0 = drv.digitalRead0(); - //uint8_t be1 = drv.digitalRead1(); - //uint8_t dsw = drv.readDipSwitch(); - drv.analogRead(0); - drv.analogRead(1); - drv.analogRead(2); - drv.analogRead(3); - drv.analogRead(4); - drv.analogRead(5); - drv.analogRead(6); - drv.analogRead(7); - } - + kennlinieZweiterQuadrant(); std::cout << "Schluss." << std::endl; } diff --git a/control/examples/diode/test_plot b/control/examples/diode/test_plot new file mode 100644 index 0000000000000000000000000000000000000000..8b8b43f9dcab013e4ad8d6a4d99d3ebbaedbca95 GIT binary patch literal 256 zcmb332nqMr^$7P#O!9SMWME)$W@2S9V$flfWC-H|a={=pzS=#w7S08WdpGym) literal 0 HcmV?d00001 diff --git a/control/src/README.md b/control/src/README.md index 09e7b82..04983b8 100644 --- a/control/src/README.md +++ b/control/src/README.md @@ -8,11 +8,11 @@ (b) **sudo apt-get install git avr-libc avrdude libncurses5-dev g++** ### 2. Das Repository klonen - (a) **cd /tmp** + (a) **cd /home/famulus/** (b) **git clone "https://github.com/devfix/b15f.git"** ### 3. Die Firmware installieren - (a) **cd "/tmp/b15f/firmware"** + (a) **cd "/home/famulus/b15f/firmware"** (b) Passen Sie in der Datei *Makefile* die Option "MCU = ..." an die MCU des vorliegenden Boards an (*atmega1284* und *atmega1284p* sind nicht identisch!) @@ -25,16 +25,25 @@ (d II) **sudo make upload** ### 4. Die Steuersoftware (Bibliothek & CLI) installieren - (a) **cd "/tmp/b15f/control/src"** + (a) **cd "/home/famulus/b15f/control/src"** (b) **make** (Die Warnungen durch doxygen können ignoriert werden.) (c) **sudo make install** +## Aktualisierung + (a) **cd /home/famulus/b15f/** + (b) **git pull --prune** + (c) **cd "/home/famulus/b15f/firmware"** + (d) **make clean** + (e) **cd "/home/famulus/b15f/control/src"** + (f) **make clean** + (g) Installation ab Schritt 3 wiederholen + ## Das CommandLineInterface (CLI) benutzen (a) Öffnen Sie ein Terminal und maximieren Sie das Fenster (b) Start des CLI erfolgt durch **b15fcli** - (c) Die Navigation erolgt durch <Tab>, die Pfeiltasten und <Enter> oder die Maus + (c) Die Navigation erfolgt durch <Tab>, die Pfeiltasten und <Enter> oder die Maus (d) Mit <Strg + c> kann das Programm sofort verlassen werden ## Eigene Programme mit B15F schreiben