Changed to OOP
This commit is contained in:
parent
a79ffbd912
commit
9862d1cf51
22
Arduino/Zeit/Zeit-V2.sln
Normal file
22
Arduino/Zeit/Zeit-V2.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zeit-V2", "Zeit-V2\Zeit-V2.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.ino.elf
Normal file
BIN
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.ino.elf
Normal file
Binary file not shown.
1337
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.ino.hex
Normal file
1337
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.ino.hex
Normal file
File diff suppressed because it is too large
Load Diff
1
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.log
Normal file
1
Arduino/Zeit/Zeit-V2/Debug/Zeit-V2.log
Normal file
@ -0,0 +1 @@
|
||||
|
308
Arduino/Zeit/Zeit-V2/Debug/board.buildinfo
Normal file
308
Arduino/Zeit/Zeit-V2/Debug/board.buildinfo
Normal file
@ -0,0 +1,308 @@
|
||||
name=Arduino/Genuino Uno
|
||||
vid.0=0x2341
|
||||
pid.0=0x0043
|
||||
vid.1=0x2341
|
||||
pid.1=0x0001
|
||||
vid.2=0x2A03
|
||||
pid.2=0x0043
|
||||
vid.3=0x2341
|
||||
pid.3=0x0243
|
||||
upload.tool=avrdude
|
||||
upload.protocol=arduino
|
||||
upload.maximum_size=32256
|
||||
upload.maximum_data_size=2048
|
||||
upload.speed=115200
|
||||
bootloader.tool=avrdude
|
||||
bootloader.low_fuses=0xFF
|
||||
bootloader.high_fuses=0xDE
|
||||
bootloader.extended_fuses=0x05
|
||||
bootloader.unlock_bits=0x3F
|
||||
bootloader.lock_bits=0x0F
|
||||
bootloader.file=optiboot/optiboot_atmega328.hex
|
||||
build.mcu=atmega328p
|
||||
build.f_cpu=16000000L
|
||||
build.board=AVR_UNO
|
||||
build.core=arduino
|
||||
build.variant=standard
|
||||
runtime.ide.path=D:\Programme\Arduino
|
||||
build.system.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\system
|
||||
runtime.ide.version=10607
|
||||
target_package=arduino
|
||||
target_platform=avr
|
||||
runtime.hardware.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr
|
||||
originalid=uno
|
||||
intellisense.tools.path={runtime.tools.avr-gcc.path}/
|
||||
intellisense.include.paths={intellisense.tools.path}avr/include/;{intellisense.tools.path}/avr/include/avr/;{intellisense.tools.path}lib\gcc\avr\4.8.1\include
|
||||
tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram
|
||||
tools.atprogram.cmd.setwinpath=true
|
||||
tools.atprogram.program.params.verbose=-v
|
||||
tools.atprogram.program.params.quiet=-q
|
||||
tools.atprogram.program.pattern="{cmd.path}" -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"
|
||||
tools.atprogram.program.xpattern="{cmd.path}" {AVRSTUDIO_BACKEND_CONNECTION} -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"
|
||||
tools.atprogram.erase.params.verbose=-v
|
||||
tools.atprogram.erase.params.quiet=-q
|
||||
tools.atprogram.bootloader.params.verbose=-v
|
||||
tools.atprogram.bootloader.params.quiet=-q
|
||||
tools.atprogram.bootloader.pattern="{cmd.path}" -d {build.mcu} {bootloader.verbose} program -c -f "{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}"
|
||||
version=1.6.11
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra
|
||||
compiler.path={runtime.tools.avr-gcc.path}/bin/
|
||||
compiler.c.cmd=avr-gcc
|
||||
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD
|
||||
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections
|
||||
compiler.c.elf.cmd=avr-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp
|
||||
compiler.cpp.cmd=avr-g++
|
||||
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
|
||||
compiler.ar.cmd=avr-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=avr-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=avr-objcopy
|
||||
compiler.ldflags=
|
||||
compiler.size.cmd=avr-size
|
||||
build.extra_flags=
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.objcopy.eep.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
||||
archive_file_path=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\core.a
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
|
||||
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
|
||||
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
|
||||
preproc.includes.flags=-w -x c++ -M -MG -MP
|
||||
recipe.preproc.includes="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.includes.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}"
|
||||
preproc.macros.flags=-w -x c++ -E -CC
|
||||
recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}"
|
||||
tools.avrdude.path={runtime.tools.avrdude.path}
|
||||
tools.avrdude.cmd.path={path}/bin/avrdude
|
||||
tools.avrdude.config.path={path}/etc/avrdude.conf
|
||||
tools.avrdude.upload.params.verbose=-v
|
||||
tools.avrdude.upload.params.quiet=-q -q
|
||||
tools.avrdude.upload.params.noverify=-V
|
||||
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
tools.avrdude.program.params.verbose=-v
|
||||
tools.avrdude.program.params.quiet=-q -q
|
||||
tools.avrdude.program.params.noverify=-V
|
||||
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
tools.avrdude.erase.params.verbose=-v
|
||||
tools.avrdude.erase.params.quiet=-q -q
|
||||
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
|
||||
tools.avrdude.bootloader.params.verbose=-v
|
||||
tools.avrdude.bootloader.params.quiet=-q -q
|
||||
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
|
||||
tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}
|
||||
build.usb_manufacturer="Unknown"
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
vm.platform.root.path=D:\Programme\Visual Studio\Common7\IDE\Extensions\hunc4op4.xpd\Micro Platforms\arduino16x
|
||||
avrisp.name=AVR ISP
|
||||
avrisp.communication=serial
|
||||
avrisp.protocol=stk500v1
|
||||
avrisp.program.protocol=stk500v1
|
||||
avrisp.program.tool=avrdude
|
||||
avrisp.program.extra_params=-P{serial.port}
|
||||
avrispmkii.name=AVRISP mkII
|
||||
avrispmkii.communication=usb
|
||||
avrispmkii.protocol=stk500v2
|
||||
avrispmkii.program.protocol=stk500v2
|
||||
avrispmkii.program.tool=avrdude
|
||||
avrispmkii.program.extra_params=-Pusb
|
||||
usbtinyisp.name=USBtinyISP
|
||||
usbtinyisp.protocol=usbtiny
|
||||
usbtinyisp.program.tool=avrdude
|
||||
usbtinyisp.program.extra_params=
|
||||
arduinoisp.name=ArduinoISP
|
||||
arduinoisp.protocol=arduinoisp
|
||||
arduinoisp.program.tool=avrdude
|
||||
arduinoisp.program.extra_params=
|
||||
usbasp.name=USBasp
|
||||
usbasp.communication=usb
|
||||
usbasp.protocol=usbasp
|
||||
usbasp.program.protocol=usbasp
|
||||
usbasp.program.tool=avrdude
|
||||
usbasp.program.extra_params=-Pusb
|
||||
parallel.name=Parallel Programmer
|
||||
parallel.protocol=dapa
|
||||
parallel.force=true
|
||||
parallel.program.tool=avrdude
|
||||
parallel.program.extra_params=-F
|
||||
arduinoasisp.name=Arduino as ISP
|
||||
arduinoasisp.communication=serial
|
||||
arduinoasisp.protocol=stk500v1
|
||||
arduinoasisp.speed=19200
|
||||
arduinoasisp.program.protocol=stk500v1
|
||||
arduinoasisp.program.speed=19200
|
||||
arduinoasisp.program.tool=avrdude
|
||||
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}
|
||||
usbGemma.name=Arduino Gemma
|
||||
usbGemma.protocol=arduinogemma
|
||||
usbGemma.program.tool=avrdude
|
||||
usbGemma.program.extra_params=
|
||||
usbGemma.config.path={runtime.platform.path}/bootloaders/gemma/avrdude.conf
|
||||
stk500.name=Atmel STK500 development board
|
||||
stk500.communication=serial
|
||||
stk500.protocol=stk500
|
||||
stk500.program.protocol=stk500
|
||||
stk500.program.tool=avrdude
|
||||
stk500.program.extra_params=-P{serial.port}
|
||||
buspirate.name=BusPirate as ISP
|
||||
buspirate.communication=serial
|
||||
buspirate.protocol=buspirate
|
||||
buspirate.program.protocol=buspirate
|
||||
buspirate.program.tool=avrdude
|
||||
buspirate.program.extra_params=-P{serial.port}
|
||||
runtime.tools.avrdude.path=D:\Programme\Arduino\hardware\tools\avr
|
||||
runtime.tools.avrdude-6.0.1-arduino5.path=D:\Programme\Arduino\hardware\tools\avr
|
||||
runtime.tools.avr-gcc.path=D:\Programme\Arduino\hardware\tools\avr
|
||||
runtime.tools.avr-gcc-4.8.1-arduino5.path=D:\Programme\Arduino\hardware\tools\avr
|
||||
runtime.vm.boardinfo.id=uno
|
||||
runtime.vm.boardinfo.name=uno
|
||||
runtime.vm.boardinfo.desc=Arduino/Genuino Uno
|
||||
runtime.vm.boardinfo.src_location=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11
|
||||
ide.hint=For use with Arduino.cc 1.6.2+ ide
|
||||
ide.location.key=Arduino16x
|
||||
ide.location.ide.winreg=Arduino 1.6.x Application
|
||||
ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook
|
||||
ide.location.sketchbook.preferences=sketchbook.path
|
||||
ide.default.revision_name=1.6.9
|
||||
ide.default.version=10609
|
||||
ide.default.package=arduino
|
||||
ide.default.platform=avr
|
||||
ide.multiplatform=true
|
||||
ide.includes=arduino.h
|
||||
ide.exe_name=arduino
|
||||
ide.platformswithoutpackage=false
|
||||
ide.includes.fallback=wprogram.h
|
||||
ide.extension=ino
|
||||
ide.extension.fallback=pde
|
||||
ide.versionGTEQ=160
|
||||
ide.exe=arduino.exe
|
||||
ide.hosts=atmel
|
||||
ide.url=http://arduino.cc/en/Main/Software
|
||||
ide.help.reference.path=reference\arduino.cc\en\Reference
|
||||
ide.help.reference.path2=reference\www.arduino.cc\en\Reference
|
||||
ide.help.reference.serial=reference\www.arduino.cc\en\Serial
|
||||
vm.debug=true
|
||||
software=ARDUINO
|
||||
ssh.user.name=root
|
||||
ssh.user.default.password=arduino
|
||||
ssh.host.wwwfiles.path=/www/sd
|
||||
build.working_directory={runtime.ide.path}
|
||||
ide.location.preferences.portable={runtime.ide.path}\portable
|
||||
ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt
|
||||
ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt
|
||||
ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15
|
||||
ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15
|
||||
ide.contributions.boards.allow=true
|
||||
ide.contributions.boards.ignore_unless_rewrite_found=true
|
||||
ide.contributions.libraries.allow=true
|
||||
ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
|
||||
ide.create_platforms_from_boardsTXT.teensy=build.core
|
||||
ide.appid=arduino16x
|
||||
location.sketchbook=C:\Users\schell\Documents\Arduino
|
||||
build.core.vmresolved=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino
|
||||
build.core.parentfolder.vmresolved=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores
|
||||
build.core.coresparentfolder.vmresolved=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11
|
||||
vm.core.include=arduino.h
|
||||
vm.boardsource.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11
|
||||
runtime.platform.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11
|
||||
vm.platformname.name=avr
|
||||
build.arch=AVR
|
||||
build.variant.vmresolved=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard
|
||||
build.architecture=avr
|
||||
vmresolved.compiler.path=D:\Programme\Arduino\hardware\tools\avr\bin\
|
||||
vmresolved.tools.path=D:\Programme\Arduino\hardware\tools\avr
|
||||
vm.runtime.compiler.showwarnings=false
|
||||
vm.runtime.upload.verbose=true
|
||||
vm.runtime.upload.verify=true
|
||||
vm.runtime.compiler.auto_discover_includes=true
|
||||
vm.last.buildpath=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno
|
||||
vm.build.verbose_build_properties=false
|
||||
build.source.path=C:\Users\schell\Documents\Arduino\Zeit-V2\Zeit-V2\Zeit-V2.ino
|
||||
build.path=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno
|
||||
PreProcessor.HeaderCount=1
|
||||
PreProcessor.PrototypeCount=4
|
||||
vm.last.preproc.file.0.file=Zeit-V2.ino
|
||||
vm.last.preproc.file.0.offset=1
|
||||
vm.last.preproc.file.0.length=369
|
||||
vm.last.preproc.file.0.linecount=21
|
||||
vm.last.preproc.file.0.linestart=0
|
||||
vm.last.preproc.file.0.lineend=21
|
||||
vm.last.preproc.file.0.prefix_lines=0
|
||||
vm.last.preproc.file.1.file=button.h
|
||||
vm.last.preproc.file.1.offset=0
|
||||
vm.last.preproc.file.1.length=485
|
||||
vm.last.preproc.file.1.linecount=28
|
||||
vm.last.preproc.file.1.linestart=21
|
||||
vm.last.preproc.file.1.lineend=49
|
||||
vm.last.preproc.file.1.prefix_lines=0
|
||||
vm.last.preproc.file.2.file=display.h
|
||||
vm.last.preproc.file.2.offset=0
|
||||
vm.last.preproc.file.2.length=1147
|
||||
vm.last.preproc.file.2.linecount=60
|
||||
vm.last.preproc.file.2.linestart=49
|
||||
vm.last.preproc.file.2.lineend=109
|
||||
vm.last.preproc.file.2.prefix_lines=0
|
||||
vm.last.preproc.file.3.file=network.h
|
||||
vm.last.preproc.file.3.offset=0
|
||||
vm.last.preproc.file.3.length=1543
|
||||
vm.last.preproc.file.3.linecount=65
|
||||
vm.last.preproc.file.3.linestart=109
|
||||
vm.last.preproc.file.3.lineend=174
|
||||
vm.last.preproc.file.3.prefix_lines=0
|
||||
vm.last.preproc.file.4.file=programm.h
|
||||
vm.last.preproc.file.4.offset=0
|
||||
vm.last.preproc.file.4.length=4496
|
||||
vm.last.preproc.file.4.linecount=194
|
||||
vm.last.preproc.file.4.linestart=174
|
||||
vm.last.preproc.file.4.lineend=368
|
||||
vm.last.preproc.file.4.prefix_lines=0
|
||||
vm.last.preproc.file.5.file=rfid.h
|
||||
vm.last.preproc.file.5.offset=0
|
||||
vm.last.preproc.file.5.length=887
|
||||
vm.last.preproc.file.5.linecount=49
|
||||
vm.last.preproc.file.5.linestart=368
|
||||
vm.last.preproc.file.5.lineend=417
|
||||
vm.last.preproc.file.5.prefix_lines=0
|
||||
serial.port.file=COM4
|
||||
serial.port=COM4
|
||||
serial.port.num=4
|
||||
sketch_path=C:\Users\schell\Documents\Arduino\Zeit-V2\Zeit-V2
|
||||
build.project_name=Zeit-V2.ino
|
||||
runtime.vm.ide.platforms.path=D:\Programme\Visual Studio\Common7\IDE\Extensions\hunc4op4.xpd\Micro Platforms
|
||||
build.variant.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard
|
||||
build.core.path=C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino
|
||||
archive_file=core.a
|
||||
extra.time.local=47405741
|
||||
tools.ctags.path={runtime.tools.ctags.path}
|
||||
tools.ctags.cmd.path={path}/ctags
|
||||
tools.ctags.pattern="{cmd.path}" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "{source_file}"
|
||||
preproc.includes.compatibility_flags={build.mbed_api_include} {build.nRF51822_api_include} {build.ble_api_include} {compiler.libsam.c.flags} {compiler.arm.cmsis.path} {build.variant_system_include}
|
||||
preproc.macros.compatibility_flags={build.mbed_api_include} {build.nRF51822_api_include} {build.ble_api_include} {compiler.libsam.c.flags} {compiler.arm.cmsis.path} {build.variant_system_include}
|
||||
vm_all_includes= -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard" -I"C:\Users\schell\Documents\Arduino\libraries\Time" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SoftwareSerial\src" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SPI\src" -I"C:\Users\schell\Documents\Arduino\libraries\Ethernet2\src" -I"D:\Programme\Arduino\libraries" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries" -I"D:\Programme\Visual Studio\Common7\IDE\Extensions\hunc4op4.xpd\Micro Platforms\default\debuggers" -I"C:\Users\schell\Documents\Arduino\libraries"
|
||||
vm_core_includes= -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard"
|
||||
includes= -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard" -I"C:\Users\schell\Documents\Arduino\libraries\Time" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SoftwareSerial\src" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SPI\src" -I"C:\Users\schell\Documents\Arduino\libraries\Ethernet2\src" -I"D:\Programme\Arduino\libraries" -I"C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries" -I"D:\Programme\Visual Studio\Common7\IDE\Extensions\hunc4op4.xpd\Micro Platforms\default\debuggers" -I"C:\Users\schell\Documents\Arduino\libraries"
|
||||
build.path_sketch=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno
|
||||
build.path_core=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\core
|
||||
build.path_libraries=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno
|
||||
object_file=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Zeit-V2.cpp.o
|
||||
source_file=C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Zeit-V2.cpp
|
||||
object_files= "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Zeit-V2.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\SPI\SPI.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\SoftwareSerial\SoftwareSerial.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\Dhcp.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\Dns.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\Ethernet2.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\EthernetClient.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\EthernetServer.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\EthernetUdp2.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\Twitter.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\utility\socket.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Ethernet2\utility\w5500.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Time\DateStrings.cpp.o" "C:\Users\schell\AppData\Local\Temp\VMicroBuilds\Zeit-V2\uno\Time\Time.cpp.o"
|
20
Arduino/Zeit/Zeit-V2/Zeit-V2.ino
Normal file
20
Arduino/Zeit/Zeit-V2/Zeit-V2.ino
Normal file
@ -0,0 +1,20 @@
|
||||
#define DEBUG_FLAG true
|
||||
|
||||
#include "programm.h"
|
||||
ProgClass* p;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
p = new ProgClass(&Serial);
|
||||
#if defined(DEBUG_FLAG) && DEBUG_FLAG
|
||||
Serial.println("Init loading!");
|
||||
#endif
|
||||
p->loadFromDisplay();
|
||||
#if defined(DEBUG_FLAG) && DEBUG_FLAG
|
||||
Serial.println("Init finished!");
|
||||
#endif
|
||||
}
|
||||
|
||||
void loop() {
|
||||
p->loop();
|
||||
}
|
92
Arduino/Zeit/Zeit-V2/Zeit-V2.vcxproj
Normal file
92
Arduino/Zeit/Zeit-V2/Zeit-V2.vcxproj
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C5F80730-F44F-4478-BDAE-6634EFC2CA88}</ProjectGuid>
|
||||
<RootNamespace>Zeit_V2</RootNamespace>
|
||||
<ProjectName>Zeit-V2</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>
|
||||
</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>
|
||||
</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>C:\Users\schell\Documents\Arduino\libraries\Ethernet2\src;D:\Programme\Arduino\hardware\arduino\avr\libraries\SoftwareSerial;C:\Users\schell\Documents\Arduino\libraries\Time;D:\Programme\Arduino\hardware\arduino\avr\libraries\SPI;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>D:\Programme\Arduino\libraries;C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\libraries;D:\Programme\Visual Studio\Common7\IDE\Extensions\hunc4op4.xpd\Micro Platforms\default\debuggers;C:\Users\schell\Documents\Arduino\libraries;C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\cores\arduino;C:\Users\schell\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.11\variants\standard;C:\Users\schell\Documents\Arduino\Zeit-V2\Zeit-V2;D:\Programme\Arduino\hardware\tools\avr/avr/include/;D:\Programme\Arduino\hardware\tools\avr//avr/include/avr/;D:\Programme\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<ForcedIncludeFiles>C:\Users\schell\Documents\Arduino\Zeit-V2\Zeit-V2\__vm\.Zeit-V2.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
<PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;F_CPU=16000000L;ARDUINO=10607;ARDUINO_AVR_UNO;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Zeit-V2.ino">
|
||||
<FileType>CppCode</FileType>
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="button.h" />
|
||||
<ClInclude Include="display.h" />
|
||||
<ClInclude Include="network.h" />
|
||||
<ClInclude Include="programm.h" />
|
||||
<ClInclude Include="rfid.h" />
|
||||
<ClInclude Include="__vm\.Zeit-V2.vsarduino.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
40
Arduino/Zeit/Zeit-V2/Zeit-V2.vcxproj.filters
Normal file
40
Arduino/Zeit/Zeit-V2/Zeit-V2.vcxproj.filters
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Zeit-V2.ino" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="button.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="display.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="network.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="programm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rfid.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="__vm\.Zeit-V2.vsarduino.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
57
Arduino/Zeit/Zeit-V2/__vm/.Zeit-V2.vsarduino.h
Normal file
57
Arduino/Zeit/Zeit-V2/__vm/.Zeit-V2.vsarduino.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
Editor: http://www.visualmicro.com
|
||||
visual micro and the arduino ide ignore this code during compilation. this code is automatically maintained by visualmicro, manual changes to this file will be overwritten
|
||||
the contents of the Visual Micro sketch sub folder can be deleted prior to publishing a project
|
||||
all non-arduino files created by visual micro and all visual studio project or solution files can be freely deleted and are not required to compile a sketch (do not delete your own code!).
|
||||
note: debugger breakpoints are stored in '.sln' or '.asln' files, knowledge of last uploaded breakpoints is stored in the upload.vmps.xml file. Both files are required to continue a previous debug session without needing to compile and upload again
|
||||
|
||||
Hardware: Arduino/Genuino Uno, Platform=avr, Package=arduino
|
||||
*/
|
||||
|
||||
#ifndef _VSARDUINO_H_
|
||||
#define _VSARDUINO_H_
|
||||
#define __AVR_ATmega328p__
|
||||
#define __AVR_ATmega328P__
|
||||
#define F_CPU 16000000L
|
||||
#define ARDUINO 10607
|
||||
#define ARDUINO_AVR_UNO
|
||||
#define ARDUINO_ARCH_AVR
|
||||
#define __cplusplus 201103L
|
||||
#define __AVR__
|
||||
#define __inline__
|
||||
#define __asm__(x)
|
||||
#define __extension__
|
||||
#define __inline__
|
||||
#define __volatile__
|
||||
#define GCC_VERSION 40801
|
||||
#define volatile(va_arg)
|
||||
#define _CONST
|
||||
#define __builtin_va_start
|
||||
#define __builtin_va_end
|
||||
#define __attribute__(x)
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
#define prog_void
|
||||
#define PGM_VOID_P int
|
||||
#ifndef __builtin_constant_p
|
||||
#define __builtin_constant_p __attribute__((__const__))
|
||||
#endif
|
||||
#ifndef __builtin_strlen
|
||||
#define __builtin_strlen __attribute__((__const__))
|
||||
#endif
|
||||
#define NEW_H
|
||||
typedef void *__builtin_va_list;
|
||||
extern "C" void __cxa_pure_virtual() {;}
|
||||
|
||||
|
||||
|
||||
#include <arduino.h>
|
||||
#include <pins_arduino.h>
|
||||
#undef cli
|
||||
#define cli()
|
||||
#include <Zeit-V2.ino>
|
||||
#include <button.h>
|
||||
#include <display.h>
|
||||
#include <network.h>
|
||||
#include <programm.h>
|
||||
#include <rfid.h>
|
||||
#endif
|
12
Arduino/Zeit/Zeit-V2/__vm/Compile.vmps.xml
Normal file
12
Arduino/Zeit/Zeit-V2/__vm/Compile.vmps.xml
Normal file
File diff suppressed because one or more lines are too long
9
Arduino/Zeit/Zeit-V2/__vm/Configuration.Debug.vmps.xml
Normal file
9
Arduino/Zeit/Zeit-V2/__vm/Configuration.Debug.vmps.xml
Normal file
File diff suppressed because one or more lines are too long
12
Arduino/Zeit/Zeit-V2/__vm/Upload.vmps.xml
Normal file
12
Arduino/Zeit/Zeit-V2/__vm/Upload.vmps.xml
Normal file
File diff suppressed because one or more lines are too long
27
Arduino/Zeit/Zeit-V2/button.h
Normal file
27
Arduino/Zeit/Zeit-V2/button.h
Normal file
@ -0,0 +1,27 @@
|
||||
class ButtonClass {
|
||||
private:
|
||||
void init(void);
|
||||
public:
|
||||
ButtonClass(void);
|
||||
bool check(uint8_t job);
|
||||
uint8_t read(void);
|
||||
};
|
||||
|
||||
|
||||
ButtonClass::ButtonClass(void) {
|
||||
this->init();
|
||||
}
|
||||
|
||||
void ButtonClass::init(void) {
|
||||
pinMode(2, INPUT_PULLUP);
|
||||
pinMode(3, INPUT_PULLUP);
|
||||
}
|
||||
|
||||
bool ButtonClass::check(uint8_t job) {
|
||||
return ((digitalRead(2) == LOW && job != 1) || (digitalRead(3) == LOW && job != 2));
|
||||
}
|
||||
|
||||
uint8_t ButtonClass::read(void){
|
||||
return digitalRead(2)==LOW?1:2;
|
||||
}
|
||||
|
59
Arduino/Zeit/Zeit-V2/display.h
Normal file
59
Arduino/Zeit/Zeit-V2/display.h
Normal file
@ -0,0 +1,59 @@
|
||||
#if !defined(DEBUG_FLAG)
|
||||
#define DEBUG_FLAG false
|
||||
#endif
|
||||
|
||||
#include <SoftwareSerial.h>
|
||||
#if DEBUG_FLAG
|
||||
#include <HardwareSerial.h>
|
||||
#endif
|
||||
|
||||
class DispClass {
|
||||
private:
|
||||
SoftwareSerial* serD;
|
||||
#if DEBUG_FLAG
|
||||
HardwareSerial* _debug;
|
||||
#endif
|
||||
void init(void);
|
||||
public:
|
||||
#if DEBUG_FLAG
|
||||
DispClass(HardwareSerial *debug);
|
||||
#else
|
||||
DispClass(void);
|
||||
#endif
|
||||
void print(String text);
|
||||
void setTimeout(unsigned long timeout);
|
||||
String readStringUntil(char terminator);
|
||||
};
|
||||
|
||||
#if DEBUG_FLAG
|
||||
DispClass::DispClass(HardwareSerial *debug) {
|
||||
this->_debug = debug;
|
||||
this->init();
|
||||
}
|
||||
#else
|
||||
DispClass::DispClass(void) {
|
||||
this->init();
|
||||
}
|
||||
#endif
|
||||
|
||||
void DispClass::init(void) {
|
||||
this->serD = new SoftwareSerial(7, 6);
|
||||
this->serD->begin(9600);
|
||||
}
|
||||
|
||||
void DispClass::print(String text) {
|
||||
#if DEBUG_FLAG
|
||||
this->_debug->println("d->: "+text);
|
||||
#endif
|
||||
this->serD->listen();
|
||||
this->serD->println(text);
|
||||
}
|
||||
|
||||
void DispClass::setTimeout(unsigned long timeout) {
|
||||
this->serD->setTimeout(timeout);
|
||||
}
|
||||
|
||||
String DispClass::readStringUntil(char terminator) {
|
||||
return this->serD->readStringUntil(terminator);
|
||||
}
|
||||
|
64
Arduino/Zeit/Zeit-V2/network.h
Normal file
64
Arduino/Zeit/Zeit-V2/network.h
Normal file
@ -0,0 +1,64 @@
|
||||
#if !defined(DEBUG_FLAG)
|
||||
#define DEBUG_FLAG false
|
||||
#endif
|
||||
|
||||
#include <SPI.h>
|
||||
#include <Ethernet2.h>
|
||||
#if DEBUG_FLAG
|
||||
#include <HardwareSerial.h>
|
||||
#endif
|
||||
|
||||
class NetClass {
|
||||
private:
|
||||
#if DEBUG_FLAG
|
||||
HardwareSerial* _debug;
|
||||
#endif
|
||||
EthernetClass* e;
|
||||
void init(void);
|
||||
// Mac-Adress of the Ethernet-Shield
|
||||
uint8_t mac[6] = { 0x90, 0xA2, 0xDA, 0x10, 0x4F, 0xA4 };
|
||||
public:
|
||||
#if DEBUG_FLAG
|
||||
NetClass(HardwareSerial *debug);
|
||||
#else
|
||||
NetClass(void);
|
||||
#endif
|
||||
};
|
||||
|
||||
#if DEBUG_FLAG
|
||||
NetClass::NetClass(HardwareSerial *debug) {
|
||||
this->_debug = debug;
|
||||
this->init();
|
||||
}
|
||||
#else
|
||||
NetClass::NetClass(void) {
|
||||
this->init();
|
||||
}
|
||||
#endif
|
||||
|
||||
void NetClass::init(void) {
|
||||
pinMode(10, OUTPUT);
|
||||
digitalWrite(10, HIGH);
|
||||
#if DEBUG_FLAG
|
||||
this->_debug->println("Start Network!");
|
||||
this->_debug->println("DHCP Request");
|
||||
#endif
|
||||
this->e = &Ethernet;
|
||||
if (this->e->begin(mac) == 0) {
|
||||
#if DEBUG_FLAG
|
||||
this->_debug->println("DHCP Failed, Use Link-Local Adress");
|
||||
#endif
|
||||
this->e->begin(mac, IPAddress(169, 254, 1, 177), IPAddress(169, 254, 0, 1), IPAddress(255, 255, 0, 0));
|
||||
}
|
||||
#if DEBUG_FLAG
|
||||
this->_debug->print("Ethernet Started! IP: ");
|
||||
IPAddress ip = Ethernet.localIP();
|
||||
for (byte thisByte = 0; thisByte < 4; thisByte++) {
|
||||
// print the value of each byte of the IP address:
|
||||
this->_debug->print(ip[thisByte], DEC);
|
||||
this->_debug->print(".");
|
||||
}
|
||||
this->_debug->println();
|
||||
#endif
|
||||
}
|
||||
|
194
Arduino/Zeit/Zeit-V2/programm.h
Normal file
194
Arduino/Zeit/Zeit-V2/programm.h
Normal file
@ -0,0 +1,194 @@
|
||||
#if !defined(DEBUG_FLAG)
|
||||
#define DEBUG_FLAG false
|
||||
#endif
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
#include <Time.h>
|
||||
#include <stdlib.h>
|
||||
#include "display.h"
|
||||
#include "network.h"
|
||||
#include "rfid.h"
|
||||
#include "button.h"
|
||||
|
||||
class ProgClass {
|
||||
private:
|
||||
static const int MAX_STORE_DATA = 8;
|
||||
|
||||
HardwareSerial* _usb;
|
||||
DispClass* disp;
|
||||
NetClass* net;
|
||||
RfidClass* rfid;
|
||||
ButtonClass* bu;
|
||||
|
||||
int8_t _storeCount = -1;
|
||||
int8_t _job = -1;
|
||||
int8_t _online = -1;
|
||||
bool _keep = false;
|
||||
String _storeData[MAX_STORE_DATA];
|
||||
String _cmsg;
|
||||
|
||||
void init(void);
|
||||
void parse(String text);
|
||||
bool keepAlive(void);
|
||||
void doJob(String task, String value);
|
||||
|
||||
public:
|
||||
ProgClass(HardwareSerial *usb);
|
||||
void loop(void);
|
||||
void loadFromDisplay(void);
|
||||
};
|
||||
|
||||
ProgClass::ProgClass(HardwareSerial *usb) {
|
||||
this->_usb = usb;
|
||||
this->init();
|
||||
}
|
||||
|
||||
void ProgClass::init(void) {
|
||||
#if DEBUG_FLAG
|
||||
this->_usb->println("Init....");
|
||||
this->disp = new DispClass(this->_usb);
|
||||
this->net = new NetClass(this->_usb);
|
||||
#else
|
||||
this->disp = new DispClass();
|
||||
this->net = new NetClass();
|
||||
#endif
|
||||
this->rfid = new RfidClass();
|
||||
this->bu = new ButtonClass();
|
||||
this->_usb->println("t="+String(now()));
|
||||
}
|
||||
|
||||
void ProgClass::loop(void) {
|
||||
char c;
|
||||
if (this->rfid->hasData()) {
|
||||
if (this->rfid->allowed()) {
|
||||
this->_online = this->_online == 1 ? 0 : 1;
|
||||
this->doJob("tag", this->rfid->getData());
|
||||
this->doJob("online", String(this->_online));
|
||||
delay(1000);
|
||||
}
|
||||
this->rfid->clear();
|
||||
}
|
||||
if (this->_usb->available()) {
|
||||
c = this->_usb->read();
|
||||
if (c == '\n') {
|
||||
this->parse(this->_cmsg);
|
||||
this->_cmsg = "";
|
||||
}
|
||||
else {
|
||||
this->_cmsg += c;
|
||||
}
|
||||
}
|
||||
if (this->bu->check(this->_job)) {
|
||||
this->_job = this->bu->read();
|
||||
this->doJob("job", String(this->_job));
|
||||
this->rfid->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void ProgClass::loadFromDisplay(void) {
|
||||
this->disp->setTimeout(1000);
|
||||
this->disp->print("getJob=1");
|
||||
this->parse(this->disp->readStringUntil('\n'));
|
||||
this->disp->print("getOnline=1");
|
||||
this->parse(this->disp->readStringUntil('\n'));
|
||||
if (this->keepAlive()) {
|
||||
this->disp->print("getStoreCount=1");
|
||||
this->parse(this->disp->readStringUntil('\n'));
|
||||
if (this->_storeCount > 0) {
|
||||
this->disp->print("getStoreData=1");
|
||||
this->parse(this->disp->readStringUntil('\n'));
|
||||
}
|
||||
}
|
||||
if (this->keepAlive()) {
|
||||
this->doJob("getStore", "1");
|
||||
}
|
||||
}
|
||||
|
||||
void ProgClass::parse(String text) {
|
||||
#if DEBUG_FLAG
|
||||
this->_usb->println("i<-: " + text);
|
||||
#endif
|
||||
text.trim();
|
||||
String task = "";
|
||||
String value = "";
|
||||
if (text.indexOf("=") != -1) {
|
||||
task = text.substring(0, text.indexOf("="));
|
||||
value = text.substring(text.indexOf("=") + 1);
|
||||
this->doJob(task, value);
|
||||
}
|
||||
}
|
||||
|
||||
bool ProgClass::keepAlive(void) {
|
||||
this->_usb->setTimeout(1000);
|
||||
this->_keep = false;
|
||||
this->_usb->println("requestKeep=1");
|
||||
String a = this->_usb->readStringUntil('\n');
|
||||
if (a != "") {
|
||||
this->parse(a);
|
||||
}
|
||||
return this->_keep;
|
||||
}
|
||||
|
||||
void ProgClass::doJob(String task, String value) {
|
||||
if (task == "tag") {
|
||||
char hex[15];
|
||||
value.toCharArray(hex, 14);
|
||||
String answ = "tag=" + String(strtol(hex, NULL, 16));
|
||||
answ += ";time=" + String(now());
|
||||
answ += ";job=" + String(this->_job);
|
||||
answ += ";online=" + String(this->_online);
|
||||
if (this->keepAlive()) {
|
||||
this->_usb->println(answ);
|
||||
}
|
||||
else {
|
||||
this->disp->print(answ);
|
||||
}
|
||||
}
|
||||
else if (task == "job") {
|
||||
this->disp->print("job=" + value);
|
||||
}
|
||||
else if (task == "online") {
|
||||
this->disp->print("online=" + value);
|
||||
}
|
||||
else if (task == "time") {
|
||||
setTime(value.toInt());
|
||||
this->_usb->println("t=" + String(now()));
|
||||
}
|
||||
else if (task == "setJob") {
|
||||
this->_job = value.toInt();
|
||||
}
|
||||
else if (task == "setOnline") {
|
||||
this->_online = value.toInt();
|
||||
}
|
||||
else if (task == "keep") {
|
||||
this->_keep = true;
|
||||
}
|
||||
else if (task == "hasCount") {
|
||||
this->_storeCount = value.toInt();
|
||||
}
|
||||
else if (task == "dataStore") {
|
||||
int i = 0;
|
||||
while (true) {
|
||||
if (i == MAX_STORE_DATA) {
|
||||
break;
|
||||
}
|
||||
if (value.indexOf('|') == -1) {
|
||||
this->_storeData[i] = value;
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
this->_storeData[i] = value.substring(0, value.indexOf('|'));
|
||||
value = value.substring(value.indexOf('|') + 1);
|
||||
i++;
|
||||
}
|
||||
this->_storeCount = i;
|
||||
}
|
||||
else if (task == "getStore") {
|
||||
if (this->_storeCount > 0) {
|
||||
for (int i = 0; i < this->_storeCount; i++) {
|
||||
this->_usb->println(this->_storeData[i]);
|
||||
}
|
||||
this->_storeCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
48
Arduino/Zeit/Zeit-V2/rfid.h
Normal file
48
Arduino/Zeit/Zeit-V2/rfid.h
Normal file
@ -0,0 +1,48 @@
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
class RfidClass {
|
||||
private:
|
||||
SoftwareSerial* serD;
|
||||
void init(void);
|
||||
String rmsg;
|
||||
public:
|
||||
RfidClass(void);
|
||||
bool hasData(void);
|
||||
String getData(void);
|
||||
bool allowed(void);
|
||||
void clear(void);
|
||||
};
|
||||
|
||||
RfidClass::RfidClass(void) {
|
||||
this->init();
|
||||
}
|
||||
|
||||
void RfidClass::init(void) {
|
||||
this->serD = new SoftwareSerial (9, 8);
|
||||
this->serD->begin(9600);
|
||||
}
|
||||
|
||||
bool RfidClass::hasData(void) {
|
||||
this->serD->listen();
|
||||
if(this->serD->available()) {
|
||||
this->rmsg += (char)this->serD->read();
|
||||
}
|
||||
if(this->rmsg.length() >= 14) {
|
||||
this->rmsg = this->rmsg.substring(1,13);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
String RfidClass::getData(void){
|
||||
return this->rmsg;
|
||||
}
|
||||
|
||||
bool RfidClass::allowed() {
|
||||
return (this->rmsg == "0A006AB7AE79");
|
||||
}
|
||||
|
||||
void RfidClass::clear(void) {
|
||||
this->rmsg = "";
|
||||
}
|
||||
|
@ -1,166 +0,0 @@
|
||||
#include <Time.h>
|
||||
#include <stdlib.h>
|
||||
#include <SoftwareSerial.h>
|
||||
SoftwareSerial rfid(11, 10);
|
||||
SoftwareSerial disp(13, 12);
|
||||
String rmsg;
|
||||
String cmsg;
|
||||
String dmsg;
|
||||
|
||||
#define ALLOWED_TAG "0A006AB7AE79"
|
||||
#define MAX_STORE_DATA 8
|
||||
#define DEBUG_FLAG true
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
Serial.println("Init....");
|
||||
rfid.begin(9600);
|
||||
disp.begin(9600);
|
||||
pinMode(2, INPUT_PULLUP);
|
||||
pinMode(3, INPUT_PULLUP);
|
||||
Serial.println("t="+String(now()));
|
||||
Serial.println("Init loading!");
|
||||
loadFromDisplay();
|
||||
Serial.println("Init finished!");
|
||||
}
|
||||
|
||||
int job = -1;
|
||||
int online = -1;
|
||||
bool keep = false;
|
||||
int storeCount = -1;
|
||||
String storeData[MAX_STORE_DATA];
|
||||
|
||||
void loadFromDisplay() {
|
||||
disp.setTimeout(1000);
|
||||
print_disp("getJob=1");
|
||||
parse(disp.readStringUntil('\n'));
|
||||
print_disp("getOnline=1");
|
||||
parse(disp.readStringUntil('\n'));
|
||||
print_disp("getStoreCount=1");
|
||||
parse(disp.readStringUntil('\n'));
|
||||
if(storeCount > 0) {
|
||||
print_disp("getStoreData=1");
|
||||
parse(disp.readStringUntil('\n'));
|
||||
}
|
||||
if(storeCount > 0 && keepAlive()) {
|
||||
doJob("getStore","1");
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
char c;
|
||||
rfid.listen();
|
||||
if(rfid.available()) {
|
||||
c = rfid.read();
|
||||
rmsg += c;
|
||||
}
|
||||
if(Serial.available()) {
|
||||
c = Serial.read();
|
||||
if(c == '\n') {
|
||||
parse(cmsg);
|
||||
cmsg = "";
|
||||
} else {
|
||||
cmsg += c;
|
||||
}
|
||||
}
|
||||
if(rmsg.length() >= 14) {
|
||||
rmsg = rmsg.substring(1,13);
|
||||
if(rmsg == ALLOWED_TAG) {
|
||||
online = online==1?0:1;
|
||||
doJob("tag",rmsg);
|
||||
doJob("online",String(online));
|
||||
delay(1000);
|
||||
}
|
||||
rmsg = "";
|
||||
}
|
||||
if(((digitalRead(2) == LOW && job != 1) || (digitalRead(3) == LOW && job != 2))) {
|
||||
job = digitalRead(2)==LOW?1:2;
|
||||
doJob("job", String(job));
|
||||
rmsg = "";
|
||||
}
|
||||
}
|
||||
|
||||
void parse(String text) {
|
||||
if(DEBUG_FLAG) {
|
||||
Serial.println("i<-: "+text);
|
||||
}
|
||||
text.trim();
|
||||
String task = "";
|
||||
String value = "";
|
||||
if (text.indexOf("=") != -1) {
|
||||
task = text.substring(0, text.indexOf("="));
|
||||
value = text.substring(text.indexOf("=") + 1);
|
||||
doJob(task, value);
|
||||
}
|
||||
}
|
||||
|
||||
void doJob(String task, String value) {
|
||||
if(task == "tag") {
|
||||
char hex[15];
|
||||
value.toCharArray(hex,14);
|
||||
String answ = "tag="+String(strtol(hex, NULL, 16));
|
||||
answ += ";time="+String(now());
|
||||
answ += ";job="+String(job);
|
||||
answ += ";online="+String(online);
|
||||
if(keepAlive()) {
|
||||
Serial.println(answ);
|
||||
} else {
|
||||
print_disp(answ);
|
||||
}
|
||||
} else if(task == "job") {
|
||||
print_disp("job="+value);
|
||||
} else if(task == "online") {
|
||||
print_disp("online="+value);
|
||||
} else if(task == "time") {
|
||||
setTime(value.toInt());
|
||||
Serial.println("t="+String(now()));
|
||||
} else if(task == "setJob") {
|
||||
job = value.toInt();
|
||||
} else if(task == "setOnline") {
|
||||
online = value.toInt();
|
||||
} else if(task == "keep") {
|
||||
keep = true;
|
||||
} else if(task == "hasCount") {
|
||||
storeCount = value.toInt();
|
||||
} else if(task == "dataStore") {
|
||||
int i = 0;
|
||||
while(true) {
|
||||
if(value.indexOf('|') == -1) {
|
||||
storeData[i] = value;
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
storeData[i] = value.substring(0, value.indexOf('|'));
|
||||
value = value.substring(value.indexOf('|') + 1);
|
||||
i++;
|
||||
}
|
||||
storeCount = i;
|
||||
} else if(task == "getStore") {
|
||||
if(storeCount > 0) {
|
||||
for(int i=0; i < storeCount; i++) {
|
||||
Serial.println(storeData[i]);
|
||||
}
|
||||
storeCount=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void print_disp(String text) {
|
||||
if(DEBUG_FLAG) {
|
||||
Serial.println("d->: "+text);
|
||||
}
|
||||
disp.listen();
|
||||
disp.println(text);
|
||||
}
|
||||
|
||||
bool keepAlive() {
|
||||
Serial.setTimeout(1000);
|
||||
keep = false;
|
||||
Serial.println("requestKeep=1");
|
||||
String a = Serial.readStringUntil('\n');
|
||||
if(a != "") {
|
||||
parse(a);
|
||||
}
|
||||
return keep;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user