PRE2015 4 Groep5 Code: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
(Created page with 'Repository: https://github.com/JochemKuijpers/UseWaterpret')
 
No edit summary
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
Repository: https://github.com/JochemKuijpers/UseWaterpret
Repository: https://github.com/Petzep/UseWaterpret
 
==Repository==
 
===Library===
 
Libraries used:
 
* Arduino_Menu
* DallasTemperatureControl
* OneWire
* RadioHead-1.59
* ServoTimer2
 
===Solution===
 
'''Solution.sln'''
 
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Robot", "Robot\Robot.vcxproj", "{E107B750-A178-4195-BCF5-E1DADA3D52A1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseStation", "BaseStation\BaseStation.vcxproj", "{194F20BC-E954-42EA-99FE-BA4D6577DDA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x64.ActiveCfg = Debug|Win32
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x86.ActiveCfg = Debug|Win32
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x86.Build.0 = Debug|Win32
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x64.ActiveCfg = Release|Win32
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x86.ActiveCfg = Release|Win32
{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x86.Build.0 = Release|Win32
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x64.ActiveCfg = Debug|x64
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x64.Build.0 = Debug|x64
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x86.ActiveCfg = Debug|Win32
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x86.Build.0 = Debug|Win32
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x64.ActiveCfg = Release|x64
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x64.Build.0 = Release|x64
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x86.ActiveCfg = Release|Win32
{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
 
====BaseStation====
 
'''BaseStation.ino'''
 
/*
  Name: BaseStation.ino
  Created: 5/19/2016 4:07:46 PM
  Author: Use Waterpret
*/
#include <SPI.h>
#define ENABLE_DEBUG
#define BOOKSIZE 10
#define BASESTATION
#ifdef ENABLE_DEBUG
// disable Serial output
#define debugln(a) (Serial.println(a))
#define debug(a) (Serial.print(a))
#else
#define debugln(a)
#define debug(a)
#endif
struct CommandBook
{
char command;
int value;
}tempCommand;
//menu
#include <MenuSystem.h>
#include "CustomNumericMenuItem.h"
// forward declarations
const String format_float(const float value);
const String format_int(const float value);
const String format_color(const float value);
const String format_type(const float value);
const String format_value(const float value);
void display_menu(Menu* p_menu);
void on_status_selected(MenuItem* p_menu_item);
void on_back_item_selected(MenuItem* p_menu_item);
void on_help_selected(MenuItem* p_menu_item);
void on_about_selected(MenuItem* p_menu_item);
void on_add_selected(MenuItem* p_menu_item);
void on_del_selected(MenuItem* p_menu_item);
void on_demo_selected(MenuItem* p_menu_item);
void on_send_selected(MenuItem* p_menu_item);
bool addCommand(CommandBook *book, char command, int value);
int countCommand(CommandBook *book);
void runCommand(CommandBook *book);
void printCommand(CommandBook *book);
bool deleteCommand(CommandBook *book);
bool sendCommand(CommandBook *book);
CommandBook commandos[BOOKSIZE] = {}; // array with commands for the Arduino
// Menu variables
MenuSystem ms;
Menu mm("Main Menu", &display_menu);
Menu muCommand("Command Builder..", &display_menu);
NumericMenuItem muCommand_type("Command type", 0, 0, 11, 1, format_type);
NumericMenuItem muCommand_value("Value", 0, -15, 15, 1, format_value);
MenuItem muCommand_add("Add command to CommandBook", &on_add_selected);
MenuItem muCommand_delete("Delete command from CommandBook", &on_del_selected);
MenuItem muCommand_demo("Set demo sequence", &on_demo_selected);
MenuItem muCommand_send("Send CommandBook to Robot", &on_send_selected);
MenuItem muRobot_status("Status", &on_status_selected);
BackMenuItem mu_back("Back..", &on_back_item_selected, &ms);
MenuItem mm_help("Help", &on_help_selected);
MenuItem mm_about("About", &on_about_selected);
void setup()
{
Serial.begin(9600);
nrf24Initialize(true);
delay(3000);
mm.add_menu(&muCommand);
muCommand.add_item(&muCommand_type);
muCommand.add_item(&muCommand_value);
muCommand.add_item(&muCommand_add);
muCommand.add_item(&muCommand_delete);
muCommand.add_item(&muCommand_demo);
muCommand.add_item(&muCommand_send);
muCommand.add_item(&mu_back);
mm.add_item(&muRobot_status);
mm.add_item(&mm_help);
mm.add_item(&mm_about);
ms.set_root_menu(&mm);
display_help();
ms.display();
}
void loop() {
serial_handler();
}
'''BaseStation.vcxproj'''
 
<?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>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{194F20BC-E954-42EA-99FE-BA4D6577DDA3}</ProjectGuid>
    <RootNamespace>BaseStation</RootNamespace>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </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>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <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|x64'">
    <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>$(SolutionDir)Shared;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\s133140\Source\Repos\UseWaterpret\Solution\BaseStation;C:\Users\s133140\Documents\Arduino\libraries\Arduino_Menu;C:\Users\s133140\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\s133140\Documents\Arduino\libraries\RadioHead;C:\Users\s133140\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\default\debuggers;C:\Users\s133140\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\s133140\Source\Repos\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_UNO;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </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>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <WholeProgramOptimization>false</WholeProgramOptimization>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_UNO;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <None Include="..\Shared\CommandBook.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="BaseStation.ino">
      <FileType>CppCode</FileType>
    </None>
    <None Include="menu.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="CustomNumericMenuItem.h" />
    <ClInclude Include="__vm\.BaseStation.vsarduino.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties arduino.upload.maximum_size="30720" arduino.upload.speed="57600" visualmicro.package.name="arduino" arduino.board.property_bag="name=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;&#xA;upload.tool=avrdude&#xD;&#xA;upload.protocol=arduino&#xD;&#xA;bootloader.tool=avrdude&#xD;&#xA;bootloader.low_fuses=0xFF&#xD;&#xA;bootloader.unlock_bits=0x3F&#xD;&#xA;bootloader.lock_bits=0x0F&#xD;&#xA;build.f_cpu=16000000L&#xD;&#xA;build.board=AVR_DUEMILANOVE&#xD;&#xA;build.core=arduino&#xD;&#xA;build.variant=standard&#xD;&#xA;menu.cpu.atmega328=ATmega328&#xD;&#xA;menu.cpu.atmega328.upload.maximum_size=30720&#xD;&#xA;menu.cpu.atmega328.upload.maximum_data_size=2048&#xD;&#xA;menu.cpu.atmega328.upload.speed=57600&#xD;&#xA;menu.cpu.atmega328.bootloader.high_fuses=0xDA&#xD;&#xA;menu.cpu.atmega328.bootloader.extended_fuses=0x05&#xD;&#xA;menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;&#xA;menu.cpu.atmega328.build.mcu=atmega328p&#xD;&#xA;menu.cpu.atmega168=ATmega168&#xD;&#xA;menu.cpu.atmega168.upload.maximum_size=14336&#xD;&#xA;menu.cpu.atmega168.upload.maximum_data_size=1024&#xD;&#xA;menu.cpu.atmega168.upload.speed=19200&#xD;&#xA;menu.cpu.atmega168.bootloader.high_fuses=0xdd&#xD;&#xA;menu.cpu.atmega168.bootloader.extended_fuses=0x00&#xD;&#xA;menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex&#xD;&#xA;menu.cpu.atmega168.build.mcu=atmega168&#xD;&#xA;runtime.ide.path=C:\Program Files (x86)\Arduino&#xD;&#xA;build.system.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr\system&#xD;&#xA;runtime.ide.version=10609&#xD;&#xA;target_package=arduino&#xD;&#xA;target_platform=avr&#xD;&#xA;runtime.hardware.path=C:\Program Files (x86)\Arduino\hardware\arduino&#xD;&#xA;originalid=diecimila&#xD;&#xA;intellisense.tools.path={runtime.tools.avr-gcc.path}/&#xD;&#xA;intellisense.include.paths={intellisense.tools.path}avr/include/;{intellisense.tools.path}/avr/include/avr/;{intellisense.tools.path}lib\gcc\avr\4.8.1\include&#xD;&#xA;tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram&#xD;&#xA;tools.atprogram.cmd.setwinpath=true&#xD;&#xA;tools.atprogram.program.params.verbose=-v&#xD;&#xA;tools.atprogram.program.params.quiet=-q&#xD;&#xA;tools.atprogram.program.pattern=&quot;{cmd.path}&quot; -d {build.mcu} {program.verbose} {program.extra_params} program -c -f &quot;{build.path}\{build.project_name}.hex&quot;&#xD;&#xA;tools.atprogram.program.xpattern=&quot;{cmd.path}&quot; {AVRSTUDIO_BACKEND_CONNECTION} -d {build.mcu} {program.verbose} {program.extra_params} program -c -f &quot;{build.path}\{build.project_name}.hex&quot;&#xD;&#xA;tools.atprogram.erase.params.verbose=-v&#xD;&#xA;tools.atprogram.erase.params.quiet=-q&#xD;&#xA;tools.atprogram.bootloader.params.verbose=-v&#xD;&#xA;tools.atprogram.bootloader.params.quiet=-q&#xD;&#xA;tools.atprogram.bootloader.pattern=&quot;{cmd.path}&quot; -d {build.mcu} {bootloader.verbose}  program -c -f &quot;{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}&quot;&#xD;&#xA;version=1.6.11&#xD;&#xA;compiler.warning_flags=-w&#xD;&#xA;compiler.warning_flags.none=-w&#xD;&#xA;compiler.warning_flags.default=&#xD;&#xA;compiler.warning_flags.more=-Wall&#xD;&#xA;compiler.warning_flags.all=-Wall -Wextra&#xD;&#xA;compiler.path={runtime.tools.avr-gcc.path}/bin/&#xD;&#xA;compiler.c.cmd=avr-gcc&#xD;&#xA;compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD&#xD;&#xA;compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections&#xD;&#xA;compiler.c.elf.cmd=avr-gcc&#xD;&#xA;compiler.S.flags=-c -g -x assembler-with-cpp&#xD;&#xA;compiler.cpp.cmd=avr-g++&#xD;&#xA;compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD&#xD;&#xA;compiler.ar.cmd=avr-ar&#xD;&#xA;compiler.ar.flags=rcs&#xD;&#xA;compiler.objcopy.cmd=avr-objcopy&#xD;&#xA;compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0&#xD;&#xA;compiler.elf2hex.flags=-O ihex -R .eeprom&#xD;&#xA;compiler.elf2hex.cmd=avr-objcopy&#xD;&#xA;compiler.ldflags=&#xD;&#xA;compiler.size.cmd=avr-size&#xD;&#xA;build.extra_flags=&#xD;&#xA;compiler.c.extra_flags=&#xD;&#xA;compiler.c.elf.extra_flags=&#xD;&#xA;compiler.S.extra_flags=&#xD;&#xA;compiler.cpp.extra_flags=&#xD;&#xA;compiler.ar.extra_flags=&#xD;&#xA;compiler.objcopy.eep.extra_flags=&#xD;&#xA;compiler.elf2hex.extra_flags=&#xD;&#xA;recipe.c.o.pattern=&quot;{compiler.path}{compiler.c.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;recipe.cpp.o.pattern=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;recipe.S.o.pattern=&quot;{compiler.path}{compiler.c.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;archive_file_path={build.path}/{archive_file}&#xD;&#xA;recipe.ar.pattern=&quot;{compiler.path}{compiler.ar.cmd}&quot; {compiler.ar.flags} {compiler.ar.extra_flags} &quot;{archive_file_path}&quot; &quot;{object_file}&quot;&#xD;&#xA;recipe.c.combine.pattern=&quot;{compiler.path}{compiler.c.elf.cmd}&quot; {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o &quot;{build.path}/{build.project_name}.elf&quot; {object_files} &quot;{build.path}/{archive_file}&quot; &quot;-L{build.path}&quot; -lm&#xD;&#xA;recipe.objcopy.eep.pattern=&quot;{compiler.path}{compiler.objcopy.cmd}&quot; {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} &quot;{build.path}/{build.project_name}.elf&quot; &quot;{build.path}/{build.project_name}.eep&quot;&#xD;&#xA;recipe.objcopy.hex.pattern=&quot;{compiler.path}{compiler.elf2hex.cmd}&quot; {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} &quot;{build.path}/{build.project_name}.elf&quot; &quot;{build.path}/{build.project_name}.hex&quot;&#xD;&#xA;recipe.output.tmp_file={build.project_name}.hex&#xD;&#xA;recipe.output.save_file={build.project_name}.{build.variant}.hex&#xD;&#xA;recipe.size.pattern=&quot;{compiler.path}{compiler.size.cmd}&quot; -A &quot;{build.path}/{build.project_name}.elf&quot;&#xD;&#xA;recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*&#xD;&#xA;recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*&#xD;&#xA;recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*&#xD;&#xA;preproc.includes.flags=-w -x c++ -M -MG -MP&#xD;&#xA;recipe.preproc.includes=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot;&#xD;&#xA;preproc.macros.flags=-w -x c++ -E -CC&#xD;&#xA;recipe.preproc.macros=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{preprocessed_file_path}&quot;&#xD;&#xA;tools.avrdude.path={runtime.tools.avrdude.path}&#xD;&#xA;tools.avrdude.cmd.path={path}/bin/avrdude&#xD;&#xA;tools.avrdude.config.path={path}/etc/avrdude.conf&#xD;&#xA;tools.avrdude.upload.params.verbose=-v&#xD;&#xA;tools.avrdude.upload.params.quiet=-q -q&#xD;&#xA;tools.avrdude.upload.params.noverify=-V&#xD;&#xA;tools.avrdude.upload.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D &quot;-Uflash:w:{build.path}/{build.project_name}.hex:i&quot;&#xD;&#xA;tools.avrdude.program.params.verbose=-v&#xD;&#xA;tools.avrdude.program.params.quiet=-q -q&#xD;&#xA;tools.avrdude.program.params.noverify=-V&#xD;&#xA;tools.avrdude.program.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} &quot;-Uflash:w:{build.path}/{build.project_name}.hex:i&quot;&#xD;&#xA;tools.avrdude.erase.params.verbose=-v&#xD;&#xA;tools.avrdude.erase.params.quiet=-q -q&#xD;&#xA;tools.avrdude.erase.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {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&#xD;&#xA;tools.avrdude.bootloader.params.verbose=-v&#xD;&#xA;tools.avrdude.bootloader.params.quiet=-q -q&#xD;&#xA;tools.avrdude.bootloader.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} &quot;-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i&quot; -Ulock:w:{bootloader.lock_bits}:m&#xD;&#xA;tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}&#xD;&#xA;build.usb_manufacturer=&quot;Unknown&quot;&#xD;&#xA;build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'&#xD;&#xA;vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\arduino16x&#xD;&#xA;avrisp.name=AVR ISP&#xD;&#xA;avrisp.communication=serial&#xD;&#xA;avrisp.protocol=stk500v1&#xD;&#xA;avrisp.program.protocol=stk500v1&#xD;&#xA;avrisp.program.tool=avrdude&#xD;&#xA;avrisp.program.extra_params=-P{serial.port}&#xD;&#xA;avrispmkii.name=AVRISP mkII&#xD;&#xA;avrispmkii.communication=usb&#xD;&#xA;avrispmkii.protocol=stk500v2&#xD;&#xA;avrispmkii.program.protocol=stk500v2&#xD;&#xA;avrispmkii.program.tool=avrdude&#xD;&#xA;avrispmkii.program.extra_params=-Pusb&#xD;&#xA;usbtinyisp.name=USBtinyISP&#xD;&#xA;usbtinyisp.protocol=usbtiny&#xD;&#xA;usbtinyisp.program.tool=avrdude&#xD;&#xA;usbtinyisp.program.extra_params=&#xD;&#xA;arduinoisp.name=ArduinoISP&#xD;&#xA;arduinoisp.protocol=arduinoisp&#xD;&#xA;arduinoisp.program.tool=avrdude&#xD;&#xA;arduinoisp.program.extra_params=&#xD;&#xA;usbasp.name=USBasp&#xD;&#xA;usbasp.communication=usb&#xD;&#xA;usbasp.protocol=usbasp&#xD;&#xA;usbasp.program.protocol=usbasp&#xD;&#xA;usbasp.program.tool=avrdude&#xD;&#xA;usbasp.program.extra_params=-Pusb&#xD;&#xA;parallel.name=Parallel Programmer&#xD;&#xA;parallel.protocol=dapa&#xD;&#xA;parallel.force=true&#xD;&#xA;parallel.program.tool=avrdude&#xD;&#xA;parallel.program.extra_params=-F&#xD;&#xA;arduinoasisp.name=Arduino as ISP&#xD;&#xA;arduinoasisp.communication=serial&#xD;&#xA;arduinoasisp.protocol=stk500v1&#xD;&#xA;arduinoasisp.speed=19200&#xD;&#xA;arduinoasisp.program.protocol=stk500v1&#xD;&#xA;arduinoasisp.program.speed=19200&#xD;&#xA;arduinoasisp.program.tool=avrdude&#xD;&#xA;arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}&#xD;&#xA;usbGemma.name=Arduino Gemma&#xD;&#xA;usbGemma.protocol=arduinogemma&#xD;&#xA;usbGemma.program.tool=avrdude&#xD;&#xA;usbGemma.program.extra_params=&#xD;&#xA;usbGemma.config.path={runtime.platform.path}/bootloaders/gemma/avrdude.conf&#xD;&#xA;stk500.name=Atmel STK500 development board&#xD;&#xA;stk500.communication=serial&#xD;&#xA;stk500.protocol=stk500&#xD;&#xA;stk500.program.protocol=stk500&#xD;&#xA;stk500.program.tool=avrdude&#xD;&#xA;stk500.program.extra_params=-P{serial.port}&#xD;&#xA;buspirate.name=BusPirate as ISP&#xD;&#xA;buspirate.communication=serial&#xD;&#xA;buspirate.protocol=buspirate&#xD;&#xA;buspirate.program.protocol=buspirate&#xD;&#xA;buspirate.program.tool=avrdude&#xD;&#xA;buspirate.program.extra_params=-P{serial.port}&#xD;&#xA;runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avrdude-6.0.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avr-gcc-4.8.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;upload.maximum_size=30720&#xD;&#xA;upload.maximum_data_size=2048&#xD;&#xA;upload.speed=57600&#xD;&#xA;bootloader.high_fuses=0xDA&#xD;&#xA;bootloader.extended_fuses=0x05&#xD;&#xA;bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;&#xA;build.mcu=atmega328p&#xD;&#xA;runtime.vm.boardinfo.id=diecimila_atmega328&#xD;&#xA;runtime.vm.boardinfo.name=diecimila_atmega328&#xD;&#xA;runtime.vm.boardinfo.desc=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;&#xA;runtime.vm.boardinfo.src_location=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;ide.hint=For use with Arduino.cc 1.6.2+ ide&#xD;&#xA;ide.location.key=Arduino16x&#xD;&#xA;ide.location.ide.winreg=Arduino 1.6.x Application&#xD;&#xA;ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook&#xD;&#xA;ide.location.sketchbook.preferences=sketchbook.path&#xD;&#xA;ide.default.revision_name=1.6.9&#xD;&#xA;ide.default.version=10609&#xD;&#xA;ide.default.package=arduino&#xD;&#xA;ide.default.platform=avr&#xD;&#xA;ide.multiplatform=true&#xD;&#xA;ide.includes=arduino.h&#xD;&#xA;ide.exe_name=arduino&#xD;&#xA;ide.platformswithoutpackage=false&#xD;&#xA;ide.includes.fallback=wprogram.h&#xD;&#xA;ide.extension=ino&#xD;&#xA;ide.extension.fallback=pde&#xD;&#xA;ide.versionGTEQ=160&#xD;&#xA;ide.exe=arduino.exe&#xD;&#xA;ide.hosts=atmel&#xD;&#xA;ide.url=http://arduino.cc/en/Main/Software&#xD;&#xA;ide.help.reference.path=reference\arduino.cc\en\Reference&#xD;&#xA;ide.help.reference.path2=reference\www.arduino.cc\en\Reference&#xD;&#xA;ide.help.reference.serial=reference\www.arduino.cc\en\Serial&#xD;&#xA;vm.debug=true&#xD;&#xA;software=ARDUINO&#xD;&#xA;ssh.user.name=root&#xD;&#xA;ssh.user.default.password=arduino&#xD;&#xA;ssh.host.wwwfiles.path=/www/sd&#xD;&#xA;build.working_directory={runtime.ide.path}&#xD;&#xA;ide.location.preferences.portable={runtime.ide.path}\portable&#xD;&#xA;ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt&#xD;&#xA;ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt&#xD;&#xA;ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15&#xD;&#xA;ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15&#xD;&#xA;ide.contributions.boards.allow=true&#xD;&#xA;ide.contributions.boards.ignore_unless_rewrite_found=true&#xD;&#xA;ide.contributions.libraries.allow=true&#xD;&#xA;ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls&#xD;&#xA;ide.create_platforms_from_boardsTXT.teensy=build.core&#xD;&#xA;ide.appid=arduino16x&#xD;&#xA;location.sketchbook=C:\Users\s133140\Documents\Arduino&#xD;&#xA;vm.core.include=arduino.h&#xD;&#xA;vm.boardsource.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;runtime.platform.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;vm.platformname.name=avr&#xD;&#xA;build.arch=AVR&#xD;&#xA;build.architecture=avr&#xD;&#xA;vmresolved.compiler.path=C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\&#xD;&#xA;vmresolved.tools.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;" visualmicro.application.name="arduino16x" arduino.build.mcu="atmega328p" arduino.upload.protocol="arduino" arduino.build.f_cpu="16000000L" arduino.board.desc="Arduino Duemilanove or Diecimila w/ ATmega328" arduino.board.name="diecimila_atmega328" arduino.upload.port="COM4" visualmicro.platform.name="avr" arduino.build.core="arduino" />
    </VisualStudio>
  </ProjectExtensions>
</Project>
 
'''BaseStation.vcxproj.filters'''
 
<?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="BaseStation.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="menu.ino" />
    <None Include="..\Shared\CommandBook.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="CustomNumericMenuItem.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="__vm\.BaseStation.vsarduino.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>
 
'''CustomNumericMenuItem.h'''
 
/*
  * An example of a custom NumericMenuItem.
  * It tries to display some ASCII graphics in edit mode.
  * This can be useful if you want to give the end user an overview of the value limits.
  *
  * Copyright (c) 2016 arduino-menusystem
  * Licensed under the MIT license (see LICENSE)
  */
#ifndef _CUSTOMNUMERICMENUITEM_H
#define _CUSTOMNUMERICMENUITEM_H
#include <MenuSystem.h>
class CustomNumericMenuItem : public NumericMenuItem
{
public:
    /**
      * @param width the width of the edit mode 'ASCII graphics', must be > 1
      * @param name The name of the menu item.
      * @param value Default value.
      * @param minValue The minimum value.
      * @param maxValue The maximum value.
      * @param increment How much the value should be incremented by.
      * @param valueFormatter The custom formatter. If NULL the String float
      *                      formatter will be used.
      */
    CustomNumericMenuItem(uint8_t width, const char* name, float value,
                          float minValue, float maxValue, float increment=1.0,
                          ValueFormatter_t value_formatter=NULL)
    : NumericMenuItem(name, value, minValue, maxValue, increment,
                      value_formatter),
      _width(width)
    {
    }
    virtual String& get_composite_name(String& buffer) const
    {
        if (is_editing_value())
        {
            // Only display the ASCII graphics in edit mode.
            // make room for a ' ' at the end and the terminating 0
            char graphics[_width + 2];
            // fill the string with '-'
            for (int i = 0; i <_width; i++)
                graphics[i] = '-';
            // insert a '|' at the relative _value position
            graphics[int((_width - 1) * (_value - _minValue) / (_maxValue - _minValue))] = '|';
            graphics[_width] = ' ';
            graphics[_width+1] = 0;
            buffer = graphics;
            if (_value_formatter != NULL)
                buffer += _value_formatter(_value);
            else
                buffer += _value;
            return buffer;
        }
        else
        {
            // Non edit mode: Let parent class handle this
            return NumericMenuItem::get_composite_name(buffer);
        }
    }
private:
    const uint8_t _width;
};
#endif // _CUSTOMNUMERICMENUITEM_H
 
'''menu.ino'''
/*
* serial_nav.ino - Example code using the menu system library
*
* This example shows the menu system being controlled over the serial port.
*
* Copyright (c) 2015, 2016 arduino-menusystem
* Licensed under the MIT license (see LICENSE)
*/
// Menu callback function
// writes the (int) value of a float into a char buffer.
const String format_int(const float value)
{
return String((int)value);
}
// writes the value of a float into a char buffer.
const String format_float(const float value)
{
return String(value);
}
const String format_type(const float value)
{
String buffer;
switch ((int)value)
{
case 0:
buffer += "Go to plant";
tempCommand.command = 't';
break;
case 1:
buffer += "Grab/cut plant";
tempCommand.command = 'g';
break;
case 2:
buffer += "Clean plant";
tempCommand.command = 'c';
break;
case 3:
buffer += "Return home";
tempCommand.command = 'r';
break;
case 4:
buffer += "Move shaft up";
tempCommand.command = 'W';
break;
case 5:
buffer += "Move shaft down";
tempCommand.command = 'S';
break;
case 6:
buffer += "Extend arm";
tempCommand.command = 'D';
break;
case 7:
buffer += "Retract arm";
tempCommand.command = 'A';
break;
case 8:
buffer += "Move grabber";
tempCommand.command = 'i';
break;
case 9:
buffer += "Move arm";
tempCommand.command = 'u';
break;
case 10:
buffer += "Delay";
tempCommand.command = 'd';
break;
case 11:
buffer += "Move";
tempCommand.command = 'm';
break;
default:
buffer += "undef";
break;
}
return buffer;
}
const String format_value(const float value)
{
tempCommand.value = (int)value;
switch (tempCommand.command) {
case 't':
return "plant " + String(tempCommand.value);
case 'g':
case 'c':
case 'r':
case 'W':
case 'A':
case 'S':
case 'D':
return "N/A";
case 'm':
return String(tempCommand.value * 100) + " steps";
case 'u':
return String(tempCommand.value * 10) + " degrees";
case 'i':
return String(tempCommand.value * 10) + " degrees";
case 'd':
return String(tempCommand.value * 500) + " ms";
default:
return "undef";
}
}
void on_add_selected(MenuItem* p_menu_item)
{
if (!addCommand(commandos, tempCommand.command, tempCommand.value)) {
Serial.println();
Serial.println(F("ERROR:"));
Serial.println(F("Command book full!"));
delay(1000);
}
}
void on_del_selected(MenuItem* p_menu_item)
{
if (!deleteCommand(commandos)) {
Serial.println();
Serial.println(F("ERROR:"));
Serial.println(F("No commands to delete!"));
delay(1000);
}
}
void on_send_selected(MenuItem* p_menu_item)
{
if (!sendCommand(commandos)) {
Serial.println(F("ERROR:"));
Serial.println(F("Could not send commands"));
}
delay(1000);
}
void on_demo_selected(MenuItem* p_menu_item) {
int c = countCommand(commandos);
for (int n = 0; n < c; n += 1) {
deleteCommand(commandos);
}
addCommand(commandos, 't', 1);
addCommand(commandos, 'd', 3000);
addCommand(commandos, 'W', 0);
addCommand(commandos, 'S', 0);
addCommand(commandos, 'd', 3000);
addCommand(commandos, 'D', 0);
addCommand(commandos, 'A', 0);
addCommand(commandos, 'd', 3000);
addCommand(commandos, 'c', 0);
}
void on_help_selected(MenuItem* p_menu_item)
{
display_help();
delay(3000);
}
void on_about_selected(MenuItem* p_menu_item)
{
Serial.println(F("This is the Base Station interface"));
Serial.println(F("which controls the seaweed harvesting"));
Serial.println(F("robot."));
Serial.println();
Serial.println(F("Refer to the USE Social Robots"));
Serial.println(F("2015/2016 Q4 - group 5 wiki for"));
Serial.println(F("more information."));
delay(5000);
}
void on_status_selected(MenuItem* p_menu_item)
{
Serial.println(F("Returning status of the robot:"));
Serial.println(F("------------------------------"));
Serial.print(F("Temperature: "));
Serial.println(F("80"));
Serial.print(F("Max speed (RPM): "));
Serial.println(F("300"));
Serial.print(F("Acceleration: "));
Serial.println(F("80"));
Serial.print(F("Motor1 "));
Serial.println(F("running"));
Serial.print(F("Motor2: "));
Serial.println(F("not running"));
Serial.print(F("Motor3: "));
Serial.println(F("not running"));
Serial.print(F("ServoArm (degrees):"));
Serial.println(F("167"));
Serial.print(F("MotorGrab: "));
Serial.println(F("086"));
delay(3000);
}
void on_back_item_selected(MenuItem* p_menu_item)
{
//
}
void display_menu(Menu* p_menu)
{
Serial.write(27);      // ESC command
Serial.print("[2J");    // clear screen command
Serial.write(27);
Serial.print("[H");    // cursor to home command
Serial.print(F("--[ "));
Serial.print(p_menu->get_name());
Serial.println(F(" ]--"));
String buffer;
MenuComponent const* cp_menu_sel = p_menu->get_current_component();
for (int i = 0; i < p_menu->get_num_menu_components(); ++i)
{
MenuComponent const* cp_m_comp = p_menu->get_menu_component(i);
if (cp_menu_sel == cp_m_comp)
Serial.print("> ");
else
Serial.print("  ");
Serial.print(cp_m_comp->get_composite_name(buffer));
Serial.println("");
}
if (p_menu == &muCommand) {
Serial.println();
printCommand(commandos);
}
}
void display_help() {
Serial.println(F("***************"));
Serial.println(F("w,^:      go to previus item (up)"));
Serial.println(F("s,v:      go to next item (down)"));
Serial.println(F("a,esc:    go back (right)"));
Serial.println(F("d,enter:  select \"selected\" item"));
Serial.println(F("h,?:      print this help"));
Serial.println(F("***************"));
}
void serial_handler()
{
char inChar, inChar2;
if ((inChar = Serial.read()) > 0)
{
switch (inChar)
{
case 27: // control characters
delay(25);
if ((inChar2 = Serial.read()) > 0) {
switch (inChar2) {
case 91: // escaped control characters
delay(25);
switch (Serial.read()) {
case 65: // up
case 90: // shift+tab
case 68: // left
ms.prev();
ms.display();
break;
case 66: // down
case 67: // right
ms.next();
ms.display();
break;
}
break;
case 49: // function keys, just display help.
ms.display();
display_help();
break;
}
}
else { // escape
ms.back();
ms.display();
}
break;
case 'w': // w
// Previous item
ms.prev();
ms.display();
break;
case 's': // s
case 9: // tab
// Next item
ms.next();
ms.display();
break;
case 127: // backspace
case 'a': // a
case 3: // Ctrl+C
// Back presed
ms.back();
ms.display();
break;
case 0x0D: // enter
case ' ': // space
case 'd': // d
// Select presed
ms.select();
ms.display();
break;
case '?': // ?
case 0x0F: // F1
case 'h': // h
// Display help
ms.display();
display_help();
break;
default:
break;
}
}
}
 
====Robot====
 
'''CommandBook.ino'''
 
int countCommand(CommandBook *book)
{
int c = 0;
while (book[c].command != NULL && c < BOOKSIZE)
c++;
return c;
}
void addCommand(CommandBook *book, char command, int value)
{
int c = countCommand(book);
book[c].command = command;
book[c].value = value;
}
void runCommand(CommandBook *book)
{
int c = countCommand(book);
for (int i = 0; i < c; i++)
{
switch (book[i].command)
{
case 'm':
{
myStepper.move(book[i].value);
while (myStepper.distanceToGo())
myStepper.run();
myStepper.disableOutputs();
break;
}
case 'd':
{
delay(book[i].value);
break;
}
default:
{
Serial.println("Invaild command!");
break;
}
}
book[i].command = NULL;
book[i].value = NULL;
}
}
void printCommand(CommandBook *book)
{
int c = countCommand(book);
Serial.println("Commandos in book:");
for (int i = 0; i < c; i++)
{
Serial.print('-');
Serial.print(book[i].command);
Serial.print('\t');
Serial.println(book[i].value);
}
Serial.println("Done");
}
 
'''Robot.ino'''
 
/*
Name: Robot.ino
Created: 5/19/2016 4:07:57 PM
Author: Use Waterpret
*/
#define Servo ServoTimer2
//#define ENABLE_DEBUG
//#define REMOTE
#define BOOKSIZE 20
struct CommandBook
{
char command;
int value;
};
#ifdef ENABLE_DEBUG
// disable Serial output
#define debugln(a) (Serial.println(a))
#define debug(a) (Serial.print(a))
#else
#define debugln(a)
#define debug(a)
#endif
#include <Arduino.h> // Fixes some define problems
#include <ServoTimer2.h> // Include servo library
#include <AccelStepper.h> // AccelStepper library for precise and fluid steppercontrol
#include <SPI.h> // The SPI-communication liberary for the antenna
#include <OneWire\OneWire.h> // The OneWire-protocol used by te temp sensor
#include <DallasTemperatureControl\DallasTemperature.h> // DallasTemperature library for controlling the DS18S20 temperature monitor
OneWire oneWire(A0); // Setup a oneWire instance to communicate with any OneWire devices
DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature.
AccelStepper shaftStepper(AccelStepper::FULL4WIRE, 13, 12, 11, 9, TRUE);// initialize the stepper library on pins 13,12,11,9 and disable the output;
AccelStepper kopStepper(AccelStepper::FULL4WIRE, 2, 4, 6, 7, FALSE); // initialize the stepper library on pins 2,4,6,7 and disable the output;
AccelStepper armStepper(AccelStepper::FULL4WIRE, A2, A3, A4, A5, FALSE);// initialize the stepper library on pins A2,A3,A4,A5 and disable the output;
CommandBook commandos[BOOKSIZE] = {}; // array with commands for the Arduino
DeviceAddress motorShaftTemp; // arrays to hold device addresses of the TempSensors
Servo servoArm; // Arm servo signal
Servo servoGrab; // Grabbbing Servo
const int delayRest = 100; // Standard delay for momentum to stablelize
const int armNeutralPosition = 90; // Neutral position of the grabber
const int grabberNeutralPosition = 60; // Ground position of the grabber
const int grabberGrabPosition = 0; // Position for closed grabbers
const int armOffset = 0; // turn ofset for the head in degrees
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution for your motor
const int acceleration = 350; // Acceleration
const float pi = 3.141592654; // this one is a piece of cake
int kopSpeed = 0; // Speed of the kopmotor in RPM
char motorDirection = 1; // direction of the motor
unsigned long previousMillis = 0; // will store last time LED was updatedvccv
float rpm2steps = stepsPerRevolution / 60.0f;
uint8_t* buf = new uint8_t[32];
uint8_t len = 32;
void r_RPMtester(AccelStepper driver); // Small acceleration test.
void r_DirectionTest(); // Small direction test.
bool addCommand(CommandBook *book, char command, int value);
int countCommand(CommandBook *book);
void runCommand(CommandBook *book);
void printCommand(CommandBook *book);
bool deleteCommand(CommandBook *book);
bool sendCommand(CommandBook *book);
/////////////////////////////////
///USER DETERMINED VARIABLES/////
/////////////////////////////////
int armPos = armNeutralPosition;
int grabPos = grabberNeutralPosition;
int remoteStep = 5;
void setup() // Built in initialization block
{
Serial.begin(9600); // open the serial port at 9600 bps:
Serial.println(F("Booting Ariel:"));
Serial.println(F(" -Starting Ariel"));
Serial.println(F(" -Serial port is open @9600."));
nrf24Initialize(false); // Radio initialisation function
Serial.print(F(" -Attaching Arm Servo:\t"));
servoArm.attach(5); // Attach Arm signal to the pin
if (!servoArm.attached())
Serial.println(F("servoArm attach failed"));
else
Serial.println(F("OK"));
servoGrab.attach(3); // Attach Grab signal to the pin
Serial.print(F(" -Attaching Grab Servo:\t"));
if (!servoGrab.attached())
Serial.println(F("servoGrab attach failed"));
else
Serial.println(F("OK"));
sensors.begin(); // Initialise the temperaturesensor bus
Serial.print(F("Gettnig motorShaftTemp address\t"));
if (!sensors.getAddress(motorShaftTemp, 0)) // Check if the temperaturesensors are connected.
Serial.println(F("Unable to find address for motorShaftTemp"));
else
Serial.println(F("OK"));
Serial.print(F(" -Connecting motorShaftTemp:\t"));
if (!sensors.isConnected(motorShaftTemp))
Serial.println(F("motorShaftTemp is not connected"));
else
Serial.println(F("OK"));
Serial.println(F("Attaching armStepper:\t"));
armStepper.setMaxSpeed(220 * rpm2steps);
Serial.print(F(" -Max speed:\t"));
Serial.println(armStepper.maxSpeed());
armStepper.setAcceleration(acceleration);
Serial.print(F(" -Acceleration:\t"));
Serial.println(acceleration);
Serial.print(F(" -Position:\t"));
Serial.println(armStepper.currentPosition());
Serial.println(F("Attaching kopStepper:\t"));
kopStepper.setMaxSpeed(180 * rpm2steps);
Serial.print(F(" -Max speed:\t"));
Serial.println(kopStepper.maxSpeed());
kopStepper.setAcceleration(acceleration);
Serial.print(F(" -Acceleration:\t"));
Serial.println(acceleration);
Serial.print(F(" -Position:\t"));
Serial.println(kopStepper.currentPosition());
Serial.println(F("Attaching shaftStepper:\t"));
shaftStepper.setMaxSpeed(220 * rpm2steps);
Serial.print(F(" -Max speed:\t"));
Serial.println(shaftStepper.maxSpeed());
shaftStepper.setAcceleration(acceleration);
Serial.print(F(" -Acceleration:\t"));
Serial.println(acceleration);
Serial.print(F(" -Position:\t"));
Serial.println(shaftStepper.currentPosition());
Serial.println(F("- SPI diabled"));
SPI.end();
Serial.println(F("Ariel has started"));
}
///////////////////////////////
//////////MAIN LOOP////////////
//////////////////////////////
#ifdef REMOTE
void loop() {
SPI.begin();
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.print(F("Temperature for the Steppermotor is: "));
Serial.println(sensors.getTempC(motorShaftTemp));
if (nrf24ReceiveMessage(buf, &len))
{
Serial.println(F("Message received"));
int c = countCommand(commandos);
for (int n = 0; n < c; n += 1)
{
commandos[n].command = NULL;
commandos[n].value = NULL;
}
c = buf[0];
Serial.println("Received " + String(c) + " commands");
for (int n = 0; n < c; n += 1)
{
addCommand(commandos, (char)buf[n * 3 + 1], (((int)buf[n * 3 + 2]) << 8) + (int)buf[n * 3 + 3]);
}
//digitalWrite(11, LOW);
//digitalWrite(8, HIGH);
//radioSleep();
//SPI.transfer(0xAA);
//SPI.setDataMode(SPI_MODE0);
//delay(2000);
SPI.endTransaction();
SPI.end();
shaftStepper.disableOutputs();
Serial.println(digitalRead(9));
Serial.println(digitalRead(11));
Serial.println(digitalRead(12));
Serial.println(digitalRead(12));
shaftStepper.enableOutputs();
Serial.println(F("Received commands!"));
Serial.println();
printCommand(commandos);
Serial.println(F("Waiting 3 seconds before executing"));
delay(3000);
runCommand(commandos);
delay(1000);
Serial.println();
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.print(F("Temperature for the Steppermotor is: "));
Serial.println(sensors.getTempC(motorShaftTemp));
Serial.println("DONE!");
}
}
#else
void loop()
{
int  c = Serial.read();
switch (c)
{
case '-':
{
remoteStep--;
if (remoteStep == 0)
remoteStep = 1;
Serial.print(F("Stepsize: "));
Serial.println(remoteStep);
break;
}
case '+':
{
remoteStep++;
Serial.print(F("Stepsize: "));
Serial.println(remoteStep);
break;
}
case '(':
{
kopSpeed -= remoteStep;
if (kopSpeed < 0)
kopSpeed = 0;
Serial.print(F("kopSpeed: "));
Serial.println(kopSpeed);
break;
}
case ')':
{
kopSpeed += remoteStep;
if (kopSpeed > kopStepper.maxSpeed())
kopSpeed = kopStepper.maxSpeed();
Serial.print(F("kopSpeed: "));
Serial.println(kopSpeed);
break;
}
case '0':
{
Serial.println(F("All stop!"));
SPI.end();
kopStepper.stop();
while (kopStepper.distanceToGo())
kopStepper.run();
kopSpeed = 0;
grabberNeutral();
armNeutral();
kopStepper.disableOutputs();
armStepper.disableOutputs();
shaftStepper.disableOutputs();
break;
}
case '4':
{
grabPos += remoteStep;
grabberTurnPos(grabPos);
break;
}
case '6':
{
grabPos -= remoteStep;
grabberTurnPos(grabPos);
break;
}
case '8':
{
debug(F("arm offset: "));
debug(armOffset);
armPos += remoteStep;
armTurnPos(armPos);
break;
}
case '2':
{
debug(F("arm offset: "));
debug(armOffset);
armPos -= remoteStep;
armTurnPos(armPos);
break;
}
case '5':
{
Serial.println(F("turning one round @60RPM: "));
kopStepper.setSpeed(60 * rpm2steps);
kopStepper.move(stepsPerRevolution);
kopStepper.runSpeedToPosition();
break;
}
case 'c':
{
r_Cut();
break;
}
case 'r':
{
r_RPMtester(kopStepper);
break;
}
case 'd':
{
r_DirectionTest();
break;
}
case '*':
{
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.print(F("Temperature for the Steppermotor is: "));
Serial.println(sensors.getTempC(motorShaftTemp));
break;
}
case '.':
{
Serial.println(F("Locking the motor for 1 second"));
kopStepper.setSpeed(0);
kopStepper.move(1);
kopStepper.move(-1);
unsigned long previousMillis = millis();
while (millis() - previousMillis <= 1000)
kopStepper.runSpeed();
kopStepper.disableOutputs();
break;
}
case '/':
{
Serial.println(F("Swithcing motor direction"));
motorDirection *= -1;
break;
case '[':
{
Serial.println(F("Reseting arm motor position to 0"));
armStepper.setCurrentPosition(armStepper.currentPosition());
break;
}
case ']':
{
Serial.print(F("Current arm motor position: "));
Serial.println(armStepper.currentPosition());
break;
}
case '{':
{
Serial.println(F("Reseting shaft motor position to 0"));
shaftStepper.setCurrentPosition(shaftStepper.currentPosition());
break;
}
case '}':
{
Serial.print(F("Current shaft motor position: "));
Serial.println(shaftStepper.currentPosition());
break;
}
case '9':
{
Serial.println(F("Extending shaft"));
shaftStepper.moveTo(900);
shaftStepper.runToPosition();
shaftStepper.disableOutputs();
break;
}
case '7':
{
Serial.println(F("Retracting shaft"));
shaftStepper.moveTo(0);
shaftStepper.runToPosition();
shaftStepper.disableOutputs();
break;
}
case '3':
{
Serial.println(F("Extending arm "));
armStepper.moveTo(750);
armStepper.runToPosition();
armStepper.disableOutputs();
break;
}
case '1':
{
Serial.println(F("Retracting arm "));
armStepper.moveTo(0);
armStepper.runToPosition();
armStepper.disableOutputs();
break;
}
case 't':
{
Serial.println("Testing command ");
addCommand(commandos, 't', 1);
addCommand(commandos, 'W', 0);
addCommand(commandos, 'D', 0);
addCommand(commandos, 'c', 0);
addCommand(commandos, 'A', 0);
addCommand(commandos, 'S', 0);
addCommand(commandos, 't', 2);
addCommand(commandos, 'W', 0);
addCommand(commandos, 'D', 0);
addCommand(commandos, 'i', 0);
addCommand(commandos, 'A', 0);
addCommand(commandos, 'S', 0);
addCommand(commandos, 't', 3);
addCommand(commandos, 'W', 0);
addCommand(commandos, 'D', 0);
addCommand(commandos, 'i', 180);
addCommand(commandos, 'A', 0);
addCommand(commandos, 'S', 0);
addCommand(commandos, 't', 0);
delay(1000);
printCommand(commandos);
delay(1000);
runCommand(commandos);
break;
}
case 'g':
{
Serial.println("Arduin Routine");
addCommand(commandos, 'i', 180);
addCommand(commandos, 'd', 1000);
addCommand(commandos, 'i', 0);
addCommand(commandos, 'u', 180);
addCommand(commandos, 'd', 1000);
addCommand(commandos, 'u', 90);
addCommand(commandos, 'd', 1000);
addCommand(commandos, 'u', 0);
addCommand(commandos, 'd', 500);
addCommand(commandos, 'i', 180);
addCommand(commandos, 'd', 1000);
addCommand(commandos, 'i', 0);
printCommand(commandos);
delay(1000);
runCommand(commandos);
break;
}
case '<':
{
Serial.println(F("Spooling up kopStepper"));
kopStepper.move(-2000);
while (kopStepper.distanceToGo() < -1000)
kopStepper.run();
motorDirection = -1;
kopSpeed = -kopStepper.maxSpeed();
break;
}
case '>':
{
Serial.println(F("Spooling up kopStepper"));
kopStepper.move(2000);
while (kopStepper.distanceToGo() > 1000)
kopStepper.run();
motorDirection = 1;
kopSpeed = kopStepper.maxSpeed();
break;
}
}
}
// set the motor speed in RPM:
if (kopSpeed) {
kopStepper.setSpeed(motorDirection * kopSpeed * rpm2steps);
kopStepper.runSpeed(); //Run motor at set speed.
}
else
kopStepper.disableOutputs();
}
#endif // REMOTE
'''Robot.vcxproj'''
 
<?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>{E107B750-A178-4195-BCF5-E1DADA3D52A1}</ProjectGuid>
    <RootNamespace>Robot</RootNamespace>
    <ProjectName>Robot</ProjectName>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</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 />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\s133140\Source\Repos\UseWaterpret\Solution\Robot;C:\Users\s133140\Documents\Arduino\libraries\AccelStepper;C:\Users\s133140\Documents\Arduino\libraries\AccelStepper\utility;C:\Users\s133140\Documents\Arduino\libraries\DallasTemperatureControl;C:\Users\s133140\Documents\Arduino\libraries\DallasTemperatureControl\utility;C:\Users\s133140\Documents\Arduino\libraries\OneWire;C:\Users\s133140\Documents\Arduino\libraries\OneWire\utility;C:\Users\s133140\Documents\Arduino\libraries\RadioHead;C:\Users\s133140\Documents\Arduino\libraries\RadioHead\utility;C:\Users\s133140\Documents\Arduino\libraries\ServoTimer2;C:\Users\s133140\Documents\Arduino\libraries\ServoTimer2\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\default\debuggers;C:\Users\s133140\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\s133140\Source\Repos\UseWaterpret\Solution\Robot\__vm\.Robot.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;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>Disabled</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\Robot;C:\Users\Jochem\Documents\Arduino\libraries\AccelStepper;C:\Users\Jochem\Documents\Arduino\libraries\AccelStepper\utility;C:\Users\Jochem\Documents\Arduino\libraries\DallasTemperatureControl;C:\Users\Jochem\Documents\Arduino\libraries\DallasTemperatureControl\utility;C:\Users\Jochem\Documents\Arduino\libraries\OneWire;C:\Users\Jochem\Documents\Arduino\libraries\OneWire\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Users\Jochem\Documents\Arduino\libraries\ServoTimer2;C:\Users\Jochem\Documents\Arduino\libraries\ServoTimer2\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\Robot\__vm\.Robot.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <WholeProgramOptimization>false</WholeProgramOptimization>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <None Include="..\Shared\CommandBook.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="functions.ino" />
    <None Include="Robot.ino" />
    <None Include="routine.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="__vm\.Robot.vsarduino.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties arduino.upload.maximum_size="30720" arduino.upload.speed="57600" visualmicro.package.name="arduino" arduino.board.property_bag="name=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;&#xA;upload.tool=avrdude&#xD;&#xA;upload.protocol=arduino&#xD;&#xA;bootloader.tool=avrdude&#xD;&#xA;bootloader.low_fuses=0xFF&#xD;&#xA;bootloader.unlock_bits=0x3F&#xD;&#xA;bootloader.lock_bits=0x0F&#xD;&#xA;build.f_cpu=16000000L&#xD;&#xA;build.board=AVR_DUEMILANOVE&#xD;&#xA;build.core=arduino&#xD;&#xA;build.variant=standard&#xD;&#xA;menu.cpu.atmega328=ATmega328&#xD;&#xA;menu.cpu.atmega328.upload.maximum_size=30720&#xD;&#xA;menu.cpu.atmega328.upload.maximum_data_size=2048&#xD;&#xA;menu.cpu.atmega328.upload.speed=57600&#xD;&#xA;menu.cpu.atmega328.bootloader.high_fuses=0xDA&#xD;&#xA;menu.cpu.atmega328.bootloader.extended_fuses=0x05&#xD;&#xA;menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;&#xA;menu.cpu.atmega328.build.mcu=atmega328p&#xD;&#xA;menu.cpu.atmega168=ATmega168&#xD;&#xA;menu.cpu.atmega168.upload.maximum_size=14336&#xD;&#xA;menu.cpu.atmega168.upload.maximum_data_size=1024&#xD;&#xA;menu.cpu.atmega168.upload.speed=19200&#xD;&#xA;menu.cpu.atmega168.bootloader.high_fuses=0xdd&#xD;&#xA;menu.cpu.atmega168.bootloader.extended_fuses=0x00&#xD;&#xA;menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex&#xD;&#xA;menu.cpu.atmega168.build.mcu=atmega168&#xD;&#xA;runtime.ide.path=C:\Program Files (x86)\Arduino&#xD;&#xA;build.system.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr\system&#xD;&#xA;runtime.ide.version=10609&#xD;&#xA;target_package=arduino&#xD;&#xA;target_platform=avr&#xD;&#xA;runtime.hardware.path=C:\Program Files (x86)\Arduino\hardware\arduino&#xD;&#xA;originalid=diecimila&#xD;&#xA;intellisense.tools.path={runtime.tools.avr-gcc.path}/&#xD;&#xA;intellisense.include.paths={intellisense.tools.path}avr/include/;{intellisense.tools.path}/avr/include/avr/;{intellisense.tools.path}lib\gcc\avr\4.8.1\include&#xD;&#xA;tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram&#xD;&#xA;tools.atprogram.cmd.setwinpath=true&#xD;&#xA;tools.atprogram.program.params.verbose=-v&#xD;&#xA;tools.atprogram.program.params.quiet=-q&#xD;&#xA;tools.atprogram.program.pattern=&quot;{cmd.path}&quot; -d {build.mcu} {program.verbose} {program.extra_params} program -c -f &quot;{build.path}\{build.project_name}.hex&quot;&#xD;&#xA;tools.atprogram.program.xpattern=&quot;{cmd.path}&quot; {AVRSTUDIO_BACKEND_CONNECTION} -d {build.mcu} {program.verbose} {program.extra_params} program -c -f &quot;{build.path}\{build.project_name}.hex&quot;&#xD;&#xA;tools.atprogram.erase.params.verbose=-v&#xD;&#xA;tools.atprogram.erase.params.quiet=-q&#xD;&#xA;tools.atprogram.bootloader.params.verbose=-v&#xD;&#xA;tools.atprogram.bootloader.params.quiet=-q&#xD;&#xA;tools.atprogram.bootloader.pattern=&quot;{cmd.path}&quot; -d {build.mcu} {bootloader.verbose}  program -c -f &quot;{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}&quot;&#xD;&#xA;version=1.6.11&#xD;&#xA;compiler.warning_flags=-w&#xD;&#xA;compiler.warning_flags.none=-w&#xD;&#xA;compiler.warning_flags.default=&#xD;&#xA;compiler.warning_flags.more=-Wall&#xD;&#xA;compiler.warning_flags.all=-Wall -Wextra&#xD;&#xA;compiler.path={runtime.tools.avr-gcc.path}/bin/&#xD;&#xA;compiler.c.cmd=avr-gcc&#xD;&#xA;compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD&#xD;&#xA;compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections&#xD;&#xA;compiler.c.elf.cmd=avr-gcc&#xD;&#xA;compiler.S.flags=-c -g -x assembler-with-cpp&#xD;&#xA;compiler.cpp.cmd=avr-g++&#xD;&#xA;compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD&#xD;&#xA;compiler.ar.cmd=avr-ar&#xD;&#xA;compiler.ar.flags=rcs&#xD;&#xA;compiler.objcopy.cmd=avr-objcopy&#xD;&#xA;compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0&#xD;&#xA;compiler.elf2hex.flags=-O ihex -R .eeprom&#xD;&#xA;compiler.elf2hex.cmd=avr-objcopy&#xD;&#xA;compiler.ldflags=&#xD;&#xA;compiler.size.cmd=avr-size&#xD;&#xA;build.extra_flags=&#xD;&#xA;compiler.c.extra_flags=&#xD;&#xA;compiler.c.elf.extra_flags=&#xD;&#xA;compiler.S.extra_flags=&#xD;&#xA;compiler.cpp.extra_flags=&#xD;&#xA;compiler.ar.extra_flags=&#xD;&#xA;compiler.objcopy.eep.extra_flags=&#xD;&#xA;compiler.elf2hex.extra_flags=&#xD;&#xA;recipe.c.o.pattern=&quot;{compiler.path}{compiler.c.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;recipe.cpp.o.pattern=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;recipe.S.o.pattern=&quot;{compiler.path}{compiler.c.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{object_file}&quot;&#xD;&#xA;archive_file_path={build.path}/{archive_file}&#xD;&#xA;recipe.ar.pattern=&quot;{compiler.path}{compiler.ar.cmd}&quot; {compiler.ar.flags} {compiler.ar.extra_flags} &quot;{archive_file_path}&quot; &quot;{object_file}&quot;&#xD;&#xA;recipe.c.combine.pattern=&quot;{compiler.path}{compiler.c.elf.cmd}&quot; {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o &quot;{build.path}/{build.project_name}.elf&quot; {object_files} &quot;{build.path}/{archive_file}&quot; &quot;-L{build.path}&quot; -lm&#xD;&#xA;recipe.objcopy.eep.pattern=&quot;{compiler.path}{compiler.objcopy.cmd}&quot; {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} &quot;{build.path}/{build.project_name}.elf&quot; &quot;{build.path}/{build.project_name}.eep&quot;&#xD;&#xA;recipe.objcopy.hex.pattern=&quot;{compiler.path}{compiler.elf2hex.cmd}&quot; {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} &quot;{build.path}/{build.project_name}.elf&quot; &quot;{build.path}/{build.project_name}.hex&quot;&#xD;&#xA;recipe.output.tmp_file={build.project_name}.hex&#xD;&#xA;recipe.output.save_file={build.project_name}.{build.variant}.hex&#xD;&#xA;recipe.size.pattern=&quot;{compiler.path}{compiler.size.cmd}&quot; -A &quot;{build.path}/{build.project_name}.elf&quot;&#xD;&#xA;recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*&#xD;&#xA;recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*&#xD;&#xA;recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*&#xD;&#xA;preproc.includes.flags=-w -x c++ -M -MG -MP&#xD;&#xA;recipe.preproc.includes=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot;&#xD;&#xA;preproc.macros.flags=-w -x c++ -E -CC&#xD;&#xA;recipe.preproc.macros=&quot;{compiler.path}{compiler.cpp.cmd}&quot; {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} &quot;{source_file}&quot; -o &quot;{preprocessed_file_path}&quot;&#xD;&#xA;tools.avrdude.path={runtime.tools.avrdude.path}&#xD;&#xA;tools.avrdude.cmd.path={path}/bin/avrdude&#xD;&#xA;tools.avrdude.config.path={path}/etc/avrdude.conf&#xD;&#xA;tools.avrdude.upload.params.verbose=-v&#xD;&#xA;tools.avrdude.upload.params.quiet=-q -q&#xD;&#xA;tools.avrdude.upload.params.noverify=-V&#xD;&#xA;tools.avrdude.upload.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D &quot;-Uflash:w:{build.path}/{build.project_name}.hex:i&quot;&#xD;&#xA;tools.avrdude.program.params.verbose=-v&#xD;&#xA;tools.avrdude.program.params.quiet=-q -q&#xD;&#xA;tools.avrdude.program.params.noverify=-V&#xD;&#xA;tools.avrdude.program.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} &quot;-Uflash:w:{build.path}/{build.project_name}.hex:i&quot;&#xD;&#xA;tools.avrdude.erase.params.verbose=-v&#xD;&#xA;tools.avrdude.erase.params.quiet=-q -q&#xD;&#xA;tools.avrdude.erase.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {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&#xD;&#xA;tools.avrdude.bootloader.params.verbose=-v&#xD;&#xA;tools.avrdude.bootloader.params.quiet=-q -q&#xD;&#xA;tools.avrdude.bootloader.pattern=&quot;{cmd.path}&quot; &quot;-C{config.path}&quot; {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} &quot;-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i&quot; -Ulock:w:{bootloader.lock_bits}:m&#xD;&#xA;tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}&#xD;&#xA;build.usb_manufacturer=&quot;Unknown&quot;&#xD;&#xA;build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'&#xD;&#xA;vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\arduino16x&#xD;&#xA;avrisp.name=AVR ISP&#xD;&#xA;avrisp.communication=serial&#xD;&#xA;avrisp.protocol=stk500v1&#xD;&#xA;avrisp.program.protocol=stk500v1&#xD;&#xA;avrisp.program.tool=avrdude&#xD;&#xA;avrisp.program.extra_params=-P{serial.port}&#xD;&#xA;avrispmkii.name=AVRISP mkII&#xD;&#xA;avrispmkii.communication=usb&#xD;&#xA;avrispmkii.protocol=stk500v2&#xD;&#xA;avrispmkii.program.protocol=stk500v2&#xD;&#xA;avrispmkii.program.tool=avrdude&#xD;&#xA;avrispmkii.program.extra_params=-Pusb&#xD;&#xA;usbtinyisp.name=USBtinyISP&#xD;&#xA;usbtinyisp.protocol=usbtiny&#xD;&#xA;usbtinyisp.program.tool=avrdude&#xD;&#xA;usbtinyisp.program.extra_params=&#xD;&#xA;arduinoisp.name=ArduinoISP&#xD;&#xA;arduinoisp.protocol=arduinoisp&#xD;&#xA;arduinoisp.program.tool=avrdude&#xD;&#xA;arduinoisp.program.extra_params=&#xD;&#xA;usbasp.name=USBasp&#xD;&#xA;usbasp.communication=usb&#xD;&#xA;usbasp.protocol=usbasp&#xD;&#xA;usbasp.program.protocol=usbasp&#xD;&#xA;usbasp.program.tool=avrdude&#xD;&#xA;usbasp.program.extra_params=-Pusb&#xD;&#xA;parallel.name=Parallel Programmer&#xD;&#xA;parallel.protocol=dapa&#xD;&#xA;parallel.force=true&#xD;&#xA;parallel.program.tool=avrdude&#xD;&#xA;parallel.program.extra_params=-F&#xD;&#xA;arduinoasisp.name=Arduino as ISP&#xD;&#xA;arduinoasisp.communication=serial&#xD;&#xA;arduinoasisp.protocol=stk500v1&#xD;&#xA;arduinoasisp.speed=19200&#xD;&#xA;arduinoasisp.program.protocol=stk500v1&#xD;&#xA;arduinoasisp.program.speed=19200&#xD;&#xA;arduinoasisp.program.tool=avrdude&#xD;&#xA;arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}&#xD;&#xA;usbGemma.name=Arduino Gemma&#xD;&#xA;usbGemma.protocol=arduinogemma&#xD;&#xA;usbGemma.program.tool=avrdude&#xD;&#xA;usbGemma.program.extra_params=&#xD;&#xA;usbGemma.config.path={runtime.platform.path}/bootloaders/gemma/avrdude.conf&#xD;&#xA;stk500.name=Atmel STK500 development board&#xD;&#xA;stk500.communication=serial&#xD;&#xA;stk500.protocol=stk500&#xD;&#xA;stk500.program.protocol=stk500&#xD;&#xA;stk500.program.tool=avrdude&#xD;&#xA;stk500.program.extra_params=-P{serial.port}&#xD;&#xA;buspirate.name=BusPirate as ISP&#xD;&#xA;buspirate.communication=serial&#xD;&#xA;buspirate.protocol=buspirate&#xD;&#xA;buspirate.program.protocol=buspirate&#xD;&#xA;buspirate.program.tool=avrdude&#xD;&#xA;buspirate.program.extra_params=-P{serial.port}&#xD;&#xA;runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avrdude-6.0.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;runtime.tools.avr-gcc-4.8.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;upload.maximum_size=30720&#xD;&#xA;upload.maximum_data_size=2048&#xD;&#xA;upload.speed=57600&#xD;&#xA;bootloader.high_fuses=0xDA&#xD;&#xA;bootloader.extended_fuses=0x05&#xD;&#xA;bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;&#xA;build.mcu=atmega328p&#xD;&#xA;runtime.vm.boardinfo.id=diecimila_atmega328&#xD;&#xA;runtime.vm.boardinfo.name=diecimila_atmega328&#xD;&#xA;runtime.vm.boardinfo.desc=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;&#xA;runtime.vm.boardinfo.src_location=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;ide.hint=For use with Arduino.cc 1.6.2+ ide&#xD;&#xA;ide.location.key=Arduino16x&#xD;&#xA;ide.location.ide.winreg=Arduino 1.6.x Application&#xD;&#xA;ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook&#xD;&#xA;ide.location.sketchbook.preferences=sketchbook.path&#xD;&#xA;ide.default.revision_name=1.6.9&#xD;&#xA;ide.default.version=10609&#xD;&#xA;ide.default.package=arduino&#xD;&#xA;ide.default.platform=avr&#xD;&#xA;ide.multiplatform=true&#xD;&#xA;ide.includes=arduino.h&#xD;&#xA;ide.exe_name=arduino&#xD;&#xA;ide.platformswithoutpackage=false&#xD;&#xA;ide.includes.fallback=wprogram.h&#xD;&#xA;ide.extension=ino&#xD;&#xA;ide.extension.fallback=pde&#xD;&#xA;ide.versionGTEQ=160&#xD;&#xA;ide.exe=arduino.exe&#xD;&#xA;ide.hosts=atmel&#xD;&#xA;ide.url=http://arduino.cc/en/Main/Software&#xD;&#xA;ide.help.reference.path=reference\arduino.cc\en\Reference&#xD;&#xA;ide.help.reference.path2=reference\www.arduino.cc\en\Reference&#xD;&#xA;ide.help.reference.serial=reference\www.arduino.cc\en\Serial&#xD;&#xA;vm.debug=true&#xD;&#xA;software=ARDUINO&#xD;&#xA;ssh.user.name=root&#xD;&#xA;ssh.user.default.password=arduino&#xD;&#xA;ssh.host.wwwfiles.path=/www/sd&#xD;&#xA;build.working_directory={runtime.ide.path}&#xD;&#xA;ide.location.preferences.portable={runtime.ide.path}\portable&#xD;&#xA;ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt&#xD;&#xA;ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt&#xD;&#xA;ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15&#xD;&#xA;ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15&#xD;&#xA;ide.contributions.boards.allow=true&#xD;&#xA;ide.contributions.boards.ignore_unless_rewrite_found=true&#xD;&#xA;ide.contributions.libraries.allow=true&#xD;&#xA;ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls&#xD;&#xA;ide.create_platforms_from_boardsTXT.teensy=build.core&#xD;&#xA;ide.appid=arduino16x&#xD;&#xA;location.sketchbook=C:\Users\s133140\Documents\Arduino&#xD;&#xA;vm.core.include=arduino.h&#xD;&#xA;vm.boardsource.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;runtime.platform.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;&#xA;vm.platformname.name=avr&#xD;&#xA;build.arch=AVR&#xD;&#xA;build.architecture=avr&#xD;&#xA;vmresolved.compiler.path=C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\&#xD;&#xA;vmresolved.tools.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;&#xA;" visualmicro.application.name="arduino16x" arduino.build.mcu="atmega328p" arduino.upload.protocol="arduino" arduino.build.f_cpu="16000000L" arduino.board.desc="Arduino Duemilanove or Diecimila w/ ATmega328" arduino.board.name="diecimila_atmega328" arduino.upload.port="COM5" visualmicro.platform.name="avr" arduino.build.core="arduino" />
    </VisualStudio>
  </ProjectExtensions>
</Project>
 
'''Robot.vcxproj.filters'''
 
<?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="functions.ino" />
    <None Include="routine.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="Robot.ino" />
    <None Include="..\Shared\CommandBook.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="__vm\.Robot.vsarduino.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>
 
'''functions.ino'''
 
////////////////////////////////////////
//////ARM AND GRABBER FUNCTIONS/////////
////////////////////////////////////////
void armNeutral()
{
debugln("Arm to neutral position");
servoArm.write(armNeutralPosition); //neutral position
armPos = armNeutralPosition;
delay(100);
}
void grabberNeutral()
{
debugln("Grabber to neutral position");
servoGrab.write(grabberNeutralPosition); //neutral position
grabPos = grabberNeutralPosition;
delay(200);
}
void grabberGrab()
{
debugln("Grabbing");
servoGrab.write(180);
delay(1000);
servoGrab.write(grabberGrabPosition); //Grab (and move up arm?)
delay(1000);
}
void grabberTurnPos(int pos)
{
debug("Grabber to position ");
debugln(pos);
servoGrab.write(pos); //servo position
delay(100);
}
void armTurnPos(int pos)
{
debug("Arm to position ");
debugln(pos);
servoArm.write(pos); //servo position
delay(100);
}
void resetServos()
{
debugln("Resetting servo");
delay(80);
servoGrab.write(grabPos + 1);
servoArm.write(armPos + 1);
delay(20);
servoGrab.write(grabPos);
servoArm.write(armPos);
}
void leBlink(int ledPin, int n)
{
for (int i = 0; i < n; i++)
{
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
}
}
/*not used
void setTemperatureAlarm(int temp)
{
sensors.setLowAlarmTemp(motorShaftTemp, -10);
sensors.setHighAlarmTemp(motorShaftTemp, temp);
}
void checkAlarm()
{
if (sensors.hasAlarm())
{
Serial.println("ALARM ON MOTOR 1");
}
}*/
 
'''routine.ino'''
 
void r_Cut()
{
grabberGrab();
for (int i = 0; i < 20; i++)
{
armTurnPos(armPos + 45);
delay(200);
armTurnPos(armPos - 45);
delay(200);
}
delay(500);
grabberNeutral();
armTurnPos(armPos);
}
void r_Grab()
{
grabberGrab();
grabberNeutral();
armTurnPos(armPos);
}
void r_RPMtester(AccelStepper driver)
{
Serial.println(F("Testing RPM:"));
Serial.print(F(" -Max speed: "));
Serial.println(driver.maxSpeed());
for (int i = 100; i < 500; i += 50)
{
Serial.print(F(" -Acceleration: "));
Serial.println(i);
driver.setAcceleration(i);
driver.move(500 * stepsPerRevolution);
while (driver.distanceToGo())
driver.run();
Serial.println(F("Starting next iteration in 1 second"));
delay(1000);
}
Serial.println(F("Nope....Test is over. Resuming in 3 seconds"));
delay(3000);
}
void r_DirectionTest()
{
Serial.println(F("Testing Drirectoion:"));
Serial.println(F("------------------"));
Serial.println(F("Arm motor +"));
armStepper.move(50);
armStepper.runToPosition();
armStepper.move(-50);
armStepper.runToPosition();
armStepper.disableOutputs();
Serial.println(F("Shaft motor +"));
shaftStepper.move(50);
shaftStepper.runToPosition();
shaftStepper.move(-50);
shaftStepper.runToPosition();
shaftStepper.disableOutputs();
Serial.println(F("Kop motor +"));
kopStepper.move(50);
kopStepper.runToPosition();
kopStepper.move(-50);
kopStepper.runToPosition();
kopStepper.disableOutputs();
}
void r_MovePlant(int plant)
{
kopStepper.moveTo((int)200*plant);
kopStepper.runToPosition();
}
 
====Shared====
 
'''CommandBook.ino'''
 
int countCommand(CommandBook *book)
{
int c = 0;
while (book[c].command != NULL && c < BOOKSIZE)
c++;
return c;
}
bool addCommand(CommandBook *book, char command, int value)
{
int c = countCommand(book);
if (c >= BOOKSIZE) {
return false;
}
book[c].command = command;
book[c].value = value;
return true;
}
#ifndef BASESTATION
void runCommand(CommandBook *book)
{
int c = countCommand(book);
for (int i = 0; i < c; i++)
{
switch (book[i].command)
{
case 't':
{
r_MovePlant(book[i].value);
break;
}
case 'c':
{
r_Cut();
break;
}
case 'g':
{
r_Grab();
break;
}
case 'r':
{
r_MovePlant(0);
break;
}
case 'W':
{
shaftStepper.enableOutputs();
shaftStepper.moveTo(900);
shaftStepper.runToPosition();
shaftStepper.disableOutputs();
break;
}
case 'S':
{
shaftStepper.enableOutputs();
shaftStepper.moveTo(0);
shaftStepper.runToPosition();
//shaftStepper.disableOutputs(); //Keeping the shaft on it's place ONE TIME ONLY FOR DEMO (MABYE 2-3, but check temperature)
break;
}
case 'D':
{
armStepper.enableOutputs();
armStepper.moveTo(750);
armStepper.runToPosition();
armStepper.disableOutputs();
break;
}
case 'A':
{
armStepper.enableOutputs();
armStepper.moveTo(0);
armStepper.runToPosition();
armStepper.disableOutputs();
break;
}
case 'u':
{
armTurnPos(book[i].value);
break;
}
case 'i':
{
grabberTurnPos(book[i].value );
break;
}
case 'd':
{
delay(book[i].value);
break;
}
case 'm':
{
kopStepper.move(book[i].value);
break;
}
default: // "undef"
break;
book[i].command = NULL;
book[i].value = NULL;
}
Serial.print('-');
Serial.print(book[i].command);
Serial.print('\t');
Serial.print(book[i].value);
Serial.println("\tDone");
}
Serial.println("All commands done.");
}
#endif // BASESTATION
void printCommand(CommandBook *book)
{
int c = countCommand(book);
Serial.println(F("Commandos in book:"));
for (int i = 0; i < c; i++)
{
Serial.print('-');
Serial.print(book[i].command);
Serial.print('\t');
Serial.println(book[i].value);
}
Serial.println(F("-END OF COMMANDS"));
}
bool deleteCommand(CommandBook *book)
{
int c = countCommand(book);
if (c == 0) {
return false;
}
book[c - 1].command = NULL;
book[c - 1].value = NULL;
return true;
}
bool sendCommand(CommandBook *book) {
int c = countCommand(book);
uint8_t* buf = new uint8_t[BOOKSIZE * 3 + 1];
buf[0] = c;
for (int n = 0; n < c; n += 1) {
buf[(n * 3) + 1] = (uint8_t) book[n].command;
buf[(n * 3) + 2] = (uint8_t) (book[n].value >> 8);
buf[(n * 3) + 3] = (uint8_t)(book[n].value & 0xFF);
}
Serial.println(F("Sending message..."));
bool result = nrf24SendMessage(buf, c * 3 + 1);
delete buf;
return result;
}
 
'''nrf24communication.ino'''
 
#include <RHReliableDatagram.h>
#include <RH_NRF24.h>
#include <SPI.h>
#define CLIENT_ADDRESS 1
#define SERVER_ADDRESS 2
// Singleton instance of the radio driver
RH_NRF24 driver;
// RH_NRF24 driver(8, 7);  // For RFM73 on Anarduino Mini
// Class to manage message delivery and receipt, using the driver declared above
RHReliableDatagram manager(driver);
bool isServer;
uint8_t _nrf24_buf[32];
uint8_t _nrf24_blen = 0;
bool nrf24Initialize(bool server) {
Serial.print(F(" -Initiating radio:\t"));
if (manager.init()) {
Serial.println(F("OK"));
Serial.print(F(" -Setting radio channel:\t"));
if (!driver.setChannel(1)) {
return false;
Serial.println(F("setChannel failed"));
}
else {
Serial.println(F("Channel 1"));
}
Serial.print(F(" -Setting radio settings:\t"));
if (!driver.setRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm)) {
Serial.println(F("setRF failed"));
return false;
}
else {
Serial.println(F("2Mbps, 0dBm"));
}
}
else {
Serial.println(F("FAILED!!!"));
return false;
}
if (server) {
manager.setThisAddress(SERVER_ADDRESS);
}
else {
manager.setThisAddress(CLIENT_ADDRESS);
}
isServer = server;
return true;
}
bool compareBuffers(uint8_t *buf1, uint8_t *buf2, uint8_t len) {
for (uint8_t n = 0; n < len; n += 1) {
if (buf1[n] != buf2[n]) {
return false;
}
}
return true;
}
void nrf24DebugPrint(char* str) {
if (true) {
Serial.println(str);
}
}
bool nrf24ReceiveMessage(uint8_t* str, uint8_t* len) {
uint8_t from;
if (!manager.waitAvailableTimeout(3000)) {
return false;
}
if (!manager.recvfromAck(str, len, &from)) {
debugln(F("Couldn't receive message"));
return false;
}
uint8_t* _nrf24_buf = (uint8_t *) "OK";
if (manager.sendtoWait(_nrf24_buf, 3, from)) {
return true;
}
debugln(F("Did not receive acknowledgement on 'OK'"));
return false;
}
bool nrf24SendMessage(uint8_t* str, uint8_t len) {
uint8_t address = SERVER_ADDRESS;
if (isServer) {
address = CLIENT_ADDRESS;
}
if (!manager.sendtoWait(str, len, address)) {
debugln(F("No acknowledgement received"));
return false;
}
if (!manager.waitAvailableTimeout(1000)) {
return false;
}
uint8_t from;
if (manager.recvfromAck(_nrf24_buf, &_nrf24_blen, &from)) {
return true;
}
debugln(F("Could not receive 'OK'"));
return false;
}
bool radioSleep()
{
driver.setModeIdle();
if (driver.sleep())
{
return true;
}
else
return false;
}

Latest revision as of 16:24, 20 June 2016

Repository: https://github.com/Petzep/UseWaterpret

Repository

Library

Libraries used:

  • Arduino_Menu
  • DallasTemperatureControl
  • OneWire
  • RadioHead-1.59
  • ServoTimer2

Solution

Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Robot", "Robot\Robot.vcxproj", "{E107B750-A178-4195-BCF5-E1DADA3D52A1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseStation", "BaseStation\BaseStation.vcxproj", "{194F20BC-E954-42EA-99FE-BA4D6577DDA3}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Debug|x86 = Debug|x86
		Release|x64 = Release|x64
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x64.ActiveCfg = Debug|Win32
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x86.ActiveCfg = Debug|Win32
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Debug|x86.Build.0 = Debug|Win32
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x64.ActiveCfg = Release|Win32
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x86.ActiveCfg = Release|Win32
		{E107B750-A178-4195-BCF5-E1DADA3D52A1}.Release|x86.Build.0 = Release|Win32
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x64.ActiveCfg = Debug|x64
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x64.Build.0 = Debug|x64
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x86.ActiveCfg = Debug|Win32
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Debug|x86.Build.0 = Debug|Win32
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x64.ActiveCfg = Release|x64
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x64.Build.0 = Release|x64
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x86.ActiveCfg = Release|Win32
		{194F20BC-E954-42EA-99FE-BA4D6577DDA3}.Release|x86.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

BaseStation

BaseStation.ino

/*
 Name:		BaseStation.ino
 Created:	5/19/2016 4:07:46 PM
 Author:	Use Waterpret
*/

#include <SPI.h>

#define ENABLE_DEBUG
#define BOOKSIZE 10
#define BASESTATION

#ifdef ENABLE_DEBUG
// disable Serial output
#define debugln(a) (Serial.println(a))
#define debug(a) (Serial.print(a))
#else
#define debugln(a)
#define debug(a)
#endif

struct CommandBook
{
	char command;
	int value;
}tempCommand;

//menu
#include <MenuSystem.h>
#include "CustomNumericMenuItem.h"

// forward declarations
const String format_float(const float value);
const String format_int(const float value);
const String format_color(const float value);
const String format_type(const float value);
const String format_value(const float value);
void display_menu(Menu* p_menu);
void on_status_selected(MenuItem* p_menu_item);
void on_back_item_selected(MenuItem* p_menu_item);
void on_help_selected(MenuItem* p_menu_item);
void on_about_selected(MenuItem* p_menu_item);
void on_add_selected(MenuItem* p_menu_item);
void on_del_selected(MenuItem* p_menu_item);
void on_demo_selected(MenuItem* p_menu_item);
void on_send_selected(MenuItem* p_menu_item);
bool addCommand(CommandBook *book, char command, int value);
int countCommand(CommandBook *book);
void runCommand(CommandBook *book);
void printCommand(CommandBook *book);
bool deleteCommand(CommandBook *book);
bool sendCommand(CommandBook *book);
CommandBook commandos[BOOKSIZE] = {};				// array with commands for the Arduino

// Menu variables
MenuSystem ms;
Menu mm("Main Menu", &display_menu);
	Menu muCommand("Command Builder..", &display_menu);
		NumericMenuItem muCommand_type("Command type", 0, 0, 11, 1, format_type);
		NumericMenuItem muCommand_value("Value", 0, -15, 15, 1, format_value);
		MenuItem muCommand_add("Add command to CommandBook", &on_add_selected);
		MenuItem muCommand_delete("Delete command from CommandBook", &on_del_selected);
		MenuItem muCommand_demo("Set demo sequence", &on_demo_selected);
		MenuItem muCommand_send("Send CommandBook to Robot", &on_send_selected);
	MenuItem muRobot_status("Status", &on_status_selected);
	BackMenuItem mu_back("Back..", &on_back_item_selected, &ms);
	MenuItem mm_help("Help", &on_help_selected);
	MenuItem mm_about("About", &on_about_selected);

void setup()
{
	Serial.begin(9600);
	nrf24Initialize(true);
	delay(3000);

	mm.add_menu(&muCommand);
		muCommand.add_item(&muCommand_type);
		muCommand.add_item(&muCommand_value);
		muCommand.add_item(&muCommand_add);
		muCommand.add_item(&muCommand_delete);
		muCommand.add_item(&muCommand_demo);
		muCommand.add_item(&muCommand_send);
		muCommand.add_item(&mu_back);
	mm.add_item(&muRobot_status);
	mm.add_item(&mm_help);
	mm.add_item(&mm_about);
	ms.set_root_menu(&mm);

	display_help();
	ms.display();
}

void loop() {
	serial_handler();




}

BaseStation.vcxproj

<?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>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{194F20BC-E954-42EA-99FE-BA4D6577DDA3}</ProjectGuid>
    <RootNamespace>BaseStation</RootNamespace>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </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>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <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|x64'">
    <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>$(SolutionDir)Shared;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\s133140\Source\Repos\UseWaterpret\Solution\BaseStation;C:\Users\s133140\Documents\Arduino\libraries\Arduino_Menu;C:\Users\s133140\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\s133140\Documents\Arduino\libraries\RadioHead;C:\Users\s133140\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\default\debuggers;C:\Users\s133140\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\s133140\Source\Repos\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_UNO;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </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>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu;C:\Users\Jochem\Documents\Arduino\libraries\Arduino_Menu\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\BaseStation\__vm\.BaseStation.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <WholeProgramOptimization>false</WholeProgramOptimization>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_UNO;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <None Include="..\Shared\CommandBook.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="BaseStation.ino">
      <FileType>CppCode</FileType>
    </None>
    <None Include="menu.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="CustomNumericMenuItem.h" />
    <ClInclude Include="__vm\.BaseStation.vsarduino.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties arduino.upload.maximum_size="30720" arduino.upload.speed="57600" visualmicro.package.name="arduino" arduino.board.property_bag="name=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;
upload.tool=avrdude&#xD;
upload.protocol=arduino&#xD;
bootloader.tool=avrdude&#xD;
bootloader.low_fuses=0xFF&#xD;
bootloader.unlock_bits=0x3F&#xD;
bootloader.lock_bits=0x0F&#xD;
build.f_cpu=16000000L&#xD;
build.board=AVR_DUEMILANOVE&#xD;
build.core=arduino&#xD;
build.variant=standard&#xD;
menu.cpu.atmega328=ATmega328&#xD;
menu.cpu.atmega328.upload.maximum_size=30720&#xD;
menu.cpu.atmega328.upload.maximum_data_size=2048&#xD;
menu.cpu.atmega328.upload.speed=57600&#xD;
menu.cpu.atmega328.bootloader.high_fuses=0xDA&#xD;
menu.cpu.atmega328.bootloader.extended_fuses=0x05&#xD;
menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;
menu.cpu.atmega328.build.mcu=atmega328p&#xD;
menu.cpu.atmega168=ATmega168&#xD;
menu.cpu.atmega168.upload.maximum_size=14336&#xD;
menu.cpu.atmega168.upload.maximum_data_size=1024&#xD;
menu.cpu.atmega168.upload.speed=19200&#xD;
menu.cpu.atmega168.bootloader.high_fuses=0xdd&#xD;
menu.cpu.atmega168.bootloader.extended_fuses=0x00&#xD;
menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex&#xD;
menu.cpu.atmega168.build.mcu=atmega168&#xD;
runtime.ide.path=C:\Program Files (x86)\Arduino&#xD;
build.system.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr\system&#xD;
runtime.ide.version=10609&#xD;
target_package=arduino&#xD;
target_platform=avr&#xD;
runtime.hardware.path=C:\Program Files (x86)\Arduino\hardware\arduino&#xD;
originalid=diecimila&#xD;
intellisense.tools.path={runtime.tools.avr-gcc.path}/&#xD;
intellisense.include.paths={intellisense.tools.path}avr/include/;{intellisense.tools.path}/avr/include/avr/;{intellisense.tools.path}lib\gcc\avr\4.8.1\include&#xD;
tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram&#xD;
tools.atprogram.cmd.setwinpath=true&#xD;
tools.atprogram.program.params.verbose=-v&#xD;
tools.atprogram.program.params.quiet=-q&#xD;
tools.atprogram.program.pattern="{cmd.path}" -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"&#xD;
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"&#xD;
tools.atprogram.erase.params.verbose=-v&#xD;
tools.atprogram.erase.params.quiet=-q&#xD;
tools.atprogram.bootloader.params.verbose=-v&#xD;
tools.atprogram.bootloader.params.quiet=-q&#xD;
tools.atprogram.bootloader.pattern="{cmd.path}" -d {build.mcu} {bootloader.verbose}  program -c -f "{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}"&#xD;
version=1.6.11&#xD;
compiler.warning_flags=-w&#xD;
compiler.warning_flags.none=-w&#xD;
compiler.warning_flags.default=&#xD;
compiler.warning_flags.more=-Wall&#xD;
compiler.warning_flags.all=-Wall -Wextra&#xD;
compiler.path={runtime.tools.avr-gcc.path}/bin/&#xD;
compiler.c.cmd=avr-gcc&#xD;
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD&#xD;
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections&#xD;
compiler.c.elf.cmd=avr-gcc&#xD;
compiler.S.flags=-c -g -x assembler-with-cpp&#xD;
compiler.cpp.cmd=avr-g++&#xD;
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD&#xD;
compiler.ar.cmd=avr-ar&#xD;
compiler.ar.flags=rcs&#xD;
compiler.objcopy.cmd=avr-objcopy&#xD;
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0&#xD;
compiler.elf2hex.flags=-O ihex -R .eeprom&#xD;
compiler.elf2hex.cmd=avr-objcopy&#xD;
compiler.ldflags=&#xD;
compiler.size.cmd=avr-size&#xD;
build.extra_flags=&#xD;
compiler.c.extra_flags=&#xD;
compiler.c.elf.extra_flags=&#xD;
compiler.S.extra_flags=&#xD;
compiler.cpp.extra_flags=&#xD;
compiler.ar.extra_flags=&#xD;
compiler.objcopy.eep.extra_flags=&#xD;
compiler.elf2hex.extra_flags=&#xD;
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}"&#xD;
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}"&#xD;
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}"&#xD;
archive_file_path={build.path}/{archive_file}&#xD;
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"&#xD;
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&#xD;
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"&#xD;
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"&#xD;
recipe.output.tmp_file={build.project_name}.hex&#xD;
recipe.output.save_file={build.project_name}.{build.variant}.hex&#xD;
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"&#xD;
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*&#xD;
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*&#xD;
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*&#xD;
preproc.includes.flags=-w -x c++ -M -MG -MP&#xD;
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}"&#xD;
preproc.macros.flags=-w -x c++ -E -CC&#xD;
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}"&#xD;
tools.avrdude.path={runtime.tools.avrdude.path}&#xD;
tools.avrdude.cmd.path={path}/bin/avrdude&#xD;
tools.avrdude.config.path={path}/etc/avrdude.conf&#xD;
tools.avrdude.upload.params.verbose=-v&#xD;
tools.avrdude.upload.params.quiet=-q -q&#xD;
tools.avrdude.upload.params.noverify=-V&#xD;
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"&#xD;
tools.avrdude.program.params.verbose=-v&#xD;
tools.avrdude.program.params.quiet=-q -q&#xD;
tools.avrdude.program.params.noverify=-V&#xD;
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"&#xD;
tools.avrdude.erase.params.verbose=-v&#xD;
tools.avrdude.erase.params.quiet=-q -q&#xD;
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&#xD;
tools.avrdude.bootloader.params.verbose=-v&#xD;
tools.avrdude.bootloader.params.quiet=-q -q&#xD;
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&#xD;
tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}&#xD;
build.usb_manufacturer="Unknown"&#xD;
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'&#xD;
vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\arduino16x&#xD;
avrisp.name=AVR ISP&#xD;
avrisp.communication=serial&#xD;
avrisp.protocol=stk500v1&#xD;
avrisp.program.protocol=stk500v1&#xD;
avrisp.program.tool=avrdude&#xD;
avrisp.program.extra_params=-P{serial.port}&#xD;
avrispmkii.name=AVRISP mkII&#xD;
avrispmkii.communication=usb&#xD;
avrispmkii.protocol=stk500v2&#xD;
avrispmkii.program.protocol=stk500v2&#xD;
avrispmkii.program.tool=avrdude&#xD;
avrispmkii.program.extra_params=-Pusb&#xD;
usbtinyisp.name=USBtinyISP&#xD;
usbtinyisp.protocol=usbtiny&#xD;
usbtinyisp.program.tool=avrdude&#xD;
usbtinyisp.program.extra_params=&#xD;
arduinoisp.name=ArduinoISP&#xD;
arduinoisp.protocol=arduinoisp&#xD;
arduinoisp.program.tool=avrdude&#xD;
arduinoisp.program.extra_params=&#xD;
usbasp.name=USBasp&#xD;
usbasp.communication=usb&#xD;
usbasp.protocol=usbasp&#xD;
usbasp.program.protocol=usbasp&#xD;
usbasp.program.tool=avrdude&#xD;
usbasp.program.extra_params=-Pusb&#xD;
parallel.name=Parallel Programmer&#xD;
parallel.protocol=dapa&#xD;
parallel.force=true&#xD;
parallel.program.tool=avrdude&#xD;
parallel.program.extra_params=-F&#xD;
arduinoasisp.name=Arduino as ISP&#xD;
arduinoasisp.communication=serial&#xD;
arduinoasisp.protocol=stk500v1&#xD;
arduinoasisp.speed=19200&#xD;
arduinoasisp.program.protocol=stk500v1&#xD;
arduinoasisp.program.speed=19200&#xD;
arduinoasisp.program.tool=avrdude&#xD;
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}&#xD;
usbGemma.name=Arduino Gemma&#xD;
usbGemma.protocol=arduinogemma&#xD;
usbGemma.program.tool=avrdude&#xD;
usbGemma.program.extra_params=&#xD;
usbGemma.config.path={runtime.platform.path}/bootloaders/gemma/avrdude.conf&#xD;
stk500.name=Atmel STK500 development board&#xD;
stk500.communication=serial&#xD;
stk500.protocol=stk500&#xD;
stk500.program.protocol=stk500&#xD;
stk500.program.tool=avrdude&#xD;
stk500.program.extra_params=-P{serial.port}&#xD;
buspirate.name=BusPirate as ISP&#xD;
buspirate.communication=serial&#xD;
buspirate.protocol=buspirate&#xD;
buspirate.program.protocol=buspirate&#xD;
buspirate.program.tool=avrdude&#xD;
buspirate.program.extra_params=-P{serial.port}&#xD;
runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avrdude-6.0.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avr-gcc-4.8.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
upload.maximum_size=30720&#xD;
upload.maximum_data_size=2048&#xD;
upload.speed=57600&#xD;
bootloader.high_fuses=0xDA&#xD;
bootloader.extended_fuses=0x05&#xD;
bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;
build.mcu=atmega328p&#xD;
runtime.vm.boardinfo.id=diecimila_atmega328&#xD;
runtime.vm.boardinfo.name=diecimila_atmega328&#xD;
runtime.vm.boardinfo.desc=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;
runtime.vm.boardinfo.src_location=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
ide.hint=For use with Arduino.cc 1.6.2+ ide&#xD;
ide.location.key=Arduino16x&#xD;
ide.location.ide.winreg=Arduino 1.6.x Application&#xD;
ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook&#xD;
ide.location.sketchbook.preferences=sketchbook.path&#xD;
ide.default.revision_name=1.6.9&#xD;
ide.default.version=10609&#xD;
ide.default.package=arduino&#xD;
ide.default.platform=avr&#xD;
ide.multiplatform=true&#xD;
ide.includes=arduino.h&#xD;
ide.exe_name=arduino&#xD;
ide.platformswithoutpackage=false&#xD;
ide.includes.fallback=wprogram.h&#xD;
ide.extension=ino&#xD;
ide.extension.fallback=pde&#xD;
ide.versionGTEQ=160&#xD;
ide.exe=arduino.exe&#xD;
ide.hosts=atmel&#xD;
ide.url=http://arduino.cc/en/Main/Software�%0Aide.help.reference.path=reference\arduino.cc\en\Reference�%0Aide.help.reference.path2=reference\www.arduino.cc\en\Reference�%0Aide.help.reference.serial=reference\www.arduino.cc\en\Serial�%0Avm.debug=true�%0Asoftware=ARDUINO�%0Assh.user.name=root�%0Assh.user.default.password=arduino�%0Assh.host.wwwfiles.path=/www/sd�%0Abuild.working_directory={runtime.ide.path}�%0Aide.location.preferences.portable={runtime.ide.path}\portable�%0Aide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt�%0Aide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt�%0Aide.location.contributions=%VM_APPDATA_LOCAL%\arduino15�%0Aide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15�%0Aide.contributions.boards.allow=true�%0Aide.contributions.boards.ignore_unless_rewrite_found=true�%0Aide.contributions.libraries.allow=true�%0Aide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls�%0Aide.create_platforms_from_boardsTXT.teensy=build.core�%0Aide.appid=arduino16x�%0Alocation.sketchbook=C:\Users\s133140\Documents\Arduino�%0Avm.core.include=arduino.h�%0Avm.boardsource.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
runtime.platform.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
vm.platformname.name=avr&#xD;
build.arch=AVR&#xD;
build.architecture=avr&#xD;
vmresolved.compiler.path=C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\&#xD;
vmresolved.tools.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
" visualmicro.application.name="arduino16x" arduino.build.mcu="atmega328p" arduino.upload.protocol="arduino" arduino.build.f_cpu="16000000L" arduino.board.desc="Arduino Duemilanove or Diecimila w/ ATmega328" arduino.board.name="diecimila_atmega328" arduino.upload.port="COM4" visualmicro.platform.name="avr" arduino.build.core="arduino" />
    </VisualStudio>
  </ProjectExtensions>
</Project>

BaseStation.vcxproj.filters

<?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="BaseStation.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="menu.ino" />
    <None Include="..\Shared\CommandBook.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="CustomNumericMenuItem.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="__vm\.BaseStation.vsarduino.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>

CustomNumericMenuItem.h

/*
 * An example of a custom NumericMenuItem.
 * It tries to display some ASCII graphics in edit mode.
 * This can be useful if you want to give the end user an overview of the value limits.
 * 
 * Copyright (c) 2016 arduino-menusystem
 * Licensed under the MIT license (see LICENSE)
 */

#ifndef _CUSTOMNUMERICMENUITEM_H
#define _CUSTOMNUMERICMENUITEM_H

#include <MenuSystem.h>

class CustomNumericMenuItem : public NumericMenuItem
{
public:
    /**
     * @param width the width of the edit mode 'ASCII graphics', must be > 1
     * @param name The name of the menu item.
     * @param value Default value.
     * @param minValue The minimum value.
     * @param maxValue The maximum value.
     * @param increment How much the value should be incremented by.
     * @param valueFormatter The custom formatter. If NULL the String float
     *                       formatter will be used.
     */
    CustomNumericMenuItem(uint8_t width, const char* name, float value,
                          float minValue, float maxValue, float increment=1.0,
                          ValueFormatter_t value_formatter=NULL)
    : NumericMenuItem(name, value, minValue, maxValue, increment,
                      value_formatter),
      _width(width)
    {
    }

    virtual String& get_composite_name(String& buffer) const
    {
        if (is_editing_value())
        {
            // Only display the ASCII graphics in edit mode.

            // make room for a ' ' at the end and the terminating 0
            char graphics[_width + 2];
            // fill the string with '-'
            for (int i = 0; i <_width; i++)
                graphics[i] = '-';
            // insert a '|' at the relative _value position
            graphics[int((_width - 1) * (_value - _minValue) / (_maxValue - _minValue))] = '|';
            graphics[_width] = ' ';
            graphics[_width+1] = 0;
            buffer = graphics;

            if (_value_formatter != NULL)
                buffer += _value_formatter(_value);
            else
                buffer += _value;
            return buffer;
        }
        else
        {
            // Non edit mode: Let parent class handle this
            return NumericMenuItem::get_composite_name(buffer);
        }
    }

private:
    const uint8_t _width;
};

#endif // _CUSTOMNUMERICMENUITEM_H

menu.ino

/*
* serial_nav.ino - Example code using the menu system library
*
* This example shows the menu system being controlled over the serial port.
*
* Copyright (c) 2015, 2016 arduino-menusystem
* Licensed under the MIT license (see LICENSE)
*/

// Menu callback function

// writes the (int) value of a float into a char buffer.
const String format_int(const float value)
{
	return String((int)value);
}

