用户在使用OpenMV4 H7 Plus时遇到了引脚使用冲突的疑问,具体是关于官方LCD模块和SG90舵机的引脚分配问题。

会有冲突的,目前小助手这边经过测试,可以在使用LCD时可以使用P7引脚控制舵机,但是P7引脚不能于LCD屏幕相连,且在初始化时必须先初始化LCD,。再初始化舵机
好的,谢谢,LCD是用来显示摄像头拍摄的图像,那如果直接用官方的舵机拓展板是不是就没这个引脚冲突的问题了?还想问一下,板子的左下角那个白色的Micro USB是不是也可以插电池给板子供电,是一节3.7v就可以吗?还有右下角的连电脑存文件的是不是也可以接一个手机充电头来给板子供电?

1、是的,使用舵机扩展板不会有冲突,舵机扩展板使用P4和P5,LCD并没有使用这两个引脚。 2、左下角的为XH插槽不是microusb接口,右下角的才是microusb接口;XH插槽可以连接锂电池给OpenMV供电,供电电压不高于5V,可以连接3.7V的锂电池供电
之前问的问题,回答是在使用LCD时可以使用P7引脚控制舵机。但我尝试少连了p7的引脚LCD会白屏,您那边方便给出之前测试的代码吗?
# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# LCD Example
#
# Note: To run this example you will need a LCD Shield for your OpenMV Cam.
#
# The LCD Shield allows you to view your OpenMV Cam's frame buffer on the go.
import sensor
import display
import time
from pyb import Servo
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QQVGA2) # Special 128x160 framesize for LCD Shield.
# Initialize the lcd screen.
# Note: A DAC or a PWM backlight controller can be used to control the
# backlight intensity if supported:
# lcd = display.SPIDisplay(backlight=display.DACBacklight(channel=2))
# lcd.backlight(25) # 25% intensity
# Otherwise the default GPIO (on/off) controller is used.
time.sleep_ms(1000)
lcd = display.SPIDisplay()
time.sleep_ms(1000)
s1 = Servo(1) # servo on position 1 (P7)
s1.angle(45) # move to 45 degrees
s1.angle(-60, 1500) # move to -60 degrees in 1500ms
s1.speed(50) # for continuous rotation servos
while True:
lcd.write(sensor.snapshot()) # Take a picture and display the image.

此问题就是不兼容所在,P7不连,多尝试几遍即可