FPGA控制的智能小车无线通信与环境监测系统

版权申诉
0 下载量 129 浏览量 更新于2024-09-28 收藏 5.11MB ZIP 举报
资源摘要信息:"FPGA:无线智能小车是一个利用Altera公司的Cyclone IV系列开发板,并通过Quartus II软件进行开发的工程。该工程集成了多种功能模块,包括LoRa无线通信模块、环境光探测模块、循迹模块以及PWM调速模块,旨在构建一个具备无线通信、环境适应和自动导航能力的智能小车系统。 1. **Altera Cyclone IV系列开发板**:这是Altera公司推出的一款中高端FPGA开发板,广泛用于复杂的数字系统设计。Cyclone IV系列提供了较多的逻辑单元和存储资源,适合进行高性能的系统集成和复杂算法的实现。 2. **Quartus II软件**:Quartus II是Altera公司提供的FPGA/CPLD设计软件,它支持从设计输入、综合、仿真到芯片编程的全流程设计。Quartus II提供直观的图形界面和丰富的设计工具,能够提高设计效率并降低设计复杂度。 3. **LoRa无线通信模块**:LoRa是一种远距离无线通信技术,具备远距离、低功耗的特点,非常适合于物联网(IoT)通信场景。在这个智能小车项目中,LoRa模块能够使小车实现远程控制和数据传输功能。 4. **环境光探测模块**:这一模块通常包含光敏传感器,如光敏电阻或者光敏二极管等,用于检测环境中的光照强度。在智能小车中,此模块可用于实现自动调节亮度的灯控系统,或在光照条件下执行特定的任务。 5. **循迹模块**:循迹模块能够让小车沿着预定路径行驶。它一般通过红外传感器来检测地面上的路径标记(例如黑线),并根据检测到的信号来调整小车的行驶方向,使小车可以沿着路径自动行驶。 6. **PWM调速模块**:脉冲宽度调制(PWM)是一种广泛应用的技术,用于控制电机的速度。在智能小车中,通过调节PWM信号的占空比,可以精确控制电机的转速,从而实现对小车行驶速度的有效控制。 7. **文件名称列表中的“a.txt”和“1.zip”**:这可能是该工程的文档说明和辅助模块代码的压缩包。a.txt文件可能包含了项目的开发说明、模块的连接配置以及使用方法等信息。而1.zip压缩包可能包含了额外的模块代码,虽然这些代码没有直接集成到主工程中,但提供了一种扩展性和可定制性,可以根据实际需要添加到工程中去。 总结来说,这个FPGA:无线智能小车项目是一个典型的嵌入式系统工程,涉及到FPGA设计、传感器集成、无线通信、PWM调速等多个技术点。项目不仅要求设计者具备扎实的FPGA开发能力,还需掌握传感器应用、无线通信协议和电机控制等知识。通过实践这样的项目,可以加深对数字系统设计、嵌入式编程和物联网技术的理解和应用能力。

arm-none-eabi-gcc -o "SENSOR_CB.elf" @"objects.list" -mcpu=cortex-m3 -T"C:\Users\WangBingqian\Desktop\SC10L151Cube\trunk\NO_FOTA_VERSION\STM32L151CBTXA_FLASH.ld" --specs=nosys.specs -Wl,-Map="SENSOR_CB.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group Core/Src/rs485.o: In function `get_sample_data_max_min_value': rs485.c:(.text.get_sample_data_max_min_value+0x0): multiple definition of `get_sample_data_max_min_value' Core/Src/lora_wan.o:lora_wan.c:(.text.get_sample_data_max_min_value+0x0): first defined here Core/Src/rs485.o: In function `computeMvScale': rs485.c:(.text.computeMvScale+0x0): multiple definition of `computeMvScale' Core/Src/lora_wan.o:lora_wan.c:(.text.computeMvScale+0x0): first defined here Core/Src/rs485.o: In function `computeMvScale_f': rs485.c:(.text.computeMvScale_f+0x0): multiple definition of `computeMvScale_f' Core/Src/lora_wan.o:lora_wan.c:(.text.computeMvScale_f+0x0): first defined here Core/Src/rs485.o: In function `generate_frag_data': rs485.c:(.text.generate_frag_data+0x0): multiple definition of `generate_frag_data' Core/Src/lora_wan.o:lora_wan.c:(.text.generate_frag_data+0x0): first defined here Core/Src/rs485.o:(.bss.frag_num+0x0): multiple definition of `frag_num' Core/Src/lora_wan.o:(.bss.frag_num+0x0): first defined here collect2.exe: error: ld returned 1 exit status make: *** [makefile:50: SENSOR_CB.elf] Error 1 "make -j4 all" terminated with exit code 2. Build might be incomplete.是什么错误