// writes the value of a float into a char buffer.
const String format_float(const float value)
{
	return String(value);
}

const String format_type(const float value)
{
	String buffer;

	switch ((int)value)
	{
	case 0:
		buffer += "Go to plant";
		tempCommand.command = 't';
		break;
	case 1:
		buffer += "Grab/cut plant";
		tempCommand.command = 'g';
		break;
	case 2:
		buffer += "Clean plant";
		tempCommand.command = 'c';
		break;
	case 3:
		buffer += "Return home";
		tempCommand.command = 'r';
		break;
	case 4:
		buffer += "Move shaft up";
		tempCommand.command = 'W';
		break;
	case 5:
		buffer += "Move shaft down";
		tempCommand.command = 'S';
		break;
	case 6:
		buffer += "Extend arm";
		tempCommand.command = 'D';
		break;
	case 7:
		buffer += "Retract arm";
		tempCommand.command = 'A';
		break;
	case 8:
		buffer += "Move grabber";
		tempCommand.command = 'i';
		break;
	case 9:
		buffer += "Move arm";
		tempCommand.command = 'u';
		break;
	case 10:
		buffer += "Delay";
		tempCommand.command = 'd';
		break;
	case 11:
		buffer += "Move";
		tempCommand.command = 'm';
		break;
	default:
		buffer += "undef";
		break;
	}

	return buffer;
}

