Do My Homework / Homework Help Answers / Computer Science Homework Help / Programming a RC car through Arduino using MATLAB & Simulink

Programming a RC car through Arduino using MATLAB & Simulink

Need help with this question or any other Computer Science assignment help task?

There are 2 parts to the proposal. For extensive and comprehensive detail please see attached document titled 'Project Proposal'. We require a RC car to be programmed. The hardware is in Germany but we can give access to the robot 24/7 for testing. The first part must be complete by Monday and the second part i.e. the write-up, can come afterwards.
Additional Instructions:
Simulink-Dateien/Student_Version_v2.zip Student_Version_v2/RC_CAR_control_STUDENT_v1.bin Student_Version_v2/RC_CAR_control_STUDENT_v1.elf Student_Version_v2/RC_CAR_control_STUDENT_v1.slxc R2022a/win64/coderslproj/coderslproj_ert_R2022a_win64/sl_proj.tmw Simulink Coder project marker file. Please don't change it. slprjVersion: 10.5_091 R2022a/win64/coderTop/coderTop_ert_R2022a_win64/RC_CAR_control_STUDENT_v1_ert_rtw/buildInfo.mat templateMakefile:[0x0 char array] @:[1x169528 uint8 array] R2022a/win64/coderTop/coderTop_ert_R2022a_win64/RC_CAR_control_STUDENT_v1_ert_rtw/codedescriptor.dmr R2022a/win64/coderTop/coderTop_ert_R2022a_win64/RC_CAR_control_STUDENT_v1_ert_rtw/extmode_task_info.m function [taskInfo, numtask, isDeploymentDiagram]=extmode_task_info() isDeploymentDiagram = 0; taskInfo(1).samplePeriod = 0.01; taskInfo(1).sampleOffset = 0.0; taskInfo(1).taskPrio = 40; taskInfo(1).taskName = 'BaseRate'; taskInfo(1).entryPoints = {}; taskInfo(1).nonFcnCallPartitionName = 'D1'; numtask = 1; for i = 1:numtask if ( 0 == isnumeric(taskInfo(i).samplePeriod) ) taskInfo(i).samplePeriod = evalin('base', 'str2double(taskInfo(i).samplePeriod)'); end if ( isempty(taskInfo(i).taskName) ) taskInfo(i).taskName = ['AutoGen' i ]; end end end R2022a/win64/coderTop/coderTop_ert_R2022a_win64/RC_CAR_control_STUDENT_v1_ert_rtw/RC_CAR_control_STUDENT_v1.mk ########################################################################### ## Makefile generated for component 'RC_CAR_control_STUDENT_v1'. ## ## Makefile : RC_CAR_control_STUDENT_v1.mk ## Generated on : Thu Jun 02 17:27:24 2022 ## Final product: $(RELATIVE_PATH_TO_ANCHOR)/RC_CAR_control_STUDENT_v1.elf ## Product type : executable ## ########################################################################### ########################################################################### ## MACROS ########################################################################### # Macro Descriptions: # PRODUCT_NAME Name of the system to build # MAKEFILE Name of this makefile PRODUCT_NAME = RC_CAR_control_STUDENT_v1 MAKEFILE = RC_CAR_control_STUDENT_v1.mk MATLAB_ROOT = C:/PROGRA~1/MATLAB/R2022a MATLAB_BIN = C:/PROGRA~1/MATLAB/R2022a/bin MATLAB_ARCH_BIN = $(MATLAB_BIN)/win64 START_DIR = S:/MATLAB_TEMP SOLVER = SOLVER_OBJ = CLASSIC_INTERFACE = 0 TGT_FCN_LIB = None MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0 RELATIVE_PATH_TO_ANCHOR = .. SLIB_PATH = C:/Users/chris/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1 C_STANDARD_OPTS = CPP_STANDARD_OPTS = ########################################################################### ## TOOLCHAIN SPECIFICATIONS ########################################################################### # Toolchain Name: Arduino ARM # Supported Version(s): # ToolchainInfo Version: 2022a # Specification Revision: 1.0 # #------------------------------------------- # Macros assumed to be defined elsewhere #------------------------------------------- # ARDUINO_ROOT # ARDUINO_PACKAGES_TOOLS_ROOT # ARDUINO_PORT # ARDUINO_MCU # ARDUINO_BAUD # ARDUINO_PROTOCOL # ARDUINO_F_CPU #----------- # MACROS #----------- SHELL = %SystemRoot%/system32/cmd.exe PRODUCT_HEX = $(RELATIVE_PATH_TO_ANCHOR)/$(PRODUCT_NAME).hex PRODUCT_BIN = $(RELATIVE_PATH_TO_ANCHOR)/$(PRODUCT_NAME).bin ARDUINO_TOOLS = $(ARDUINO_PACKAGES_TOOLS_ROOT)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin TOOLCHAIN_SRCS = TOOLCHAIN_INCS = TOOLCHAIN_LIBS = -Wl,--end-group -lm -gcc -lcore #------------------------ # BUILD TOOL COMMANDS #------------------------ # Assembler: Arduino ARM Assembler AS_PATH = $(ARDUINO_TOOLS) AS = "$(AS_PATH)/arm-none-eabi-gcc" # C Compiler: Arduino ARM C Compiler CC_PATH = $(ARDUINO_TOOLS) CC = "$(CC_PATH)/arm-none-eabi-gcc" # Linker: Arduino ARM Linker LD_PATH = $(ARDUINO_TOOLS) LD = "$(LD_PATH)/arm-none-eabi-gcc" # C++ Compiler: Arduino ARM C++ Compiler CPP_PATH = $(ARDUINO_TOOLS) CPP = "$(CPP_PATH)/arm-none-eabi-g++" # C++ Linker: Arduino ARM C++ Linker CPP_LD_PATH = $(ARDUINO_TOOLS) CPP_LD = "$(CPP_LD_PATH)/arm-none-eabi-gcc" # Archiver: Arduino ARM Archiver AR_PATH = $(ARDUINO_TOOLS) AR = "$(AR_PATH)/arm-none-eabi-ar" # MEX Tool: MEX Tool MEX_PATH = $(MATLAB_ARCH_BIN) MEX = "$(MEX_PATH)/mex" # Binary Converter: Binary Converter OBJCOPY_PATH = $(ARDUINO_PACKAGES_TOOLS_ROOT)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin OBJCOPY = "$(OBJCOPY_PATH)/arm-none-eabi-objcopy" # Download: Download DOWNLOAD = # Execute: Execute EXECUTE = $(PRODUCT) # Builder: Make Tool MAKE_PATH = %MATLAB%\bin\win64 MAKE = "$(MAKE_PATH)/gmake" #------------------------- # Directives/Utilities #------------------------- ASDEBUG = -g AS_OUTPUT_FLAG = -o CDEBUG = -g C_OUTPUT_FLAG = -o LDDEBUG = -g OUTPUT_FLAG = -o CPPDEBUG = -g CPP_OUTPUT_FLAG = -o CPPLDDEBUG = -g OUTPUT_FLAG = -o ARDEBUG = STATICLIB_OUTPUT_FLAG = MEX_DEBUG = -g RM = ECHO = echo MV = RUN = #---------------------------------------- # "Faster Builds" Build Configuration #---------------------------------------- MEX_CPPFLAGS = MEX_CPPLDFLAGS = MEX_CFLAGS = MEX_LDFLAGS = #--------------------------- # Model-Specific Options #--------------------------- ASFLAGS = -MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" -Wall -x assembler-with-cpp $(ASFLAGS_ADDITIONAL) $(DEFINES) $(INCLUDES) -c CFLAGS = -std=gnu11 -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" -g LDFLAGS = -Os -Wl,-Map="$(PRODUCT_NAME).map" -Wl,--gc-sections -g SHAREDLIB_LDFLAGS = -g CPPFLAGS = -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" -g CPP_LDFLAGS = -Os -Wl,-Map="$(PRODUCT_NAME).map" -Wl,--gc-sections -g CPP_SHAREDLIB_LDFLAGS = -g ARFLAGS = ruvs OBJCOPYFLAGS_BIN = -O binary $(PRODUCT) $(PRODUCT_BIN) DOWNLOAD_FLAGS = EXECUTE_FLAGS = MAKE_FLAGS = -f $(MAKEFILE) ########################################################################### ## OUTPUT INFO ########################################################################### PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)/RC_CAR_control_STUDENT_v1.elf PRODUCT_TYPE = "executable" BUILD_TYPE = "Top-Level Standalone Executable" ########################################################################### ## INCLUDE PATHS ########################################################################### INCLUDES_BUILDINFO = -I$(START_DIR) -I$(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw -I$(MATLAB_ROOT)/extern/include -I$(MATLAB_ROOT)/simulink/include -I$(MATLAB_ROOT)/rtw/c/src -I$(MATLAB_ROOT)/rtw/c/src/ext_mode/common -I$(MATLAB_ROOT)/rtw/c/ert -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/include -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/common -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/src -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/include -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/transport/include -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/transport/src -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/platform/include -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/platform/default -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/ext_mode/include -I$(MATLAB_ROOT)/toolbox/coder/xcp/src/target/ext_mode/src -I$(MATLAB_ROOT)/rtw/c/ext_mode/common -I$(MATLAB_ROOT)/toolbox/coder/rtiostream/src -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/system/libsam -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/system/CMSIS/CMSIS/Include -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/system/CMSIS/Device/ATMEL -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/cores/arduino -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/cores/arduino/avr -I$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/SUPPOR~1/ARDUIN~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/SUPPOR~1/ARDUIN~1/SCHEDU~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/SUPPOR~1/ARDUIN~2/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/shared/EXTERN~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/SUPPOR~1/ARMCOR~1/SCHEDU~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2022a/toolbox/target/SUPPOR~1/ARMCOR~1/xcp/include INCLUDES = $(INCLUDES_BUILDINFO) ########################################################################### ## DEFINES ########################################################################### DEFINES_ = -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DXCP_MAX_CTO_SIZE=255 -DXCP_MAX_DTO_SIZE=65532 -DXCP_MAX_ODT_ENTRY_SIZE=255 -DXCP_MAX_DAQ=65535 -DXCP_MIN_DAQ=0 -DXCP_MAX_EVENT_CHANNEL=128 -DXCP_ID_FIELD_TYPE=0 -DXCP_TIMESTAMP_SIZE=4 -DXCP_ADDRESS_GRANULARITY=XCP_ADDRESS_GRANULARITY_BYTE -DXCP_MEM_RESERVED_POOLS_TOTAL_SIZE=927 -DXCP_MEM_DAQ_RESERVED_POOL_BLOCKS_NUMBER=3 -DMW_TIMERID=8 -DMW_TIMERCOUNT=26250 -DMW_SAM_CLOCKID=TC_CMR_TCCLKS_TIMER_CLOCK3 -DARDUINO_NUM_SERIAL_PORTS=4 -D_RTT_BAUDRATE_SERIAL0_=115200 -D_RTT_BAUDRATE_SERIAL1_=9600 -D_RTT_BAUDRATE_SERIAL2_=9600 -D_RTT_BAUDRATE_SERIAL3_=9600 -D_RTT_ANALOG_REF_=0 -DMW_RTIO_SERIAL0 -D_RTT_OVERRUN_DIGITAL_PIN_=13 DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DEXT_MODE=1 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 DEFINES_CUSTOM = DEFINES_OPTS = -DXCP_DAQ_SUPPORT -DXCP_CALIBRATION_SUPPORT -DXCP_TIMESTAMP_SUPPORT -DXCP_TIMESTAMP_BASED_ON_SIMULATION_TIME -DXCP_SET_MTA_SUPPORT -DXCP_MEM_DAQ_RESERVED_POOLS_NUMBER=1 -DEXTMODE_XCP_TRIGGER_SUPPORT -DEXTMODE_STATIC -DEXTMODE_STATIC_SIZE=24576 -DON_TARGET_WAIT_FOR_START=1 -DRT -DUSE_RTMODEL -DERT -DTID01EQ=0 -DXCP_MEM_BLOCK_1_SIZE=32 -DXCP_MEM_BLOCK_1_NUMBER=1 -DXCP_MEM_BLOCK_2_SIZE=48 -DXCP_MEM_BLOCK_2_NUMBER=1 -DXCP_MEM_BLOCK_3_SIZE=96 -DXCP_MEM_BLOCK_3_NUMBER=1 DEFINES_SKIPFORSIL = -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 DEFINES_STANDARD = -DMODEL=RC_CAR_control_STUDENT_v1 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 DEFINES = $(DEFINES_) $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_SKIPFORSIL) $(DEFINES_STANDARD) ########################################################################### ## SOURCE FILES ########################################################################### SRCS = xcp_ext_mode.c $(MATLAB_ROOT)/rtw/c/src/rt_matrx.c $(MATLAB_ROOT)/rtw/c/src/rt_printf.c $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/RC_CAR_control_STUDENT_v1.c $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/RC_CAR_control_STUDENT_v1_data.c $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/rtGetInf.c $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/rtGetNaN.c $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/rt_nonfinite.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/ext_mode/src/xcp_ext_common.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/ext_mode/src/xcp_ext_classic_trigger.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/src/xcp.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/src/xcp_standard.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/src/xcp_daq.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/protocol/src/xcp_calibration.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/transport/src/xcp_fifo.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/transport/src/xcp_transport.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/platform/default/xcp_mem_default.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/platform/default/xcp_drv_rtiostream.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/slave/transport/src/xcp_frame_serial.c $(MATLAB_ROOT)/toolbox/coder/xcp/src/target/ext_mode/src/xcp_ext_param_default_serial.c $(START_DIR)/SPI_Communication.cpp $(START_DIR)/SPI_Communication_wrapper.cpp C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/arduinotarget/registry/../scheduler/src/arm_m3_cortex_handler.c C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/arduinotarget/registry/../src/MW_ArduinoHWInit.cpp C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/arduinobase/src/io_wrappers.cpp C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/arduinotarget/registry/../scheduler/src/arduinoARMScheduler.cpp C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/armcortexmbase/scheduler/src/m3m4m4f_multitasking.c C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/arduinotarget/registry/../src/rtiostream_serial_daemon.cpp C:/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/armcortexmbase/xcp/src/sys_arch.c MAIN_SRC = $(START_DIR)/RC_CAR_control_STUDENT_v1_ert_rtw/ert_main.c ALL_SRCS = $(SRCS) $(MAIN_SRC) ########################################################################### ## OBJECTS ########################################################################### OBJS = xcp_ext_mode.o rt_matrx.o rt_printf.o RC_CAR_control_STUDENT_v1.o RC_CAR_control_STUDENT_v1_data.o rtGetInf.o rtGetNaN.o rt_nonfinite.o xcp_ext_common.o xcp_ext_classic_trigger.o xcp.o xcp_standard.o xcp_daq.o xcp_calibration.o xcp_fifo.o xcp_transport.o xcp_mem_default.o xcp_drv_rtiostream.o xcp_frame_serial.o xcp_ext_param_default_serial.o SPI_Communication.o SPI_Communication_wrapper.o arm_m3_cortex_handler.o MW_ArduinoHWInit.o io_wrappers.o arduinoARMScheduler.o m3m4m4f_multitasking.o rtiostream_serial_daemon.o sys_arch.o MAIN_OBJ = ert_main.o ALL_OBJS = $(OBJS) $(MAIN_OBJ) ########################################################################### ## PREBUILT OBJECT FILES ########################################################################### PREBUILT_OBJS = ########################################################################### ## LIBRARIES ########################################################################### LIBS = $(SLIB_PATH)/MW_RebuildSrc_Core.o $(SLIB_PATH)/libcore.a ########################################################################### ## SYSTEM LIBRARIES ########################################################################### SYSTEM_LIBS = ########################################################################### ## ADDITIONAL TOOLCHAIN FLAGS ########################################################################### #--------------- # C Compiler #--------------- CFLAGS_SKIPFORSIL = -MD -mcpu=cortex-m3 -fpermissive -DF_CPU=84000000L -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER=\""Unknown\"" -DUSB_PRODUCT=\""Arduino Due\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_DUE_ -DARDUINO_NUM_SERIAL_PORTS=4 -DARDUINO_ARM -DARDUINO_ARM_CORTEX_M3 CFLAGS_BASIC = $(DEFINES) $(INCLUDES) CFLAGS += $(CFLAGS_SKIPFORSIL) $(CFLAGS_BASIC) #----------- # Linker #----------- LDFLAGS_ = -L"$(SLIB_PATH)" LDFLAGS_SKIPFORSIL = -T$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/linker_scripts/gcc/flash.ld -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid $(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a LDFLAGS += $(LDFLAGS_) $(LDFLAGS_SKIPFORSIL) #-------------------------- # Shared Library Linker #-------------------------- SHAREDLIB_LDFLAGS_ = -L"$(SLIB_PATH)" SHAREDLIB_LDFLAGS_SKIPFORSIL = -T$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/linker_scripts/gcc/flash.ld -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid $(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a SHAREDLIB_LDFLAGS += $(SHAREDLIB_LDFLAGS_) $(SHAREDLIB_LDFLAGS_SKIPFORSIL) #----------------- # C++ Compiler #----------------- CPPFLAGS_SKIPFORSIL = -MD -mcpu=cortex-m3 -fpermissive -DF_CPU=84000000L -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER=\""Unknown\"" -DUSB_PRODUCT=\""Arduino Due\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_DUE_ -DARDUINO_NUM_SERIAL_PORTS=4 -DARDUINO_ARM -DARDUINO_ARM_CORTEX_M3 CPPFLAGS_BASIC = $(DEFINES) $(INCLUDES) CPPFLAGS += $(CPPFLAGS_SKIPFORSIL) $(CPPFLAGS_BASIC) #--------------- # C++ Linker #--------------- CPP_LDFLAGS_ = -L"$(SLIB_PATH)" CPP_LDFLAGS_SKIPFORSIL = -T$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/linker_scripts/gcc/flash.ld -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid $(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a CPP_LDFLAGS += $(CPP_LDFLAGS_) $(CPP_LDFLAGS_SKIPFORSIL) #------------------------------ # C++ Shared Library Linker #------------------------------ CPP_SHAREDLIB_LDFLAGS_ = -L"$(SLIB_PATH)" CPP_SHAREDLIB_LDFLAGS_SKIPFORSIL = -T$(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/linker_scripts/gcc/flash.ld -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid $(ARDUINO_SAM_ROOT)/hardware/sam/$(SAM_LIB_VERSION)/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a CPP_SHAREDLIB_LDFLAGS += $(CPP_SHAREDLIB_LDFLAGS_) $(CPP_SHAREDLIB_LDFLAGS_SKIPFORSIL) ########################################################################### ## INLINED COMMANDS ########################################################################### DERIVED_SRCS = $(subst .o,.dep,$(OBJS)) build: %.dep: -include codertarget_assembly_flags.mk -include *.dep ########################################################################### ## PHONY TARGETS ########################################################################### .PHONY : all build buildobj clean info prebuild postbuild download execute all : build postbuild echo "### Successfully generated all binary outputs." build : prebuild $(PRODUCT) buildobj : prebuild $(OBJS) $(PREBUILT_OBJS) $(LIBS) echo "### Successfully generated all binary outputs." prebuild : postbuild : $(PRODUCT) echo "### Invoking postbuild tool "Binary Converter" ..." $(OBJCOPY) $(OBJCOPYFLAGS_BIN) echo "### Done invoking postbuild tool." download : postbuild execute : download echo "### Invoking postbuild tool "Execute" ..." $(EXECUTE) $(EXECUTE_FLAGS) echo "### Done invoking postbuild tool." ########################################################################### ## FINAL TARGET ########################################################################### #------------------------------------------- # Create a standalone executable #------------------------------------------- $(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(LIBS) $(MAIN_OBJ) echo "### Creating standalone executable "$(PRODUCT)" ..." $(CPP_LD) $(CPP_LDFLAGS) -o $(PRODUCT) $(OBJS) $(MAIN_OBJ) $(LIBS) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS) echo "### Created: $(PRODUCT)" ########################################################################### ## INTERMEDIATE TARGETS ########################################################################### #--------------------- # SOURCE-TO-OBJECT #--------------------- %.o : %.c $(CC) $(CFLAGS) -o "$@" "$
Assembly instructions RC laboratory vehicle Summer2022 2 Overview The following picture shows the communication between MATLAB-Simulink and the vehicle. A total of 3 networked microcontrollers are involved. The Simulink model and thus the entire control and regulation run in “External Mode” on an Arduino Due. The vehicle is a pure slave system, on which no control takes place. It is set to an NOT-STOP state (engine off) if the connection is broken after 50ms. The ESP32 microcontrollers establish a WIFI direct connection. For this, both controllers must know the MAC address of the partner. A WIFI router or access data is not required for this connection. 3 General preparation Three steps are required to participate in the laboratory project: 1. Preparation of your PC’s 2. Setup of the Master System (Arduino Due & ESP32) 3. Structure of the laboratory vehicle 4. Commissioning of the master system 5. Commissioning of the complete system incl. Vehicle 6. Stabilization of the harness For the setup you need the following tools: • Hot glue gun • Side cutter for the cable ties • If necessary, a telephone pliers. 4 parts list (components) 5 Setup of the master system (Arduino Due and ESP32 on the PC) 1. Wire the microcontrollers (Arduino Due and ESP32) according to the following circuit diagram (Figure 4). IMPORTANT: Use the ESP32 board without the addition “F. ” The other ESP32 board for the vehicle with the addition “F” is also recognizable by a soldered capacitor between pin 23 and GND. 2. Stabilize the cable connections by means of cable ties to avoid accidental slipping of the connectors. IMPORTANT is the following color convention: always use the colors RED for the power supply (+) and the color BLACK for the ground (GND / -). Please use different colours for signals. 6 Conversion of the vehicle 1. Unplug the battery and charge it. The battery is charged when both LEDs of the charger show the color green. Do not charge the battery permanently! 2. Remove the original model-building receiver. To do this, the cover must be removed and the cables must be staked. 3. Wire the components motor control (“drive controller”), steering servo, ESP32-μC, ultrasonic sensors and motor position sensor according to chapter 6. 1. For this purpose, use the WAGO terminals as a distributor for joint contacts. IMPORTANT: Use the ESP32 board with the addition “F” for “vehicle. ” It is also recognizable by a soldered capacitor between pin 23 and GND. IMPORTANT here is the color convention: always use the colors RED for the 6V connection (+) and the color BLACK for the ground (GND / -). You can also use orange (instead of red) and grey (instead of black) as replacement colours if there are no red or black cables. Please use different colours for signals. Steering Servo Drive direction Consignees Speed control Motor 6.2 Schematic of the vehicle 6.2 Mounting of ultrasonic sensors Attach the ultrasonic sensors to the front bumper with hot glue in the direction of travel. The side sensors should be as wide an angle as possible to the side and can / may also be positioned vertically, by way of derogation from Figure 7. Use cable ties to ensure that the plugs remain in position. 6. 3 Mounting the gyro sensor (acceleration sensor) The gyrosensor can be positioned as desired. Recommendation: it fits well into the compartment of the previously removed recipient. 6.4 Mounting the Hall Sensor for the Motor Position Attach the hall sensor board to the chassis with 2 drops of hot glue so that the sensor element points outwards to the magnets on the motor pinion, see Figure 9. To do this, you can bend the wires of the component carefully. Do not bend back and forth unnecessarily, otherwise the wires may break. The distance should be about 3mm. Note: a final fixation with a lot of hot glue should only be done after a successful function test! 8 Commissioning of the master system First, start up the master system. 1. Connect the Arduino Due to a USB port of your PC via the programming port (see also Figure 4). 2. Unzip the zip file (“Student_version_vXXX. zip”) with the provided Arduino files in the MATLAB working directory, see Figure 10. 3. Start one of the models (“RC_CAR_control_STUDENT_vXXX_r2020a. slx” or “RC_CAR_control_STUDENT_vXXX_r2022a. slx”) using the “Monitor and Tune” button in the “Hardware” tab. If the button is not offered, you have not installed Arduino support (Chapter 7). Check if the model starts correctly. This is the case when the message “running the model on Arduino Due” appears in the status line (bottom left) after about 1-2 minutes. Troubleshooting: see Section 8. 1. Since the vehicle is not connected yet, you cannot see current sensor values. However, under “Microseconds” you should see the system time of the connected ESP32-μC running, see Figure 12. If this is not the case, the connection between the Arduino Due and the ESP32 microcontroller is faulty. 9 Entry into service of the vehicle For this step, a master system is already working on a Simulink PC; furthermore, the vehicle is already wired, although the harness has not yet been stabilized with cable ties for troubleshooting purposes. Follow these steps: 1) Check one last time that all cables on the car are connected correctly 2) Bend the vehicle with a brick or with books so that the wheels cannot touch the ground (recommended minimum distance of 1-2cm). 3) Now connect the battery to the motor control 4) Switch on the motor control at the slide switch. 5) If the vehicle base functions correctly, the following will happen: a) The engine control beeps b) the front wheels steer briefly to the right and then again to the left c) the engine control beeps a second time after approx. 2 seconds d) When you turn the wheels and thus turn the engine, the light-emitting diode of the position sensor on the motor pinion blinks. 6) Connect the Arduino Due to to the PC via the programming port and start the Simulink model “RC_CAR_control_STUDENT_v1_r202XXX. slx” in external mode (see “Master System Setting Up”). If a connection has been established with the vehicle, you may: a) Control the driving engine and the steering servo via the Const blocks (please keep the vehicle in the raised condition). The motor can only be controlled if all 3 ultrasonic sensors report a distance > 20cm. b) Read the sensor values of the vehicle. Move the vehicle carefully. The sensor values (gyro, distance 1-3 and “position”) should change accordingly.
The task is contained in the file named ‘Task MESY SS22’. We have completed the assembly of the car. The Assembly steps are contained in the document titled ‘Instillation instructions Laboratory vehicle’. This document has been completed. The remaining work: (1) Program the car to complete the route outlined on Page 2 of the document titled ‘Task MESY SS22.’ · Under the section ‘Recommended Approach’, we have completed up to Step 2 · Steps 3 to 8 require completion · The hardware is in Germany. The expert will need to write the code then send the code for us to test. · If there are any changes or errors, we can provide remote access to Robot and System. · We can provide access to the Robot for configuration · We need to officially check the robot works in the laboratory. The last day this can be done is Tuesday 12th of July. · If the code can be written as soon as possible and by Monday 11th of July at the latest, then we can test and fix any errors on Monday the 11th. · We are available to test the code at any time. If the expert finishes before Monday or wants to test something, then we can be available. (2) A small report, 10 pages max detailing the steps taken · This can be completed afterwards. We don’t need this straight away. Deadline for this is Friday 15th of Jul Notes · The Simulink files that must be used for the programming RC_CAR_control_STUDENT_v1_r2020a_.slx RC_CAR_control_STUDENT_v1_r2020a.slx (The newest MATLAB version) · You can use either file depending on what version of MATLAB you are using · The files are contained in the folder titled ‘Simulink Files’. · In the Simulink Files folder, you will find a file titled MESY_GYRO_calibration_STUDENT_v1.slx · This can be used to complete step 3 from the ‘Recommended Approach’ Questions (1) Is the expert able to complete the first task of writing the code and making sure it can complete the route by Monday the 11th of July? a. Is he available on Monday to fix any errors if there are any?
Task MESY SS22 Program the vehicle to be able to drive autonomously for two laps according to the sketches (see Figure 1) • In the first and second rounds, starting from of the starting position follow the contour of an “8” (entry and exit angle 30°). • At the end of the second lap, the vehicle should stop at the starting position. A successful lap is achieved if the vehicle does not show any standstill phases for more than 1 second on the course, does not cause any collisions and reaches the starting position again. Rules of the game: 1. The driving speed in the plane should be independent of the battery voltage. 2. The vehicle should also be able to overcome a small ramp (file folder with a maximum height of 5cm) on the track, even if it has been stopped before the obstacle. 3. The vehicle should be able to avoid obstacles with a length x width of up to 39x34cm on the straight sections of the track and then find the specified lane again. 4. All sensors on the vehicle may be optimized in terms of mounting, positioning and alignment to the task. 5. The steering can be optimized via the track rods. 6. The vehicle may not be influenced or corrected by people by hand or by radio during autonomous driving. 7. The vehicle is programmed on the Arduino Due development board with Simulink. The software on the ESP32 microcontrollers must not be changed. 8. You are free to choose your control and steering strategies, also with regard to the use of the sensors provided. Recommended approach: 1. Put the vehicle into service according to the assembly instructions 2. Identify your sensors with respect to their position and orientation in the Simulink model 3. Calibrate the gyrosensor with regard to its rotation rate around the vehicle’s high axis (OFFSET / zero point error) 4. Determine the speed signal from the motor position. 5. Develop a vehicle speed control for very slow speeds 6. Develop a steering strategy to avoid obstacles 7. Develop the strategy and programming for the overall course 8. Extensive tests with disturbances, especially variable obstacles and small ramps, as well as different battery charging states, to achieve the highest possible robustness.
There are no answers to this question.
Login to buy an answer or post yours. You can also vote on other others

Get Help With a similar task to - Programming a RC car through Arduino using MATLAB & Simulink

Related Questions

Similar orders to Programming a RC car through Arduino using MATLAB & Simulink
Popular Services
Tutlance Experts offer help in a wide range of topics. Here are some of our top services: