日B视频 亚洲,啪啪啪网站一区二区,91色情精品久久,日日噜狠狠色综合久,超碰人妻少妇97在线,999青青视频,亚洲一区二卡,让本一区二区视频,日韩网站推荐

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

立創(chuàng)·梁山派開(kāi)發(fā)板-21年電賽F題-送藥小車(chē)-K210功能實(shí)現(xiàn)代碼講解

jf_31863339 ? 來(lái)源:jf_31863339 ? 作者:jf_31863339 ? 2023-08-01 09:49 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

送藥小車(chē)代碼倉(cāng)庫(kù):https://gitee.com/lcsc/medical_car

更好的觀看體驗(yàn)請(qǐng)去:https://lceda001.feishu.cn/wiki/ZDYbwqDfCiwVlckUEcScF0KSnRh

送藥小車(chē)立創(chuàng)開(kāi)源平臺(tái)資料:https://oshwhub.com/li-chuang-kai-fa-ban/21-dian-sai-f-ti-zhi-neng-song-yao-xiao-che

K210功能實(shí)現(xiàn)代碼講解

具體實(shí)現(xiàn)代碼如下(在2_Code->application->sensor->k210->pyconde->main.py):

# Hello World Example
#
# Welcome to the CanMV IDE! Click on the green run arrow button below to run the script!

import sensor, image, time, lcd, struct, ustruct
import gc

from machine import UART,Timer,PWM
from board import board_info
from fpioa_manager import fm
import KPU as kpu
from Maix import GPIO,utils
import gc
import machine

lcd.init()                          # Init lcd display
lcd.clear(lcd.RED)                  # Clear lcd screen.

sensor.reset(freq=22000000, dual_buff=1)                # 設(shè)置攝像頭頻率 24M 開(kāi)啟雙緩沖模式 會(huì)提高幀率 但內(nèi)存占用增加
sensor.set_auto_exposure(0)         # 設(shè)置自動(dòng)曝光
sensor.set_auto_gain(False) # 顏色跟蹤必須關(guān)閉自動(dòng)增益
sensor.set_auto_whitebal(False) # 顏色跟蹤必須關(guān)閉白平衡
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)

#kpu = KPU()
#kpu.load_kmodel("/sd/KPU/mnist/uint8_mnist_cnn_model.kmodel")
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.
sensor.set_auto_exposure(0)         # 設(shè)置自動(dòng)曝光

sensor.set_vflip(1)
#______________________________________________________________________________________________________________________________
#打印內(nèi)存分配情況
print(utils.gc_heap_size())
print("stack mem:"+str(gc.mem_free() / 1024)) # stack mem
print("heap mem:"+str(utils.heap_free() / 1024)) # heap mem

#第一次用執(zhí)行一次下面這兩個(gè)語(yǔ)句
#utils.gc_heap_size(800*1024)
#machine.reset()

#______________________________________________________________________________________________________________________________
#程序運(yùn)行選擇
is_need_debug = 0
is_patrol_line = 0
is_upacker_debug = 0
is_stack_heap_mem_debug = 0
is_upacker_recive_debug = 1
is_findflob_debug = 0

#______________________________________________________________________________________________________________________________
#程序運(yùn)行狀態(tài)
work_mode = 0  #0是巡線模式,1是數(shù)字識(shí)別模式

#______________________________________________________________________________________________________________________________
#串口配置區(qū)

fm.register(6, fm.fpioa.UART1_TX, force=True)
fm.register(7, fm.fpioa.UART1_RX, force=True)

k210_uart = UART(UART.UART1, 115200, 8, 0, 0, timeout=1000, read_buf_len=4096)

uart_test_write_str = '1260808878'

#______________________________________________________________________________________________________________________________
#按鍵蜂鳴器配置區(qū)
#注冊(cè)IO,注意高速GPIO口才有中斷
fm.register(35, fm.fpioa.GPIO0)
fm.register(16, fm.fpioa.GPIOHS0)
#構(gòu)建案件對(duì)象
KEY=GPIO(GPIO.GPIOHS0, GPIO.IN, GPIO.PULL_UP)

#PWM通過(guò)定時(shí)器配置,接到IO15引腳
tim = Timer(Timer.TIMER1, Timer.CHANNEL0, mode=Timer.MODE_PWM)
beep = PWM(tim, freq=1000, duty=0, pin=9)

#按鍵標(biāo)志位
key_node = 0
key_press_long = 0

#中斷回調(diào)函數(shù)
def fun(KEY):
    global work_mode,key_node,key_press_long
    temp_count = 0

    time.sleep_ms(10) #消除抖動(dòng)
    while KEY.value()== 0:
        key_node = 1
        time.sleep_ms(10) #長(zhǎng)按延時(shí)
        #長(zhǎng)按檢測(cè)計(jì)數(shù)
        temp_count=temp_count+1
        print(temp_count)
    if temp_count >= 50:

        beep.duty(50)
        time.sleep_ms(500)
        beep.duty(0)
        time.sleep_ms(100)

        print(temp_count)
        key_node = 0
        key_press_long = 1

#開(kāi)啟中斷,下降沿觸發(fā)
KEY.irq(fun, GPIO.IRQ_FALLING)

#______________________________________________________________________________________________________________________________
#要傳給梁山派的數(shù)據(jù)

#work_mode:0是巡線模式,1是數(shù)字識(shí)別模式
#recognition:0是未知(巡線狀態(tài)下),1是藥房門(mén)口區(qū)域(停車(chē)線),十字路口和T字路口由

class uart_send_data_t:
   def __init__( self, work_mode=0, recognition=0,top_block_offset=0,center_block_offset=0,left_block_offset=0,right_block_offset=0,left_number = 0,right_number = 0):
      self.work_mode = work_mode
      self.recognition = recognition
      self.top_block_offset = top_block_offset
      self.center_block_offset = center_block_offset
      self.left_block_offset = left_block_offset
      self.right_block_offset = right_block_offset
      self.left_number = left_number
      self.right_number = right_number


global_uart_send_data = uart_send_data_t()

#______________________________________________________________________________________________________________________________
#感興趣區(qū)配置
roi_area_width = 30
roi_area_color = (0, 0, 200)
roi_area_thickness = 2


left_roi = [50,40,roi_area_width,sensor.height()-40]
right_roi = [sensor.width()-roi_area_width-50,40,roi_area_width,sensor.height()-40]
top_roi = [0,10,sensor.width(),roi_area_width]
center_roi = [0,int(sensor.height()/2)-int(roi_area_width/2),sensor.width(),roi_area_width]
#bottom_roi = [0,sensor.height()- roi_area_width,sensor.width(),roi_area_width]

black_block_roi = [0,100,sensor.width(),100]

def draw_roi(img):
    img.draw_rectangle(left_roi, color = roi_area_color, thickness = roi_area_thickness, fill = False)
    img.draw_rectangle(right_roi, color = roi_area_color, thickness = roi_area_thickness, fill = False)
    img.draw_rectangle(top_roi, color = roi_area_color, thickness = roi_area_thickness, fill = False)
    img.draw_rectangle(center_roi, color = roi_area_color, thickness = roi_area_thickness, fill = False)
    img.draw_rectangle(black_block_roi, color = (0, 255, 0), thickness = roi_area_thickness, fill = False)
    return

#______________________________________________________________________________________________________________________________
#尋找色塊區(qū)配置
red_threshold =[12, 68, 11, 63, 5, 81]
black_threshold =[0, 50, -24,-1, -18, 6]

class red_blob_location_t:
   def __init__( self, x=0, y=0,area = 0):
      self.x = x
      self.y = y
      self.area = area


#______________
#左部blob位置信息
left_blob_location = red_blob_location_t()
left_pixels_threshold = 20     #若一個(gè)色塊的像素?cái)?shù)小于 pixel_threshold ,則會(huì)被過(guò)濾掉。
left_area_threshold = 20       #若一個(gè)色塊的邊界框區(qū)域小于 area_threshold ,則會(huì)被過(guò)濾掉。
left_x_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的x像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 x_stride 來(lái)提高查找色塊的速度。
left_y_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的y像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 y_stride 來(lái)提高查找色塊的速度。

#______________
#右部blob位置信息
right_blob_location = red_blob_location_t()
right_pixels_threshold = 20     #若一個(gè)色塊的像素?cái)?shù)小于 pixel_threshold ,則會(huì)被過(guò)濾掉。
right_area_threshold = 20       #若一個(gè)色塊的邊界框區(qū)域小于 area_threshold ,則會(huì)被過(guò)濾掉。
right_x_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的x像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 x_stride 來(lái)提高查找色塊的速度。
right_y_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的y像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 y_stride 來(lái)提高查找色塊的速度。

#______________
#頂部blob位置信息
top_blob_location = red_blob_location_t()
top_pixels_threshold = 20     #若一個(gè)色塊的像素?cái)?shù)小于 pixel_threshold ,則會(huì)被過(guò)濾掉。
top_area_threshold = 20       #若一個(gè)色塊的邊界框區(qū)域小于 area_threshold ,則會(huì)被過(guò)濾掉。
top_x_stride = 15               #是查找某色塊時(shí)需要跳過(guò)的x像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 x_stride 來(lái)提高查找色塊的速度。
top_y_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的y像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 y_stride 來(lái)提高查找色塊的速度。

#______________
#中部blob位置信息
center_blob_location = red_blob_location_t()
center_pixels_threshold = 20     #若一個(gè)色塊的像素?cái)?shù)小于 pixel_threshold ,則會(huì)被過(guò)濾掉。
center_area_threshold = 20       #若一個(gè)色塊的邊界框區(qū)域小于 area_threshold ,則會(huì)被過(guò)濾掉。
center_x_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的x像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 x_stride 來(lái)提高查找色塊的速度。
center_y_stride = 20               #是查找某色塊時(shí)需要跳過(guò)的y像素的數(shù)量。找到色塊后,直線填充算法將精確像素。 若已知色塊較大,可增加 y_stride 來(lái)提高查找色塊的速度。


blob_location=[0,0]

def find_blob(img):

    global global_uart_send_data
    #top_blob_location.x = -1
    #top_blob_location.y = -1
    #center_blob_location.x = -1
    #center_blob_location.y = -1
    left_blob_location.x = -1
    left_blob_location.y = -1
    right_blob_location.x = -1
    right_blob_location.y = -1
    center_blob_location.area = 0
    for blob in img.find_blobs([red_threshold], roi = left_roi, x_stride = left_x_stride, y_stride = left_y_stride, pixels_threshold=left_pixels_threshold, area_threshold=left_area_threshold, merge=False, margin=10):
        img.draw_rectangle(blob.rect())
        img.draw_cross(blob.cx(), blob.cy())
        left_blob_location.x = blob.cx()
        left_blob_location.y = blob.cy()
        left_blob_location.area = blob.area()

    for blob in img.find_blobs([red_threshold], roi = right_roi,x_stride = right_x_stride, y_stride = right_y_stride, pixels_threshold=right_pixels_threshold, area_threshold=right_area_threshold, merge=True, margin=10):
        img.draw_rectangle(blob.rect())
        img.draw_cross(blob.cx(), blob.cy())
        right_blob_location.x = blob.cx()
        right_blob_location.y = blob.cy()
        right_blob_location.area = blob.area()

    for blob in img.find_blobs([red_threshold], roi = top_roi,x_stride = top_x_stride, y_stride = top_y_stride, pixels_threshold=top_pixels_threshold, area_threshold=top_area_threshold, merge=True, margin=10):
        img.draw_rectangle(blob.rect())
        img.draw_cross(blob.cx(), blob.cy())
        #print("-------"+str(blob.area()))
        top_blob_location.x = blob.cx()
        top_blob_location.y = blob.cy()
        top_blob_location.area = blob.area()

    for blob in img.find_blobs([red_threshold], roi = center_roi,x_stride = center_x_stride, y_stride = center_y_stride, pixels_threshold=center_pixels_threshold, area_threshold=center_area_threshold, merge=True, margin=10):
        img.draw_rectangle(blob.rect())
        img.draw_cross(blob.cx(), blob.cy())
        center_blob_location.x = blob.cx()
        center_blob_location.y = blob.cy()
        center_blob_location.area = blob.area()
        #print(blob.pixels())


    #for blob in img.find_blobs([black_threshold], roi = black_block_roi, pixels_threshold=30,merge=True,margin=50):
        #img.draw_rectangle(blob.rect())
        #img.draw_cross(blob.cx(), blob.cy())
        ##print(blob.count())
        #if(blob.count() >= 5):
            #print("tinche"+str(blob.count()))
            #global_uart_send_data.recognition = 1
        #else:
            #global_uart_send_data.recognition = 0

    if(center_blob_location.area == 0):
        print("tinche")
        global_uart_send_data.recognition = 1
    else:
        global_uart_send_data.recognition = 0

    return

#______________________________________________________________________________________________________________________________
#色塊連線區(qū)配置
lines_color = (0, 200, 0)
lines_thickness = 1

def draw_lines(img):
    img.draw_line(top_blob_location.x, top_blob_location.y, center_blob_location.x, center_blob_location.y, color = lines_color, thickness = lines_thickness)
    img.draw_line(left_blob_location.x, left_blob_location.y, right_blob_location.x, right_blob_location.y, color = lines_color, thickness = lines_thickness)
    return


#______________________________________________________________________________________________________________________________
#upacker python實(shí)現(xiàn)代碼 :https://github.com/aeo123/upacker/blob/master/python/upacker.py
#介紹請(qǐng)看這里:https://github.com/aeo123/upacker

class Upacker():
    def __init__(self):
        self._STX_L = 0x55
        self._MAX_PACK_SIZE = 1024 + 4 + 128
        self._calc = 0
        self._check = 0
        self._cnt = 0
        self._flen = 0
        self._state = 0
        self._data = bytearray()

    def _decode(self, d):
        if (self._state == 0 and d == self._STX_L):
            self._state = 1
            self._calc = self._STX_L
        elif self._state == 1:
            self._flen = d & 0xff
            self._calc ^= d & 0xff
            self._state = 2
        elif self._state == 2:
            self._flen |= (d & 0xff)  self._MAX_PACK_SIZE):
                self._state = 0
                return -1
            else:
                self._data = bytearray(self._flen & 0x3FFF)
            self._state = 3
            self._cnt = 0
        elif self._state == 3:
            header_crc = ((d & 0x03) > 12)
            self._check = d
            if (header_crc != (self._calc & 0X3C)):
                self._state = 0
                return -1
            self._state = 4
            self._flen &= 0x3FFF
        elif self._state == 4:
            self._data[self._cnt] = d
            self._cnt += 1
            self._calc ^= d
            if self._cnt == self._flen:
                self._state = 0
                #接收完,檢查check
                if ((self._calc & 0xFC) == (self._check & 0XFC)):
                    return 0
                else:
                    return -1
        else:
            self._state = 0

        return 1

    # 解包
    def unpack(self, bytes_data, callback):
        ret = 0
        for i in bytes_data:
            ret = self._decode(i)
            if ret == 0:
                callback(self._data)
                if(is_upacker_debug):
                    print(self._data)
            elif ret == -1:
                # callback(None)
                print("err")

    # 打包
    def enpack(self, data):
        tmp = bytearray(4)
        tmp[0] = 0x55
        tmp[1] = len(data) & 0xff
        tmp[2] = (len(data) >> 8) & 0xff
        crc = tmp[0] ^ tmp[1] ^ tmp[2]
        tmp[2] |= (crc & 0x0c) > 4)

        for i in range(len(data)):
            crc ^= data[i]
        tmp[3] |= (crc & 0xfc)

        frame = struct.pack("BBBB%ds" % len(data), tmp[0], tmp[1], tmp[2],
                            tmp[3], data)
        #python3.5之前bytes數(shù)據(jù)沒(méi)有hex()屬性,所以修改了下面這個(gè)
        #print(frame.hex())
        if(is_upacker_debug):
            print(''.join(map(lambda x:('' if len(hex(x))>=4 else '/x0')+hex(x)[2:],frame)))

        return frame

#____________
#串口命令切換模式
uart_cmd_need_change_mode = 0

def print_hex(bytes):
    global work_mode,uart_cmd_need_change_mode

    hex_byte = [hex(i) for i in bytes]
    if is_upacker_recive_debug:
        print("-----"+" ".join(hex_byte))
    if bytes[0] == 0x00:
        work_mode = 0
    if bytes[0] == 0x01:
        work_mode = 1
    uart_cmd_need_change_mode = 1

#if __name__ == '__main__':
    #buf = bytearray([0x00, 0x01, 0x02,0x03,0x77])
    #pack = Upacker()
    #pkt = pack.enpack(buf)
    #pack.unpack(pkt, print_hex)

#______________________________________________________________________________________________________________________________
#upacker python實(shí)現(xiàn)代碼結(jié)束



def upacker_init():
    pack = Upacker()

    return pack

yzh = 10

#______________________________________________________________________________________________________________________________
#發(fā)送數(shù)據(jù)到MCU,gd32是小端字節(jié)序
#pack各字母對(duì)應(yīng)類(lèi)型
#x   pad byte        no value            1
#c   char            string of length 1  1
#b   signed char     integer             1
#B   unsigned char   integer             1
#?   _Bool           bool                1
#h   short           integer             2
#H   unsigned short  integer             2
#i   int             integer             4
#I   unsigned int    integer or long     4
#l   long            integer             4
#L   unsigned long   long                4
#q   long long       long                8
#Q   unsilong long   long                8
#f   float           float               4
#d   double          float               8
#s   char[]          string              1
#p   char[]          string              1
#P   void *          long

def send_data_to_mcu(pack,global_uart_send_data):
    hex_data = ustruct.pack("

關(guān)鍵的注釋都添加了,可以幫助理解代碼,這段代碼同時(shí)實(shí)現(xiàn)了尋紅線和數(shù)字識(shí)別,但是還做不到同時(shí)運(yùn)行,在尋紅線的時(shí)候沒(méi)法數(shù)字識(shí)別,這兩個(gè)狀態(tài)之間的切換可以通過(guò)長(zhǎng)按K210上的用戶按鍵或者由立創(chuàng)梁山派來(lái)控制切換。當(dāng)送藥小車(chē)到達(dá)數(shù)字識(shí)別處時(shí)就控制K210進(jìn)入數(shù)字識(shí)別模式,識(shí)別到數(shù)字后再控制K210進(jìn)入尋紅線模式。

首先初始化LCD屏幕、配置攝像頭、配置UART通信,并配置一個(gè)具有中斷的按鈕。然后,定義了感興趣區(qū)域(ROIs)和一些用于在圖像中查找色塊的參數(shù)(具體可以去MaixPy的API文檔中查找)。

設(shè)置了在圖像中檢測(cè)色塊和在里面繪制連線的參數(shù)。共定義了四個(gè)感興趣區(qū)域(ROI):左側(cè)、右側(cè)、頂部和中心。每個(gè)ROI都有自己的色塊檢測(cè)參數(shù),如pixel_threshold、area_threshold、x_stride和y_stride。這些參數(shù)用于過(guò)濾掉過(guò)小的色塊或者通過(guò)跳過(guò)一些像素來(lái)提高檢測(cè)速度,避免一些微小噪聲小色塊的影響。

find_blob函數(shù)處理輸入圖像(img),使用img.find_blobs方法在每個(gè)ROI中檢測(cè)紅色的色塊。然后在色塊周?chē)L制矩形并在其中心繪制十字標(biāo)記來(lái)方便調(diào)試。檢測(cè)到的色塊的位置和面積信息存儲(chǔ)在left_blob_location、right_blob_location、top_blob_location和center_blob_location結(jié)構(gòu)中。如果在中心ROI中沒(méi)有檢測(cè)到色塊,則將global_uart_send_data.recognition變量設(shè)置為1,否則設(shè)置為0,當(dāng)紅色線沒(méi)了的時(shí)候就代表該停車(chē)了。draw_lines函數(shù)用于在上下和左右ROI的紅色塊之間繪制連線(上下左右ROI都識(shí)別到紅色塊就是一個(gè)交叉的十字),方便調(diào)試使用。

定義了一個(gè)名為send_data_to_mcu的函數(shù),用于將數(shù)據(jù)發(fā)送到立創(chuàng)梁山派。這里使用了ustruct.pack函數(shù)將數(shù)據(jù)打包為字節(jié)序列,然后調(diào)用pack.enpack方法將數(shù)據(jù)打包,最后通過(guò)k210_uart.write將數(shù)據(jù)發(fā)送出去。

定義了一個(gè)名為on_timer的定時(shí)回調(diào)函數(shù),用于定時(shí)發(fā)送串口數(shù)據(jù)。在這個(gè)函數(shù)中,根據(jù)圖像中的各個(gè)位置計(jì)算出相應(yīng)的偏移量,并將這些偏移量存儲(chǔ)在global_uart_send_data對(duì)象中。然后,調(diào)用send_data_to_mcu函數(shù)將數(shù)據(jù)發(fā)送到立創(chuàng)梁山派的串口里面。然后,配置定時(shí)器0通道0,設(shè)置定時(shí)器的模式、周期、單位、回調(diào)函數(shù)等參數(shù),并啟動(dòng)定時(shí)器。

進(jìn)行數(shù)字識(shí)別的相關(guān)配置,用init_yolo2加載模型并初始化KPU

在主循環(huán)中,根據(jù)工作模式選擇執(zhí)行巡線模式還是數(shù)字識(shí)別模式。在巡線模式下,調(diào)用find_blob、draw_roi、draw_lines等函數(shù)來(lái)處理攝像頭采集到圖像,并將處理后的圖像顯示在LCD上方便調(diào)試。在數(shù)字識(shí)別模式下,使用KPU運(yùn)行模型并獲取識(shí)別結(jié)果,將識(shí)別到的數(shù)字繪制在圖像上,并將處理后的圖像顯示在LCD上。最后,程序會(huì)讀取來(lái)自立創(chuàng)梁山篇串口發(fā)送來(lái)的數(shù)據(jù),并使用pack.unpack方法解包數(shù)據(jù)。如果有數(shù)據(jù),會(huì)執(zhí)行解包,解包成功后會(huì)更新K210模式控制的標(biāo)志位(巡線模式還是數(shù)字識(shí)別模式)。

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫(xiě)或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 開(kāi)發(fā)板
    +關(guān)注

    關(guān)注

    26

    文章

    6433

    瀏覽量

    121219
  • 代碼
    +關(guān)注

    關(guān)注

    30

    文章

    4977

    瀏覽量

    74420
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    創(chuàng)梁山的華秋DFM解析講解(上)

    可制造性設(shè)計(jì)(DFM)就是從產(chǎn)品開(kāi)發(fā)設(shè)計(jì)時(shí)起,就考慮到可制造性和可測(cè)試性,使設(shè)計(jì)和制造之間緊密聯(lián)系,實(shí)現(xiàn)從設(shè)計(jì)到制造一次成功的目的。這是保證PCB設(shè)計(jì)質(zhì)量的最有效方法?;谌A秋DFM來(lái)看一下
    的頭像 發(fā)表于 12-12 09:07 ?5998次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b><b class='flag-5'>梁山</b><b class='flag-5'>派</b>的華秋DFM解析<b class='flag-5'>講解</b>(上)

    創(chuàng)·梁山開(kāi)發(fā)板-21F-送藥小車(chē)-K210更換固件-運(yùn)行基礎(chǔ)顏色識(shí)別例程

    K210更換固件,他的IDE叫CanMV,看起來(lái)應(yīng)該是官方合作出品的。但是實(shí)際使用的時(shí)候發(fā)現(xiàn)他里面的函數(shù)都比較老舊,連接IDE的時(shí)候經(jīng)常性出現(xiàn)連不上或者連上很久之后才有反應(yīng)。而且對(duì)機(jī)器視覺(jué)的適配沒(méi)有Maixpy好,所以開(kāi)始之前我們先給這個(gè)K210
    的頭像 發(fā)表于 07-28 11:27 ?2709次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b>·<b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b>-<b class='flag-5'>K210</b>更換固件-運(yùn)行基礎(chǔ)顏色識(shí)別例程

    創(chuàng)·梁山開(kāi)發(fā)板-21F-送藥小車(chē)-K210的KPU數(shù)字識(shí)別訓(xùn)練

    數(shù)字的數(shù)據(jù)量盡可能相等。但 k210 的算力也是有限的,他所能運(yùn)行的模型也是有限的,對(duì)于 k210:運(yùn)行 c 代碼時(shí)最大可以加載 6MB 左右的模型,運(yùn)行 maixpy 的最小固件時(shí),能加載 3MB 左右
    的頭像 發(fā)表于 07-31 10:29 ?2311次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b>·<b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b>-<b class='flag-5'>K210</b>的KPU數(shù)字識(shí)別訓(xùn)練

    開(kāi)發(fā)板-21F-送藥小車(chē)-小車(chē)尋紅線環(huán)的調(diào)試與實(shí)現(xiàn)

    PID控制來(lái)說(shuō),測(cè)量值是紅線相較屏幕中線的偏移,目標(biāo)值是想讓紅線偏移為0,輸出值是電機(jī)的速度。 根據(jù)14_創(chuàng)梁山K210串口通信協(xié)議
    的頭像 發(fā)表于 08-03 10:10 ?2443次閱讀

    創(chuàng)·梁山開(kāi)發(fā)板-21F-送藥小車(chē)實(shí)現(xiàn)思路

    基本要求 1. 根據(jù)走廊上的標(biāo)識(shí)信息自動(dòng)識(shí)別,尋徑將藥品送到指定病房,投影要在門(mén)口區(qū)域內(nèi), 2. 到了指定病房后,點(diǎn)亮紅色指示燈,等待卸載藥品。 3. 人工卸掉藥品后,小車(chē)自動(dòng)熄滅紅色指示燈,開(kāi)始返回。 4. 自動(dòng)返回藥房,點(diǎn)亮綠色指示燈。
    的頭像 發(fā)表于 08-08 09:44 ?1608次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b>·<b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b><b class='flag-5'>實(shí)現(xiàn)</b>思路

    怎樣去設(shè)計(jì)一個(gè)智能送藥小車(chē)

    2021F智能送藥小車(chē)原文鏈接:openmv巡線代碼
    發(fā)表于 01-07 08:19

    創(chuàng)梁山-21F-智能送藥小車(chē)-按鍵檢測(cè)的消抖和實(shí)現(xiàn)

    按鍵檢測(cè)的消抖和實(shí)現(xiàn)送藥小車(chē)中,預(yù)留了三個(gè)按鍵,藥品裝載檢測(cè)是通過(guò)一個(gè)輕觸開(kāi)關(guān)來(lái)實(shí)現(xiàn)的,也可以把他理解成一個(gè)按鍵。 按鍵的實(shí)際電路如下: 我們通常用的按鍵內(nèi)部都是機(jī)械彈性開(kāi)關(guān),當(dāng)
    發(fā)表于 08-04 09:48

    求助,求K210開(kāi)發(fā)板測(cè)試參考程序,MDK5開(kāi)發(fā)

    您好,本人小白一枚,想學(xué)習(xí)一下K210開(kāi)發(fā)板的使用。求K210開(kāi)發(fā)板測(cè)試參考程序,MDK5開(kāi)發(fā)的。順帶能否發(fā)一下包括
    發(fā)表于 09-15 07:42

    Kendryte K210開(kāi)發(fā)板使用說(shuō)明書(shū)

    本文檔是 Kendryte K210 開(kāi)發(fā)板使用說(shuō)明書(shū),型號(hào)是 KD233,描述了開(kāi)發(fā)板資源、建立軟件開(kāi)發(fā)環(huán)境、使用 SDK 在開(kāi)發(fā)板上執(zhí)行
    發(fā)表于 05-28 10:09 ?67次下載

    亞博智能K210開(kāi)發(fā)板學(xué)習(xí)筆記

    亞博智能K210開(kāi)發(fā)板學(xué)習(xí)筆記
    發(fā)表于 12-08 15:06 ?47次下載
    亞博智能<b class='flag-5'>K210</b><b class='flag-5'>開(kāi)發(fā)板</b>學(xué)習(xí)筆記

    創(chuàng)梁山的華秋DFM解析講解(下)

    創(chuàng)開(kāi)源的梁山開(kāi)發(fā)板已經(jīng)大批量生產(chǎn),其中一些細(xì)節(jié)和布線布局規(guī)則還是很值得我們學(xué)習(xí)的。上期已經(jīng)介紹電氣信號(hào),最小線寬,最小間距,SMD間距的
    的頭像 發(fā)表于 12-12 13:17 ?3738次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b><b class='flag-5'>梁山</b><b class='flag-5'>派</b>的華秋DFM解析<b class='flag-5'>講解</b>(下)

    梁山開(kāi)發(fā)板-21F-送藥小車(chē)-分析

    全國(guó)產(chǎn)開(kāi)源開(kāi)發(fā)板,基于GD32F4系列,21F
    的頭像 發(fā)表于 07-31 10:13 ?2630次閱讀
    <b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b>-<b class='flag-5'>賽</b><b class='flag-5'>題</b>分析

    創(chuàng)梁山開(kāi)發(fā)板-21F-送藥小車(chē)-小車(chē)角度環(huán)的調(diào)試與實(shí)現(xiàn)

    來(lái)達(dá)到目標(biāo)值。 第二種是在實(shí)現(xiàn)小車(chē)輪子位置環(huán)的基礎(chǔ)上,控制兩邊輪子同時(shí)向不同的方向旋轉(zhuǎn)一定的圈數(shù)(編碼器脈沖),在小車(chē)輪子不打滑的情況下轉(zhuǎn)過(guò)的角度就是一個(gè)確定的值,在送藥
    的頭像 發(fā)表于 07-27 10:18 ?1979次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b><b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b>-<b class='flag-5'>小車(chē)</b>角度環(huán)的調(diào)試與<b class='flag-5'>實(shí)現(xiàn)</b>

    創(chuàng)·梁山開(kāi)發(fā)板-21F-送藥小車(chē)-與K210串口通信協(xié)議框架搭建

    K210可以識(shí)別到色塊和識(shí)別數(shù)字后,就需要把這些信息傳遞給創(chuàng)梁山派了。而立創(chuàng)梁山
    的頭像 發(fā)表于 08-02 10:57 ?1544次閱讀

    創(chuàng)·梁山開(kāi)發(fā)板-21F-送藥小車(chē)數(shù)據(jù)的發(fā)布與訂閱

    可維護(hù)性和調(diào)試?yán)щy:使用全局變量傳遞信息可能導(dǎo)致代碼的可維護(hù)性和調(diào)試的困難。由于全局變量可以被任何任務(wù)修改,追蹤問(wèn)題的根源和調(diào)試錯(cuò)誤可能會(huì)變得更加困難。
    的頭像 發(fā)表于 08-07 09:55 ?1169次閱讀
    <b class='flag-5'>立</b><b class='flag-5'>創(chuàng)</b>·<b class='flag-5'>梁山</b><b class='flag-5'>派</b><b class='flag-5'>開(kāi)發(fā)板</b>-<b class='flag-5'>21</b><b class='flag-5'>年</b><b class='flag-5'>電</b><b class='flag-5'>賽</b><b class='flag-5'>F</b><b class='flag-5'>題</b>-<b class='flag-5'>送藥</b><b class='flag-5'>小車(chē)</b>數(shù)據(jù)的發(fā)布與訂閱
    巴青县| 通山县| 噶尔县| 芒康县| 石嘴山市| 措勤县| 平阳县| 罗平县| 驻马店市| 虞城县| 扎赉特旗| 凤山市| 宁城县| 赤水市| 明星| 如皋市| 元谋县| 教育| 宕昌县| 宝山区| 高密市| 开平市| 兰溪市| 揭东县| 南江县| 开平市| 新巴尔虎右旗| 嘉黎县| 姜堰市| 三明市| 连城县| 黎川县| 昭通市| 北宁市| 合川市| 饶河县| 五台县| 宿松县| 瓦房店市| 财经| 天柱县|