const String format_value(const float value)
{
	tempCommand.value = (int)value;

	switch (tempCommand.command) {
	case 't':
		return "plant " + String(tempCommand.value);
	case 'g':
	case 'c':
	case 'r':
	case 'W':
	case 'A':
	case 'S':
	case 'D':
		return "N/A";
	case 'm':
		return String(tempCommand.value * 100) + " steps";
	case 'u':
		return String(tempCommand.value * 10) + " degrees";
	case 'i':
		return String(tempCommand.value * 10) + " degrees";
	case 'd':
		return String(tempCommand.value * 500) + " ms";
	default:
		return "undef";
	}
}

void on_add_selected(MenuItem* p_menu_item)
{
	if (!addCommand(commandos, tempCommand.command, tempCommand.value)) {
		Serial.println();
		Serial.println(F("ERROR:"));
		Serial.println(F("Command book full!"));
		delay(1000);
	}
}

void on_del_selected(MenuItem* p_menu_item)
{
	if (!deleteCommand(commandos)) {
		Serial.println();
		Serial.println(F("ERROR:"));
		Serial.println(F("No commands to delete!"));
		delay(1000);
	}
}

void on_send_selected(MenuItem* p_menu_item)
{
	if (!sendCommand(commandos)) {
		Serial.println(F("ERROR:"));
		Serial.println(F("Could not send commands"));
	}

	delay(1000);
}

void on_demo_selected(MenuItem* p_menu_item) {
	int c = countCommand(commandos);
	for (int n = 0; n < c; n += 1) {
		deleteCommand(commandos);
	}
	addCommand(commandos, 't', 1);
	addCommand(commandos, 'd', 3000);
	addCommand(commandos, 'W', 0);
	addCommand(commandos, 'S', 0);
	addCommand(commandos, 'd', 3000);
	addCommand(commandos, 'D', 0);
	addCommand(commandos, 'A', 0);
	addCommand(commandos, 'd', 3000);
	addCommand(commandos, 'c', 0);
}

void on_help_selected(MenuItem* p_menu_item)
{
	display_help();
	delay(3000);
}

void on_about_selected(MenuItem* p_menu_item)
{
	Serial.println(F("This is the Base Station interface"));
	Serial.println(F("which controls the seaweed harvesting"));
	Serial.println(F("robot."));
	Serial.println();
	Serial.println(F("Refer to the USE Social Robots"));
	Serial.println(F("2015/2016 Q4 - group 5 wiki for"));
	Serial.println(F("more information."));
	delay(5000);
}


void on_status_selected(MenuItem* p_menu_item)
{
	Serial.println(F("Returning status of the robot:"));
	Serial.println(F("------------------------------"));
	Serial.print(F("Temperature: "));
	Serial.println(F("80"));
	Serial.print(F("Max speed (RPM): "));
	Serial.println(F("300"));
	Serial.print(F("Acceleration: "));
	Serial.println(F("80"));
	Serial.print(F("Motor1 "));
	Serial.println(F("running"));
	Serial.print(F("Motor2: "));
	Serial.println(F("not running"));
	Serial.print(F("Motor3: "));
	Serial.println(F("not running"));
	Serial.print(F("ServoArm (degrees):"));
	Serial.println(F("167"));
	Serial.print(F("MotorGrab: "));
	Serial.println(F("086"));
	delay(3000);
}

void on_back_item_selected(MenuItem* p_menu_item)
{
	//
}

void display_menu(Menu* p_menu)
{
	Serial.write(27);       // ESC command
	Serial.print("[2J");    // clear screen command
	Serial.write(27);
	Serial.print("[H");     // cursor to home command
	Serial.print(F("--[ "));
	Serial.print(p_menu->get_name());
	Serial.println(F(" ]--"));

	String buffer;
	MenuComponent const* cp_menu_sel = p_menu->get_current_component();
	for (int i = 0; i < p_menu->get_num_menu_components(); ++i)
	{
		MenuComponent const* cp_m_comp = p_menu->get_menu_component(i);
		if (cp_menu_sel == cp_m_comp)
			Serial.print("> ");
		else
			Serial.print("  ");
		Serial.print(cp_m_comp->get_composite_name(buffer));

		Serial.println("");
	}

	if (p_menu == &muCommand) {
		Serial.println();
		printCommand(commandos);
	}
}


void display_help() {
	Serial.println(F("***************"));
	Serial.println(F("w,^:      go to previus item (up)"));
	Serial.println(F("s,v:      go to next item (down)"));
	Serial.println(F("a,esc:    go back (right)"));
	Serial.println(F("d,enter:  select \"selected\" item"));
	Serial.println(F("h,?:      print this help"));
	Serial.println(F("***************"));
}

void serial_handler()
{
	char inChar, inChar2;

	if ((inChar = Serial.read()) > 0)
	{
		switch (inChar)
		{
		case 27: // control characters
			delay(25);
			if ((inChar2 = Serial.read()) > 0) {
				switch (inChar2) {
				case 91: // escaped control characters
					delay(25);
					switch (Serial.read()) {
					case 65: // up
					case 90: // shift+tab
					case 68: // left
						ms.prev();
						ms.display();
						break;
					case 66: // down
					case 67: // right
						ms.next();
						ms.display();
						break;
					}
					break;
				case 49: // function keys, just display help.
					ms.display();
					display_help();
					break;
				}
			}
			else { // escape
				ms.back();
				ms.display();
			}
			break;

		case 'w': // w
			// Previous item
			ms.prev();
			ms.display();
			break;
		case 's': // s
		case 9: // tab
			// Next item
			ms.next();
			ms.display();
			break;
		case 127: // backspace
		case 'a': // a
		case 3: // Ctrl+C
			// Back presed
			ms.back();
			ms.display();
			break;
		case 0x0D: // enter
		case ' ': // space
		case 'd': // d
			// Select presed
			ms.select();
			ms.display();
			break;
		case '?': // ?
		case 0x0F: // F1
		case 'h': // h
			// Display help
			ms.display();
			display_help();
			break;
		default:
			break;
		}
	}
}

Robot

CommandBook.ino

int countCommand(CommandBook *book)
{
	int c = 0;
	while (book[c].command != NULL && c < BOOKSIZE)
		c++;
	return c;
}

void addCommand(CommandBook *book, char command, int value)
{
	int c = countCommand(book);
	book[c].command = command;
	book[c].value = value;
}

void runCommand(CommandBook *book)
{
	int c = countCommand(book);
	for (int i = 0; i < c; i++)
	{
		switch (book[i].command)
		{
		case 'm':
		{
			myStepper.move(book[i].value);
			while (myStepper.distanceToGo())
				myStepper.run();
			myStepper.disableOutputs();
			break;
		}
		case 'd':
		{
			delay(book[i].value);
			break;
		}
		default:
		{
			Serial.println("Invaild command!");
			break;
		}
		}
		book[i].command = NULL;
		book[i].value = NULL;
	}
}

void printCommand(CommandBook *book)
{
	int c = countCommand(book);
	Serial.println("Commandos in book:");
	for (int i = 0; i < c; i++)
	{
		Serial.print('-');
		Serial.print(book[i].command);
		Serial.print('\t');
		Serial.println(book[i].value);
	}
	Serial.println("Done");
}

Robot.ino

/*
Name:		Robot.ino
Created:	5/19/2016 4:07:57 PM
Author:	Use Waterpret
*/

#define Servo ServoTimer2
//#define ENABLE_DEBUG
//#define REMOTE
#define BOOKSIZE 20

struct CommandBook
{
	char command;
	int value;
};

#ifdef ENABLE_DEBUG
// disable Serial output
#define debugln(a) (Serial.println(a))
#define debug(a) (Serial.print(a))
#else
#define debugln(a)
#define debug(a)
#endif

#include <Arduino.h>								// Fixes some define problems
#include <ServoTimer2.h>							// Include servo library
#include <AccelStepper.h>							// AccelStepper library for precise and fluid steppercontrol
#include <SPI.h>									// The SPI-communication liberary for the antenna
#include <OneWire\OneWire.h>						// The OneWire-protocol used by te temp sensor
#include <DallasTemperatureControl\DallasTemperature.h>	// DallasTemperature library for controlling the DS18S20 temperature monitor


OneWire oneWire(A0);								// Setup a oneWire instance to communicate with any OneWire devices 
DallasTemperature sensors(&oneWire);				// Pass the oneWire reference to Dallas Temperature.							
AccelStepper shaftStepper(AccelStepper::FULL4WIRE, 13, 12, 11, 9, TRUE);// initialize the stepper library on pins 13,12,11,9 and disable the output;
AccelStepper kopStepper(AccelStepper::FULL4WIRE, 2, 4, 6, 7, FALSE);	// initialize the stepper library on pins 2,4,6,7 and disable the output;
AccelStepper armStepper(AccelStepper::FULL4WIRE, A2, A3, A4, A5, FALSE);// initialize the stepper library on pins A2,A3,A4,A5 and disable the output;
CommandBook commandos[BOOKSIZE] = {};				// array with commands for the Arduino

DeviceAddress motorShaftTemp;						// arrays to hold device addresses of the TempSensors
Servo servoArm;										// Arm servo signal
Servo servoGrab;									// Grabbbing Servo
const int delayRest = 100;							// Standard delay for momentum to stablelize
const int armNeutralPosition = 90;					// Neutral position of the grabber
const int grabberNeutralPosition = 60;				// Ground position of the grabber
const int grabberGrabPosition = 0;					// Position for closed grabbers
const int armOffset = 0;							// turn ofset for the head in degrees
const int stepsPerRevolution = 200;					// change this to fit the number of steps per revolution for your motor
const int acceleration = 350;						// Acceleration
const float pi = 3.141592654;						// this one is a piece of cake

int kopSpeed = 0;									// Speed of the kopmotor in RPM
char motorDirection = 1;							// direction of the motor
unsigned long previousMillis = 0;					// will store last time LED was updatedvccv
float rpm2steps = stepsPerRevolution / 60.0f;

uint8_t* buf = new uint8_t[32];
uint8_t len = 32;

void r_RPMtester(AccelStepper driver);				// Small acceleration test.
void r_DirectionTest();								// Small direction test.
bool addCommand(CommandBook *book, char command, int value);
int countCommand(CommandBook *book);
void runCommand(CommandBook *book);
void printCommand(CommandBook *book);
bool deleteCommand(CommandBook *book);
bool sendCommand(CommandBook *book);
/////////////////////////////////
///USER DETERMINED VARIABLES/////
/////////////////////////////////
int armPos = armNeutralPosition;
int grabPos = grabberNeutralPosition;
int remoteStep = 5;

void setup()										// Built in initialization block
{
	Serial.begin(9600);								// open the serial port at 9600 bps:
	Serial.println(F("Booting Ariel:"));
	Serial.println(F(" -Starting Ariel"));
	Serial.println(F(" -Serial port is open @9600."));

	nrf24Initialize(false);								// Radio initialisation function

	Serial.print(F(" -Attaching Arm Servo:\t"));
	servoArm.attach(5);								// Attach Arm signal to the pin
	if (!servoArm.attached())
		Serial.println(F("servoArm attach failed"));
	else
		Serial.println(F("OK"));
	servoGrab.attach(3);							// Attach Grab signal to the pin
	Serial.print(F(" -Attaching Grab Servo:\t"));
	if (!servoGrab.attached())
		Serial.println(F("servoGrab attach failed"));
	else
		Serial.println(F("OK"));

	sensors.begin();								// Initialise the temperaturesensor bus
	Serial.print(F("Gettnig motorShaftTemp address\t"));
	if (!sensors.getAddress(motorShaftTemp, 0))			// Check if the temperaturesensors are connected.
		Serial.println(F("Unable to find address for motorShaftTemp"));
	else
		Serial.println(F("OK"));

	Serial.print(F(" -Connecting motorShaftTemp:\t"));
	if (!sensors.isConnected(motorShaftTemp))
		Serial.println(F("motorShaftTemp is not connected"));
	else
		Serial.println(F("OK"));


	Serial.println(F("Attaching armStepper:\t"));
	armStepper.setMaxSpeed(220 * rpm2steps);
	Serial.print(F(" -Max speed:\t"));
	Serial.println(armStepper.maxSpeed());
	armStepper.setAcceleration(acceleration);
	Serial.print(F(" -Acceleration:\t"));
	Serial.println(acceleration);
	Serial.print(F(" -Position:\t"));
	Serial.println(armStepper.currentPosition());
	Serial.println(F("Attaching kopStepper:\t"));
	kopStepper.setMaxSpeed(180 * rpm2steps);
	Serial.print(F(" -Max speed:\t"));
	Serial.println(kopStepper.maxSpeed());
	kopStepper.setAcceleration(acceleration);
	Serial.print(F(" -Acceleration:\t"));
	Serial.println(acceleration);
	Serial.print(F(" -Position:\t"));
	Serial.println(kopStepper.currentPosition());
	Serial.println(F("Attaching shaftStepper:\t"));
	shaftStepper.setMaxSpeed(220 * rpm2steps);
	Serial.print(F(" -Max speed:\t"));
	Serial.println(shaftStepper.maxSpeed());
	shaftStepper.setAcceleration(acceleration);
	Serial.print(F(" -Acceleration:\t"));
	Serial.println(acceleration);
	Serial.print(F(" -Position:\t"));
	Serial.println(shaftStepper.currentPosition());

	Serial.println(F("- SPI diabled"));
	SPI.end();

	Serial.println(F("Ariel has started"));
}