2023-06-09 上传

Build started: Project: template *** Using Compiler 'V6.19', folder: 'D:\Keil_v5\ARM\ARMCLANG\Bin' Build target 'Target 1' ../User/main.c(2): error: 'lora.h' file not found #include "lora.h" ^~~~~~~~ 1 error generated. compiling main.c... LoRa.c(8): error: use of undeclared identifier 'RCU_AF' rcu_periph_clock_enable(RCU_AF); ^ LoRa.c(9): error: call to undeclared function 'gpio_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] gpio_init(LORA_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_TX); ^ LoRa.c(9): error: use of undeclared identifier 'GPIO_MODE_AF_PP' gpio_init(LORA_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_TX); ^ LoRa.c(10): error: use of undeclared identifier 'GPIO_MODE_IN_FLOATING' gpio_init(LORA_UART_GPIO, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_RX); ^ LoRa.c(23): error: use of undeclared identifier 'GPIO_MODE_IPU' gpio_init(LORA_AUX_GPIO, GPIO_MODE_IPU, GPIO_OSPEED_50MHZ, LORA_AUX_GPIO_PIN); ^ 5 errors generated. compiling LoRa.c... Usart.c(8): error: use of undeclared identifier 'RCU_AF' rcu_periph_clock_enable(RCU_AF); ^ Usart.c(9): error: call to undeclared function 'gpio_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] gpio_init(USART_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_TX); ^ Usart.c(9): error: use of undeclared identifier 'GPIO_MODE_AF_PP' gpio_init(USART_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_TX); ^ Usart.c(10): error: use of undeclared identifier 'GPIO_MODE_IN_FLOATING' gpio_init(USART_UART_GPIO, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_RX); ^ 4 errors generated. compiling Usart.c... ".\Objects\template.axf" - 10 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:01

2023-07-17 上传

create LoRA network. base dim (rank): 64, alpha: 32 neuron dropout: p=None, rank dropout: p=None, module dropout: p=None create LoRA for Text Encoder: 72 modules. create LoRA for U-Net: 192 modules. enable LoRA for text encoder enable LoRA for U-Net Traceback (most recent call last): File "D:\lora_lian\sd-scripts\train_network.py", line 873, in <module> train(args) File "D:\lora_lian\sd-scripts\train_network.py", line 242, in train info = network.load_weights(args.network_weights) File "D:\lora_lian\sd-scripts\networks\lora.py", line 884, in load_weights info = self.load_state_dict(weights_sd, False) File "D:\lora_lian\python\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for LoRANetwork: size mismatch for lora_unet_mid_block_attentions_0_proj_out.lora_up.weight: copying a param with shape torch.Size([1280, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([1280, 64, 1, 1]). Traceback (most recent call last): File "D:\lora_lian\python\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\lora_lian\python\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1114, in <module> main() File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1110, in main launch_command(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command simple_launcher(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['D:\\lora_lian\\python\\python.exe', './sd-scripts/train_network.py', '--config_file', 'D:\\lora_lian\\toml\\autosave\\20230709-112914.toml']' returned non-zero exit status 1. Training failed / 训练失败

2023-07-10 上传