///////////////////////////////
//////////MAIN LOOP////////////
//////////////////////////////
#ifdef REMOTE
void loop() {
	SPI.begin();
	sensors.requestTemperatures(); // Send the command to get temperatures
	Serial.print(F("Temperature for the Steppermotor is: "));
	Serial.println(sensors.getTempC(motorShaftTemp));
	if (nrf24ReceiveMessage(buf, &len))
	{
		Serial.println(F("Message received"));

		int c = countCommand(commandos);
		for (int n = 0; n < c; n += 1)
		{
			commandos[n].command = NULL;
			commandos[n].value = NULL;
		}
		c = buf[0];
		Serial.println("Received " + String(c) + " commands");
		for (int n = 0; n < c; n += 1)
		{
			addCommand(commandos, (char)buf[n * 3 + 1], (((int)buf[n * 3 + 2]) << 8) + (int)buf[n * 3 + 3]);
		}

		//digitalWrite(11, LOW);
		//digitalWrite(8, HIGH);
		//radioSleep();
		//SPI.transfer(0xAA);
		//SPI.setDataMode(SPI_MODE0);
		//delay(2000);
		SPI.endTransaction();
		SPI.end();
		shaftStepper.disableOutputs();
		Serial.println(digitalRead(9));
		Serial.println(digitalRead(11));
		Serial.println(digitalRead(12));
		Serial.println(digitalRead(12));
		shaftStepper.enableOutputs();


		Serial.println(F("Received commands!"));
		Serial.println();
		printCommand(commandos);
		Serial.println(F("Waiting 3 seconds before executing"));
		delay(3000);

		runCommand(commandos);

		delay(1000);
		Serial.println();
		sensors.requestTemperatures(); // Send the command to get temperatures
		Serial.print(F("Temperature for the Steppermotor is: "));
		Serial.println(sensors.getTempC(motorShaftTemp));
		Serial.println("DONE!");
	}
}
#else
void loop()
{
	int  c = Serial.read();
	switch (c)
	{
	case '-':
	{
		remoteStep--;
		if (remoteStep == 0)
			remoteStep = 1;
		Serial.print(F("Stepsize: "));
		Serial.println(remoteStep);
		break;
	}
	case '+':
	{
		remoteStep++;
		Serial.print(F("Stepsize: "));
		Serial.println(remoteStep);
		break;
	}
	case '(':
	{
		kopSpeed -= remoteStep;
		if (kopSpeed < 0)
			kopSpeed = 0;
		Serial.print(F("kopSpeed: "));
		Serial.println(kopSpeed);
		break;
	}
	case ')':
	{
		kopSpeed += remoteStep;
		if (kopSpeed > kopStepper.maxSpeed())
			kopSpeed = kopStepper.maxSpeed();
		Serial.print(F("kopSpeed: "));
		Serial.println(kopSpeed);
		break;
	}
	case '0':
	{
		Serial.println(F("All stop!"));
		SPI.end();
		kopStepper.stop();
		while (kopStepper.distanceToGo())
			kopStepper.run();
		kopSpeed = 0;
		grabberNeutral();
		armNeutral();
		kopStepper.disableOutputs();
		armStepper.disableOutputs();
		shaftStepper.disableOutputs();
		break;
	}
	case '4':
	{
		grabPos += remoteStep;
		grabberTurnPos(grabPos);
		break;
	}
	case '6':
	{
		grabPos -= remoteStep;
		grabberTurnPos(grabPos);
		break;
	}
	case '8':
	{
		debug(F("arm offset: "));
		debug(armOffset);
		armPos += remoteStep;
		armTurnPos(armPos);
		break;
	}
	case '2':
	{
		debug(F("arm offset: "));
		debug(armOffset);
		armPos -= remoteStep;
		armTurnPos(armPos);
		break;
	}
	case '5':
	{
		Serial.println(F("turning one round @60RPM: "));
		kopStepper.setSpeed(60 * rpm2steps);
		kopStepper.move(stepsPerRevolution);
		kopStepper.runSpeedToPosition();
		break;
	}
	case 'c':
	{
		r_Cut();
		break;
	}
	case 'r':
	{
		r_RPMtester(kopStepper);
		break;
	}
	case 'd':
	{
		r_DirectionTest();
		break;
	}
	case '*':
	{
		sensors.requestTemperatures(); // Send the command to get temperatures
		Serial.print(F("Temperature for the Steppermotor is: "));
		Serial.println(sensors.getTempC(motorShaftTemp));
		break;
	}
	case '.':
	{
		Serial.println(F("Locking the motor for 1 second"));
		kopStepper.setSpeed(0);
		kopStepper.move(1);
		kopStepper.move(-1);
		unsigned long previousMillis = millis();
		while (millis() - previousMillis <= 1000)
			kopStepper.runSpeed();
		kopStepper.disableOutputs();
		break;
	}
	case '/':
	{
		Serial.println(F("Swithcing motor direction"));
		motorDirection *= -1;
		break;
	case '[':
	{
		Serial.println(F("Reseting arm motor position to 0"));
		armStepper.setCurrentPosition(armStepper.currentPosition());
		break;
	}
	case ']':
	{
		Serial.print(F("Current arm motor position: "));
		Serial.println(armStepper.currentPosition());
		break;
	}
	case '{':
	{
		Serial.println(F("Reseting shaft motor position to 0"));
		shaftStepper.setCurrentPosition(shaftStepper.currentPosition());
		break;
	}
	case '}':
	{
		Serial.print(F("Current shaft motor position: "));
		Serial.println(shaftStepper.currentPosition());
		break;
	}
	case '9':
	{
		Serial.println(F("Extending shaft"));
		shaftStepper.moveTo(900);
		shaftStepper.runToPosition();
		shaftStepper.disableOutputs();
		break;
	}
	case '7':
	{
		Serial.println(F("Retracting shaft"));
		shaftStepper.moveTo(0);
		shaftStepper.runToPosition();
		shaftStepper.disableOutputs();
		break;
	}
	case '3':
	{
		Serial.println(F("Extending arm "));
		armStepper.moveTo(750);
		armStepper.runToPosition();
		armStepper.disableOutputs();
		break;
	}
	case '1':
	{
		Serial.println(F("Retracting arm "));
		armStepper.moveTo(0);
		armStepper.runToPosition();
		armStepper.disableOutputs();
		break;
	}
	case 't':
	{
		Serial.println("Testing command ");
		addCommand(commandos, 't', 1);
		addCommand(commandos, 'W', 0);
		addCommand(commandos, 'D', 0);
		addCommand(commandos, 'c', 0);
		addCommand(commandos, 'A', 0);
		addCommand(commandos, 'S', 0);
		addCommand(commandos, 't', 2);
		addCommand(commandos, 'W', 0);
		addCommand(commandos, 'D', 0);
		addCommand(commandos, 'i', 0);
		addCommand(commandos, 'A', 0);
		addCommand(commandos, 'S', 0);
		addCommand(commandos, 't', 3);
		addCommand(commandos, 'W', 0);
		addCommand(commandos, 'D', 0);
		addCommand(commandos, 'i', 180);
		addCommand(commandos, 'A', 0);
		addCommand(commandos, 'S', 0);
		addCommand(commandos, 't', 0);
		delay(1000);
		printCommand(commandos);
		delay(1000);
		runCommand(commandos);
		break;
	}
	case 'g':
	{
		Serial.println("Arduin Routine");
		addCommand(commandos, 'i', 180);
		addCommand(commandos, 'd', 1000);
		addCommand(commandos, 'i', 0);
		addCommand(commandos, 'u', 180);
		addCommand(commandos, 'd', 1000);
		addCommand(commandos, 'u', 90);
		addCommand(commandos, 'd', 1000);
		addCommand(commandos, 'u', 0);
		addCommand(commandos, 'd', 500);
		addCommand(commandos, 'i', 180);
		addCommand(commandos, 'd', 1000);
		addCommand(commandos, 'i', 0);
		printCommand(commandos);
		delay(1000);
		runCommand(commandos);
		break;
	}
	case '<':
	{
		Serial.println(F("Spooling up kopStepper"));
		kopStepper.move(-2000);
		while (kopStepper.distanceToGo() < -1000)
			kopStepper.run();
		motorDirection = -1;
		kopSpeed = -kopStepper.maxSpeed();
		break;
	}
	case '>':
	{
		Serial.println(F("Spooling up kopStepper"));
		kopStepper.move(2000);
		while (kopStepper.distanceToGo() > 1000)
			kopStepper.run();
		motorDirection = 1;
		kopSpeed = kopStepper.maxSpeed();
		break;
	}
	}
	}
	// set the motor speed in RPM:
	if (kopSpeed) {
		kopStepper.setSpeed(motorDirection * kopSpeed * rpm2steps);
		kopStepper.runSpeed();			//Run motor at set speed.		
	}
	else
		kopStepper.disableOutputs();
}
#endif // REMOTE

Robot.vcxproj

<?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>{E107B750-A178-4195-BCF5-E1DADA3D52A1}</ProjectGuid>
    <RootNamespace>Robot</RootNamespace>
    <ProjectName>Robot</ProjectName>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</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 />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\s133140\Source\Repos\UseWaterpret\Solution\Robot;C:\Users\s133140\Documents\Arduino\libraries\AccelStepper;C:\Users\s133140\Documents\Arduino\libraries\AccelStepper\utility;C:\Users\s133140\Documents\Arduino\libraries\DallasTemperatureControl;C:\Users\s133140\Documents\Arduino\libraries\DallasTemperatureControl\utility;C:\Users\s133140\Documents\Arduino\libraries\OneWire;C:\Users\s133140\Documents\Arduino\libraries\OneWire\utility;C:\Users\s133140\Documents\Arduino\libraries\RadioHead;C:\Users\s133140\Documents\Arduino\libraries\RadioHead\utility;C:\Users\s133140\Documents\Arduino\libraries\ServoTimer2;C:\Users\s133140\Documents\Arduino\libraries\ServoTimer2\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\default\debuggers;C:\Users\s133140\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\s133140\Source\Repos\UseWaterpret\Solution\Robot\__vm\.Robot.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;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>Disabled</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard;C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\Robot;C:\Users\Jochem\Documents\Arduino\libraries\AccelStepper;C:\Users\Jochem\Documents\Arduino\libraries\AccelStepper\utility;C:\Users\Jochem\Documents\Arduino\libraries\DallasTemperatureControl;C:\Users\Jochem\Documents\Arduino\libraries\DallasTemperatureControl\utility;C:\Users\Jochem\Documents\Arduino\libraries\OneWire;C:\Users\Jochem\Documents\Arduino\libraries\OneWire\utility;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead;C:\Users\Jochem\Documents\Arduino\libraries\RadioHead\utility;C:\Users\Jochem\Documents\Arduino\libraries\ServoTimer2;C:\Users\Jochem\Documents\Arduino\libraries\ServoTimer2\utility;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\utility;C:\Program Files (x86)\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\zhfqazlz.lqo\Micro Platforms\default\debuggers;C:\Users\Jochem\Documents\Arduino\libraries;C:\Program Files (x86)\Arduino\hardware\tools\avr/avr/include/;C:\Program Files (x86)\Arduino\hardware\tools\avr//avr/include/avr/;C:\Program Files (x86)\Arduino\hardware\tools\avr/lib\gcc\avr\4.8.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <ForcedIncludeFiles>C:\Users\Jochem\Documents\Projects\UseWaterpret\Solution\Robot\__vm\.Robot.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
      <WholeProgramOptimization>false</WholeProgramOptimization>
      <PreprocessorDefinitions>__AVR_ATmega328p__;__AVR_ATmega328P__;F_CPU=16000000L;ARDUINO=10609;ARDUINO_AVR_DUEMILANOVE;ARDUINO_ARCH_AVR;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <None Include="..\Shared\CommandBook.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="functions.ino" />
    <None Include="Robot.ino" />
    <None Include="routine.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="__vm\.Robot.vsarduino.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties arduino.upload.maximum_size="30720" arduino.upload.speed="57600" visualmicro.package.name="arduino" arduino.board.property_bag="name=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;
upload.tool=avrdude&#xD;
upload.protocol=arduino&#xD;
bootloader.tool=avrdude&#xD;
bootloader.low_fuses=0xFF&#xD;
bootloader.unlock_bits=0x3F&#xD;
bootloader.lock_bits=0x0F&#xD;
build.f_cpu=16000000L&#xD;
build.board=AVR_DUEMILANOVE&#xD;
build.core=arduino&#xD;
build.variant=standard&#xD;
menu.cpu.atmega328=ATmega328&#xD;
menu.cpu.atmega328.upload.maximum_size=30720&#xD;
menu.cpu.atmega328.upload.maximum_data_size=2048&#xD;
menu.cpu.atmega328.upload.speed=57600&#xD;
menu.cpu.atmega328.bootloader.high_fuses=0xDA&#xD;
menu.cpu.atmega328.bootloader.extended_fuses=0x05&#xD;
menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;
menu.cpu.atmega328.build.mcu=atmega328p&#xD;
menu.cpu.atmega168=ATmega168&#xD;
menu.cpu.atmega168.upload.maximum_size=14336&#xD;
menu.cpu.atmega168.upload.maximum_data_size=1024&#xD;
menu.cpu.atmega168.upload.speed=19200&#xD;
menu.cpu.atmega168.bootloader.high_fuses=0xdd&#xD;
menu.cpu.atmega168.bootloader.extended_fuses=0x00&#xD;
menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex&#xD;
menu.cpu.atmega168.build.mcu=atmega168&#xD;
runtime.ide.path=C:\Program Files (x86)\Arduino&#xD;
build.system.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr\system&#xD;
runtime.ide.version=10609&#xD;
target_package=arduino&#xD;
target_platform=avr&#xD;
runtime.hardware.path=C:\Program Files (x86)\Arduino\hardware\arduino&#xD;
originalid=diecimila&#xD;
intellisense.tools.path={runtime.tools.avr-gcc.path}/&#xD;
intellisense.include.paths={intellisense.tools.path}avr/include/;{intellisense.tools.path}/avr/include/avr/;{intellisense.tools.path}lib\gcc\avr\4.8.1\include&#xD;
tools.atprogram.cmd.path=%AVRSTUDIO_EXE_PATH%\atbackend\atprogram&#xD;
tools.atprogram.cmd.setwinpath=true&#xD;
tools.atprogram.program.params.verbose=-v&#xD;
tools.atprogram.program.params.quiet=-q&#xD;
tools.atprogram.program.pattern="{cmd.path}" -d {build.mcu} {program.verbose} {program.extra_params} program -c -f "{build.path}\{build.project_name}.hex"&#xD;
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"&#xD;
tools.atprogram.erase.params.verbose=-v&#xD;
tools.atprogram.erase.params.quiet=-q&#xD;
tools.atprogram.bootloader.params.verbose=-v&#xD;
tools.atprogram.bootloader.params.quiet=-q&#xD;
tools.atprogram.bootloader.pattern="{cmd.path}" -d {build.mcu} {bootloader.verbose}  program -c -f "{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}"&#xD;
version=1.6.11&#xD;
compiler.warning_flags=-w&#xD;
compiler.warning_flags.none=-w&#xD;
compiler.warning_flags.default=&#xD;
compiler.warning_flags.more=-Wall&#xD;
compiler.warning_flags.all=-Wall -Wextra&#xD;
compiler.path={runtime.tools.avr-gcc.path}/bin/&#xD;
compiler.c.cmd=avr-gcc&#xD;
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD&#xD;
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections&#xD;
compiler.c.elf.cmd=avr-gcc&#xD;
compiler.S.flags=-c -g -x assembler-with-cpp&#xD;
compiler.cpp.cmd=avr-g++&#xD;
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD&#xD;
compiler.ar.cmd=avr-ar&#xD;
compiler.ar.flags=rcs&#xD;
compiler.objcopy.cmd=avr-objcopy&#xD;
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0&#xD;
compiler.elf2hex.flags=-O ihex -R .eeprom&#xD;
compiler.elf2hex.cmd=avr-objcopy&#xD;
compiler.ldflags=&#xD;
compiler.size.cmd=avr-size&#xD;
build.extra_flags=&#xD;
compiler.c.extra_flags=&#xD;
compiler.c.elf.extra_flags=&#xD;
compiler.S.extra_flags=&#xD;
compiler.cpp.extra_flags=&#xD;
compiler.ar.extra_flags=&#xD;
compiler.objcopy.eep.extra_flags=&#xD;
compiler.elf2hex.extra_flags=&#xD;
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}"&#xD;
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}"&#xD;
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}"&#xD;
archive_file_path={build.path}/{archive_file}&#xD;
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"&#xD;
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&#xD;
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"&#xD;
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"&#xD;
recipe.output.tmp_file={build.project_name}.hex&#xD;
recipe.output.save_file={build.project_name}.{build.variant}.hex&#xD;
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"&#xD;
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*&#xD;
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*&#xD;
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*&#xD;
preproc.includes.flags=-w -x c++ -M -MG -MP&#xD;
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}"&#xD;
preproc.macros.flags=-w -x c++ -E -CC&#xD;
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}"&#xD;
tools.avrdude.path={runtime.tools.avrdude.path}&#xD;
tools.avrdude.cmd.path={path}/bin/avrdude&#xD;
tools.avrdude.config.path={path}/etc/avrdude.conf&#xD;
tools.avrdude.upload.params.verbose=-v&#xD;
tools.avrdude.upload.params.quiet=-q -q&#xD;
tools.avrdude.upload.params.noverify=-V&#xD;
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"&#xD;
tools.avrdude.program.params.verbose=-v&#xD;
tools.avrdude.program.params.quiet=-q -q&#xD;
tools.avrdude.program.params.noverify=-V&#xD;
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"&#xD;
tools.avrdude.erase.params.verbose=-v&#xD;
tools.avrdude.erase.params.quiet=-q -q&#xD;
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&#xD;
tools.avrdude.bootloader.params.verbose=-v&#xD;
tools.avrdude.bootloader.params.quiet=-q -q&#xD;
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&#xD;
tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}&#xD;
build.usb_manufacturer="Unknown"&#xD;
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'&#xD;
vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nctamhse.x5i\Micro Platforms\arduino16x&#xD;
avrisp.name=AVR ISP&#xD;
avrisp.communication=serial&#xD;
avrisp.protocol=stk500v1&#xD;
avrisp.program.protocol=stk500v1&#xD;
avrisp.program.tool=avrdude&#xD;
avrisp.program.extra_params=-P{serial.port}&#xD;
avrispmkii.name=AVRISP mkII&#xD;
avrispmkii.communication=usb&#xD;
avrispmkii.protocol=stk500v2&#xD;
avrispmkii.program.protocol=stk500v2&#xD;
avrispmkii.program.tool=avrdude&#xD;
avrispmkii.program.extra_params=-Pusb&#xD;
usbtinyisp.name=USBtinyISP&#xD;
usbtinyisp.protocol=usbtiny&#xD;
usbtinyisp.program.tool=avrdude&#xD;
usbtinyisp.program.extra_params=&#xD;
arduinoisp.name=ArduinoISP&#xD;
arduinoisp.protocol=arduinoisp&#xD;
arduinoisp.program.tool=avrdude&#xD;
arduinoisp.program.extra_params=&#xD;
usbasp.name=USBasp&#xD;
usbasp.communication=usb&#xD;
usbasp.protocol=usbasp&#xD;
usbasp.program.protocol=usbasp&#xD;
usbasp.program.tool=avrdude&#xD;
usbasp.program.extra_params=-Pusb&#xD;
parallel.name=Parallel Programmer&#xD;
parallel.protocol=dapa&#xD;
parallel.force=true&#xD;
parallel.program.tool=avrdude&#xD;
parallel.program.extra_params=-F&#xD;
arduinoasisp.name=Arduino as ISP&#xD;
arduinoasisp.communication=serial&#xD;
arduinoasisp.protocol=stk500v1&#xD;
arduinoasisp.speed=19200&#xD;
arduinoasisp.program.protocol=stk500v1&#xD;
arduinoasisp.program.speed=19200&#xD;
arduinoasisp.program.tool=avrdude&#xD;
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}&#xD;
usbGemma.name=Arduino Gemma&#xD;
usbGemma.protocol=arduinogemma&#xD;
usbGemma.program.tool=avrdude&#xD;
usbGemma.program.extra_params=&#xD;
usbGemma.config.path={runtime.platform.path}/bootloaders/gemma/avrdude.conf&#xD;
stk500.name=Atmel STK500 development board&#xD;
stk500.communication=serial&#xD;
stk500.protocol=stk500&#xD;
stk500.program.protocol=stk500&#xD;
stk500.program.tool=avrdude&#xD;
stk500.program.extra_params=-P{serial.port}&#xD;
buspirate.name=BusPirate as ISP&#xD;
buspirate.communication=serial&#xD;
buspirate.protocol=buspirate&#xD;
buspirate.program.protocol=buspirate&#xD;
buspirate.program.tool=avrdude&#xD;
buspirate.program.extra_params=-P{serial.port}&#xD;
runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avrdude-6.0.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
runtime.tools.avr-gcc-4.8.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
upload.maximum_size=30720&#xD;
upload.maximum_data_size=2048&#xD;
upload.speed=57600&#xD;
bootloader.high_fuses=0xDA&#xD;
bootloader.extended_fuses=0x05&#xD;
bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex&#xD;
build.mcu=atmega328p&#xD;
runtime.vm.boardinfo.id=diecimila_atmega328&#xD;
runtime.vm.boardinfo.name=diecimila_atmega328&#xD;
runtime.vm.boardinfo.desc=Arduino Duemilanove or Diecimila w/ ATmega328&#xD;
runtime.vm.boardinfo.src_location=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
ide.hint=For use with Arduino.cc 1.6.2+ ide&#xD;
ide.location.key=Arduino16x&#xD;
ide.location.ide.winreg=Arduino 1.6.x Application&#xD;
ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook&#xD;
ide.location.sketchbook.preferences=sketchbook.path&#xD;
ide.default.revision_name=1.6.9&#xD;
ide.default.version=10609&#xD;
ide.default.package=arduino&#xD;
ide.default.platform=avr&#xD;
ide.multiplatform=true&#xD;
ide.includes=arduino.h&#xD;
ide.exe_name=arduino&#xD;
ide.platformswithoutpackage=false&#xD;
ide.includes.fallback=wprogram.h&#xD;
ide.extension=ino&#xD;
ide.extension.fallback=pde&#xD;
ide.versionGTEQ=160&#xD;
ide.exe=arduino.exe&#xD;
ide.hosts=atmel&#xD;
ide.url=http://arduino.cc/en/Main/Software�%0Aide.help.reference.path=reference\arduino.cc\en\Reference�%0Aide.help.reference.path2=reference\www.arduino.cc\en\Reference�%0Aide.help.reference.serial=reference\www.arduino.cc\en\Serial�%0Avm.debug=true�%0Asoftware=ARDUINO�%0Assh.user.name=root�%0Assh.user.default.password=arduino�%0Assh.host.wwwfiles.path=/www/sd�%0Abuild.working_directory={runtime.ide.path}�%0Aide.location.preferences.portable={runtime.ide.path}\portable�%0Aide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt�%0Aide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt�%0Aide.location.contributions=%VM_APPDATA_LOCAL%\arduino15�%0Aide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15�%0Aide.contributions.boards.allow=true�%0Aide.contributions.boards.ignore_unless_rewrite_found=true�%0Aide.contributions.libraries.allow=true�%0Aide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls�%0Aide.create_platforms_from_boardsTXT.teensy=build.core�%0Aide.appid=arduino16x�%0Alocation.sketchbook=C:\Users\s133140\Documents\Arduino�%0Avm.core.include=arduino.h�%0Avm.boardsource.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
runtime.platform.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr&#xD;
vm.platformname.name=avr&#xD;
build.arch=AVR&#xD;
build.architecture=avr&#xD;
vmresolved.compiler.path=C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\&#xD;
vmresolved.tools.path=C:\Program Files (x86)\Arduino\hardware\tools\avr&#xD;
" visualmicro.application.name="arduino16x" arduino.build.mcu="atmega328p" arduino.upload.protocol="arduino" arduino.build.f_cpu="16000000L" arduino.board.desc="Arduino Duemilanove or Diecimila w/ ATmega328" arduino.board.name="diecimila_atmega328" arduino.upload.port="COM5" visualmicro.platform.name="avr" arduino.build.core="arduino" />
    </VisualStudio>
  </ProjectExtensions>
</Project>

Robot.vcxproj.filters

<?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="functions.ino" />
    <None Include="routine.ino" />
    <None Include="..\Shared\nrf24communication.ino" />
    <None Include="Robot.ino" />
    <None Include="..\Shared\CommandBook.ino" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="__vm\.Robot.vsarduino.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>

functions.ino

////////////////////////////////////////
//////ARM AND GRABBER FUNCTIONS/////////
////////////////////////////////////////
void armNeutral()
{
	debugln("Arm to neutral position");

	servoArm.write(armNeutralPosition);								//neutral position
	armPos = armNeutralPosition;
	delay(100);
}

void grabberNeutral()
{
	debugln("Grabber to neutral position");

	servoGrab.write(grabberNeutralPosition);						//neutral position
	grabPos = grabberNeutralPosition;
	delay(200);
}

void grabberGrab()
{
	debugln("Grabbing");

	servoGrab.write(180);
	delay(1000);
	servoGrab.write(grabberGrabPosition);							//Grab (and move up arm?)
	delay(1000);
}

void grabberTurnPos(int pos)
{
	debug("Grabber to position ");
	debugln(pos);

	servoGrab.write(pos);											//servo position
	delay(100);
}

void armTurnPos(int pos)
{
	debug("Arm to position ");
	debugln(pos);

	servoArm.write(pos);											//servo position
	delay(100);
}

void resetServos()
{
	debugln("Resetting servo");

	delay(80);
	servoGrab.write(grabPos + 1);
	servoArm.write(armPos + 1);
	delay(20);
	servoGrab.write(grabPos);
	servoArm.write(armPos);
}

void leBlink(int ledPin, int n)
{
	for (int i = 0; i < n; i++)
	{
		digitalWrite(ledPin, HIGH);		// turn the LED on (HIGH is the voltage level)
		delay(100);						// wait for a second
		digitalWrite(ledPin, LOW);		// turn the LED off by making the voltage LOW
		delay(100);						// wait for a second
	}
}

/*not used
void setTemperatureAlarm(int temp)
{
	sensors.setLowAlarmTemp(motorShaftTemp, -10);
	sensors.setHighAlarmTemp(motorShaftTemp, temp);
}

void checkAlarm()
{
	if (sensors.hasAlarm())
	{
		Serial.println("ALARM ON MOTOR 1");
	}
}*/

routine.ino

void r_Cut()
{
	grabberGrab();
	for (int i = 0; i < 20; i++)
	{
		armTurnPos(armPos + 45);
		delay(200);
		armTurnPos(armPos - 45);
		delay(200);
	}
	delay(500);
	grabberNeutral();
	armTurnPos(armPos);
}

void r_Grab()
{
	grabberGrab();
	grabberNeutral();
	armTurnPos(armPos);
}

void r_RPMtester(AccelStepper driver)
{
	Serial.println(F("Testing RPM:"));
	Serial.print(F(" -Max speed: "));
	Serial.println(driver.maxSpeed());
	for (int i = 100; i < 500; i += 50)
	{
		Serial.print(F(" -Acceleration: "));
		Serial.println(i);
		driver.setAcceleration(i);
		driver.move(500 * stepsPerRevolution);
		while (driver.distanceToGo())
			driver.run();

		Serial.println(F("Starting next iteration in 1 second"));
		delay(1000);
	}
	Serial.println(F("Nope....Test is over. Resuming in 3 seconds"));
	delay(3000);
}

void r_DirectionTest()
{
	Serial.println(F("Testing Drirectoion:"));
	Serial.println(F("------------------"));
	Serial.println(F("Arm motor +"));
	armStepper.move(50);
	armStepper.runToPosition();
	armStepper.move(-50);
	armStepper.runToPosition();
	armStepper.disableOutputs();
	Serial.println(F("Shaft motor +"));
	shaftStepper.move(50);
	shaftStepper.runToPosition();
	shaftStepper.move(-50);
	shaftStepper.runToPosition();
	shaftStepper.disableOutputs();
	Serial.println(F("Kop motor +"));
	kopStepper.move(50);
	kopStepper.runToPosition();
	kopStepper.move(-50);
	kopStepper.runToPosition();
	kopStepper.disableOutputs();
}

void r_MovePlant(int plant)
{
	kopStepper.moveTo((int)200*plant);
	kopStepper.runToPosition();
}

Shared

CommandBook.ino

int countCommand(CommandBook *book)
{
	int c = 0;
	while (book[c].command != NULL && c < BOOKSIZE)
		c++;
	return c;
}

bool addCommand(CommandBook *book, char command, int value)
{
	int c = countCommand(book);
	if (c >= BOOKSIZE) {
		return false;
	}
	book[c].command = command;
	book[c].value = value;
	return true;
}

#ifndef BASESTATION
void runCommand(CommandBook *book)
{
	int c = countCommand(book);
	for (int i = 0; i < c; i++)
	{
		switch (book[i].command)
		{
		case 't':
		{
			r_MovePlant(book[i].value);
			break;
		}
		case 'c':
		{
			r_Cut();
			break;
		}
		case 'g':
		{
			r_Grab();
			break;
		}
		case 'r':
		{
			r_MovePlant(0);
			break;
		}
		case 'W':
		{
			shaftStepper.enableOutputs();
			shaftStepper.moveTo(900);
			shaftStepper.runToPosition();
			shaftStepper.disableOutputs();
			break;
		}
		case 'S':
		{
			shaftStepper.enableOutputs();
			shaftStepper.moveTo(0);
			shaftStepper.runToPosition();
			//shaftStepper.disableOutputs(); //Keeping the shaft on it's place ONE TIME ONLY FOR DEMO (MABYE 2-3, but check temperature)
			break;
		}
		case 'D':
		{
			armStepper.enableOutputs();
			armStepper.moveTo(750);
			armStepper.runToPosition();
			armStepper.disableOutputs();
			break;
		}
		case 'A':
		{
			armStepper.enableOutputs();
			armStepper.moveTo(0);
			armStepper.runToPosition();
			armStepper.disableOutputs();
			break;
		}
		case 'u':
		{
			armTurnPos(book[i].value);
			break;
		}
		case 'i':
		{
			grabberTurnPos(book[i].value );
			break;
		}
		case 'd':
		{
			delay(book[i].value);
			break;
		}
		case 'm':
		{
			kopStepper.move(book[i].value);
			break;
		}
		default:		// "undef"
			break;
		book[i].command = NULL;
		book[i].value = NULL;

		}
		Serial.print('-');
		Serial.print(book[i].command);
		Serial.print('\t');
		Serial.print(book[i].value);
		Serial.println("\tDone");
	}
	Serial.println("All commands done.");
}
#endif // BASESTATION

void printCommand(CommandBook *book)
{
	int c = countCommand(book);
	Serial.println(F("Commandos in book:"));
	for (int i = 0; i < c; i++)
	{
		Serial.print('-');
		Serial.print(book[i].command);
		Serial.print('\t');
		Serial.println(book[i].value);
	}
	Serial.println(F("-END OF COMMANDS"));
}

bool deleteCommand(CommandBook *book)
{
	int c = countCommand(book);
	if (c == 0) {
		return false;
	}
	book[c - 1].command = NULL;
	book[c - 1].value = NULL;
	return true;
}

bool sendCommand(CommandBook *book) {
	int c = countCommand(book);
	uint8_t* buf = new uint8_t[BOOKSIZE * 3 + 1];
	buf[0] = c;
	for (int n = 0; n < c; n += 1) {
		buf[(n * 3) + 1] = (uint8_t) book[n].command;
		buf[(n * 3) + 2] = (uint8_t) (book[n].value >> 8);
		buf[(n * 3) + 3] = (uint8_t)(book[n].value & 0xFF);
	}

	Serial.println(F("Sending message..."));
	bool result = nrf24SendMessage(buf, c * 3 + 1);
	delete buf;
	return result;
}

nrf24communication.ino

#include <RHReliableDatagram.h>
#include <RH_NRF24.h>
#include <SPI.h>

#define CLIENT_ADDRESS 1
#define SERVER_ADDRESS 2

// Singleton instance of the radio driver
RH_NRF24 driver;
// RH_NRF24 driver(8, 7);   // For RFM73 on Anarduino Mini

// Class to manage message delivery and receipt, using the driver declared above
RHReliableDatagram manager(driver);

bool isServer;
uint8_t _nrf24_buf[32];
uint8_t _nrf24_blen = 0;

bool nrf24Initialize(bool server) {
	Serial.print(F(" -Initiating radio:\t"));
	if (manager.init()) {
		Serial.println(F("OK"));
		Serial.print(F(" -Setting radio channel:\t"));
		if (!driver.setChannel(1)) {
			return false;
			Serial.println(F("setChannel failed"));
		}
		else {
			Serial.println(F("Channel 1"));
		}
		Serial.print(F(" -Setting radio settings:\t"));
		if (!driver.setRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm)) {
			Serial.println(F("setRF failed"));
			return false;
		}
		else {
			Serial.println(F("2Mbps, 0dBm"));
		}
	}
	else {
		Serial.println(F("FAILED!!!"));
		return false;
	}

	if (server) {
		manager.setThisAddress(SERVER_ADDRESS);
	}
	else {
		manager.setThisAddress(CLIENT_ADDRESS);
	}
	isServer = server;

	return true;
}

bool compareBuffers(uint8_t *buf1, uint8_t *buf2, uint8_t len) {
	for (uint8_t n = 0; n < len; n += 1) {
		if (buf1[n] != buf2[n]) {
			return false;
		}
	}
	return true;
}

void nrf24DebugPrint(char* str) {
	if (true) {
		Serial.println(str);
	}
}

bool nrf24ReceiveMessage(uint8_t* str, uint8_t* len) {
	uint8_t from;
	if (!manager.waitAvailableTimeout(3000)) {
		return false;
	}

	if (!manager.recvfromAck(str, len, &from)) {
		debugln(F("Couldn't receive message"));
		return false;
	}
	uint8_t* _nrf24_buf = (uint8_t *) "OK";
	if (manager.sendtoWait(_nrf24_buf, 3, from)) {
		return true;
	}
	debugln(F("Did not receive acknowledgement on 'OK'"));
	return false;

}

bool nrf24SendMessage(uint8_t* str, uint8_t len) {
	uint8_t address = SERVER_ADDRESS;
	if (isServer) {
		address = CLIENT_ADDRESS;
	}

	if (!manager.sendtoWait(str, len, address)) {
		debugln(F("No acknowledgement received"));
		return false;
	}

	if (!manager.waitAvailableTimeout(1000)) {
		return false;
	}

	uint8_t from;
	if (manager.recvfromAck(_nrf24_buf, &_nrf24_blen, &from)) {
		return true;
	}
	debugln(F("Could not receive 'OK'"));
	return false;
}

bool radioSleep()
{
	driver.setModeIdle();	
	if (driver.sleep())
	{
		return true;
	}
	else
		return false;
}